In this post we’ll get into one of the core parts of implementing a Z-Machine, which is decoding an instruction. This is a crucial part of how your Z-Machine will work because decoding an instruction is what allows you to execute it.
Category: Z-Machine
A series of posts related to building and testing a Z-Machine implementation.
Designing and Testing Grue
In this post I want to level-set on a particular starting point for the implementation of Grue, from a development and testing point of view. I’ve covered a lot in the previous posts, with code interspersed with narrative. Here we’ll pretty much just focus on code along with the tests.
Processing in Grue
At this point, we’re very close to one of the meatier subjects in terms of creating a Z-Machine implementation, which is the decoding of instructions from the zcode binary. Before we get into that, let’s take a look at tthe overall processing that will need to be supported.
Reading Memory in Grue
We have to talk about how to access memory so we can read values from it. And to do that I have to talk a little about a Z-Machine area of memory called the header. With that, I’ll show you some helper methods you’ll want to have in place. Then we’ll deep dive into the memory considerations and, finally, we’ll come up for air by showing how to represent some of the Z-Machine memory in Grue.
Memory and State in Grue
In this post, we’ll dig into one of the core areas you have to set up first for your Z-Machine implementation, which is the memory. Without having the memory of the virtual machine set up, you can’t effectively do anything. We’ll also get started on some initial code in this post.
Bits and Bytes in Grue
In this post, we’re going to start down the path of implementing the basics of a Z-Machine. Crucial to this start, however, is making sure it’s understood how the Z-Machine actually works in terms of taking in zcode to execute and what, exactly, is executing. Spoiler alert: it’s 0’s and 1’s all the way down.
Setting Up the Grue
In this post, I’ll give you some idea of how the Grue project was set up, which involves talking about the programming language and ecosystem being used. This is the kind of information that, as a tester, I like to know. Certainly for anyone looking to develop a Z-Machine implementation, these details matter.
Eaten By a Grue
For the duration, I believe this blog is going to move in a slightly different direction than it has in the past. I’ll use this oddly titled post to explain what that means and why that is. By the end of the post, the title won’t seem so odd.