==================
== Ralph Landon ==
==================

Go 6502 Parsing Expressions

default
Handling Simple Expressions After the previous post, our compiler currently handles single integers, storing them in the A register for later use. Now, let’s try to use them for something simple. One way to look at programs is as a collection of statements and expressions–statements do something, while expressions are something–certainly an oversimplification, but useful here. And in fact, we already handle expressions, our single digit integers are expressions, single digit expressions. Read more...

6502 Go Compiler Hello World

compiler default
So what are we doing? As mentioned in the introduction, we’re going to take a really simple approach to building a compiler and creating executable code following Jack Crenshaw’s “Let’s Build a Compiler” series. Ideally, you’ll follow along, writing this code, assembling the output, and executing on a 6502 emulator somewhere. It will probably get really annoying to keep reading “As in the original articles”, so take it a given that the rest of this series is shamelessly stolen from that wonderful work. Read more...

Let's Build a Compiler in Go for the 6502

compiler 6502
Introduction From 1988 to 1995, Jack W. Crenshaw put out a fifteen-part series entitiled “Let’s Build a Compiler”. It is a nice introduction to compiler construction. Being a bit dated, I thought it might be a fun project to create a series of similar series of articles using a more modern language. I use Go as my daily driver at work, so I’ll go ahead with that here. I won’t be using proper go idioms, but rather will try to more closely follow the structure of the Turbo Pascal in which the original series was written. Read more...
1 of 1