Makes the CLI interface a bit more robust and useful
Having to start the interpreter, then type .load_file, etc is cumbersome. Let’s change it so that the VM…
.load_file
Welcome back! When we last left our intrepid readers, we were about to write an assembler struct.
Hey everyone! I know I promised labels in the previous part, but as I was writing it, I realized there are some prerequisites we can do. Completing them will make…
So You Want to Build a Language VM — Part 12
What are Strings?
Right now, we have one place to store data: registers. These are great, but we only have 32 of them, and they only store i32s. What if we want to store, say, strings…
Our assembler right now can recognize one opcode, load. We need to teach it to recognize all the…
load
We’ve written basic parsers. Now we can take a step up on the abstraction ladder and create a parser that…
Our current REPL doesn’t do a ton, so let’s fix that. In this post, we’ll be adding some commands to look at the…
We could torture ourselves by writing all our programs in hex, and if that’s your thing, this section is…
REPL stands for Read, Evaluate, and Print Loop. It is also referred to as the interactive interpreter for a language. For example, if you open up Terminal or iTerm, we can look at Python’s REPL:
REPL