PLAIN VM – Updated

Wrapping up the VM I question some of the instructions so I reviewed the list once more. I will needed to add more of the If instructions back. I will probably also need to add bit operators later – I actually need to wrap up the VM and Write some actual code to see if miss something.

NOP No Operation.
For FOR Loop
Assign Assign operation
While WHILE Loop
Loop Generic Loop
Exit  Terminate a process
Raise Raise an event. The same as calling a function without creating a stack Return entry.
Call Call a function and create a stack Return entry. A function can be PLAIN or C/C++ function.
Ifeq, Ifneq, Ifgt, Ifls, Ifgte, Iflse If statements. If takes an Expression and insert a Assign instruction to evaluate the Expression. All other compare two registers.
Switch Switch

I hope to have a working demo of the VM in a few days.

Leave a Reply