Hjalfi writes _yet another_ assembler for the PDP11
Channel: Poking Technology
Date: 21/09/2020

In which yr hmbl svt cements his reputation as That Guy Who Writes Assemblers by writing an assembler, this time for the PDP11, one of the most iconic processor architectures ever (and still a pretty nice thing to write code for).

So what I'm doing here is adapting the assembler framework I put together for the 8080 assembler into one which works on the PDP11. This requiewa adding support for addressing modes and variable-sized instructions, which is something I've actually been wanting for a while (for future architectures).

I discovered later that the PDP11 does in fact use (optionally) split I/D address spaces. While the assembler can generate these, to make best use of them it really needs multiple program counters so you can send instructions to one or the other. Right now everything is emitted linearly. So I may do that (offline). I also strongly suspect I've been confusing two of the addressing modes together, which isn't helping.

You can find the assembler at https://github.com/davidgiven/cowgol/blob/pdp11/src/cowasm/archpdp11.cow.