The vale8 Instruction Set¶
Published on 2019-04-12
One of the earliest challenges I faced when I decided to design a custom CPU for the vale8 was that, because I had almost no practical experience with assembly language(s), I also had little intuition for knowing what instructions to include in the CPU’s instruction set. My experience creating GB and 8085 CPU emulators was helpful in that I at least understood how to implement many common CPU instructions. Regardless, it was clear I needed a wider perspective.
There are other ways to approach designing a CPU’s ISA than from the viewpoint of the assembly language programmer. For example, if the CPU is mainly intended to be used with one or more higher-level languages, it can implement the minimum subset of instructions required by those languages. However, designing around support for higher level languages with no attention to the assembly language could result in a product that’s unpleasant to program using assembly language.
While I am interested in implementing either Forth or BASIC on vale8 eventually, I’m going to keep them out of scope for now. That means assembly is the single supported programming language for the first version of vale8. With that in mind, my goal for the instruction set is for it to be as simple as it can be while still being fun to program directly in assembly.
To get a better sense of how “good” assembly languages feel, I’ve decided to do some small projects in assembly language for one or more popular 8-bit processors. I’ll take that practical experience back to the vale8 ISA design.