Iridium

So You Want to Build a Language VM - Part 05 - Equality Checks

Covers equality opcodes

Equality

Hey, you’ve made it this far! Congrats! I wish I could say we’re near the end to give you some hope, but, well…​sorry. =)

Today, we’re going to add some equality and comparison instructions! These will let us test us if the values in two registers are equal, not equal, greater than, or less than. These are easy to implement, so it shouldn’t take us too long. == Opcodes The new Opcodes we’ll be creating are:

So You Want to Build a Language VM - Part 04 - Jumps

Covers the jump opcodes

Jump Around!

When we last left our intrepid tutorial followers, we had a simple VM that could add, subtract, multiply and divide. This is all fine and dandy, but we need more functionality than just that. In this segment, we’ll be adding some jump-related instructions.

So You Want to Build a Language VM - Part 00 - Computer Hardware Crash Course

Covers general elements of computer hardware useful to know before reading the rest of the tutorials

A Brief Course in Computer Hardware

Hi there! This is the prelude to a series of posts to detailing how to build a language VM. If you are familiar with terms like registers, program counter and assembly, feel free to skip this post. If not, read on. Please note this is nowhere near comprehensive, but enough to understand what we’re building. == What is a Language VM? You know how you can you type python script.py and magic happens? That’s the Python virtual machine, or language interpreter, reading the source code you wrote, translating it down to bytecode the Python VM can understand, and then executing it.