This post is part of the Stack Based Virtual Machines series. In the previous part we have implemented quite a few instructions for our virtual machine. In this part, we’ll further extend its capabilities by adding some comparison instructions, the ability to do jumps and local variables. The relevant code for this part can be seen on github. Comparison instructions Let’s add a few simple instructions to our repertoire: we’re going to add some instructions to compare two numbers.| andreabergia.com
This post is part of the Stack Based Virtual Machines series. After the introduction in the last part, it’s time to start writing some code and dig into stack based virtual machines. We’re going to write a very simple VM in Java (yes, that’s a stack-based virtual machine - our program - running on a stack-based virtual machine - the JVM - that runs on a register-based hardware machine - your CPU.| andreabergia.com