Hi this is a small Virtual Machine I made using a stack based on the one used in Java but not as powerful now it only handles type of Integer at the moment it got a few instructions you can play around with and also some examples,
I also made a chart of the instructions used in this VM, the project also comes with a small assembler I called comp that takes an asm style code and converts it to an integer list and dumps the bytes to a file to be read by the VM. Well anyway, don’t expect to much as this is the first version and make have a few blips in it.
Any coments are welcome as this will hep me inprove on this project.
Here is an example you can test there are more in the examples folder.
Download stackvm.zipCode:; Square numbers 1 to 20 PUSH 0 STORE A PUSH 20 STORE B PUSH 0 STORE S Loop: LOAD A DUP imul STORE C LOAD C syscall 1 LOAD A PUSH 1 iadd STORE A LOAD A LOAD B LTE Jmpnz Loop halt


Reply With Quote
