Skip to content

A simple java based Virtual Machine to learn about Bytecode interpretation

Notifications You must be signed in to change notification settings

yannvanhalewyn/Simple-VM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A simple JAVA-Based Virtual Machine

This was written as a personal exercice after watching this great presentation about VM's by Terence Parr.

NOTE: I built this in order to learn the basics of VM's, and learn some Java while I was at it. It's an extremely simplistic implementation!

BUILD

There's a makefile. In the project root, simply run make to build, or make run to build and run. make clean cleans up the built objects.

INFO

It handles 18 basic bytecode instructions, including calling a function whilst preserving state. Check out vm.Bytecode to see all 18 Instructions.

To run a program, simply create an int[] array with any instruction set and hand it over to the VM. Setting the trace property to true will print the stack trace as the program runs. See the main function in vm.Test for more information.

About

A simple java based Virtual Machine to learn about Bytecode interpretation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published