Developer plans a hands‑on assembler project for Z80/8080 in D

It has been reported that a recent blog post shared on Lobsters lays out a step‑by‑step plan to build an assembler — essentially the inverse of a disassembler — aimed at learners and hobbyists. The author chooses to target the Zilog Z80 hardware but will actually emit Intel 8080 opcodes, leaning on the binary compatibility between the two chips. Why pick the 8080? Because, the post argues, its mnemonics are simpler to parse than the Z80’s; Intel allegedly copyrighted the 8080 mnemonics, which is why the Z80’s assembly looks different. Practicality wins here. Simpler grammar, faster progress.
The project is deliberately pragmatic. Inspired by Jack Crenshaw’s "Let's Build a Compiler" series, the author says they will “completely ignore the more theoretical aspects” and learn by doing — function over form. The assembler will be written in the D language, held in a single source file that eventually grows to about 1,300 lines. Compilation notes are explicit: gdc -o a80 a80.d or dmd -of=a80 a80.d, and the code is intended to run on any platform supported by D (the author codes on OpenBSD, but that’s optional). All source code for the post, it has been reported, is linked from the article for anyone who wants to follow along.
There are limits and invitations. The initial tool will not implement Z80 extensions, so you won’t get every modern trick, but you will get a correct, working assembler for the 8080 instruction set — more than enough to write interesting software and learn the craft. Want a stretch goal? Add Z80 syntax and extensions after the fact. The emotional core of the piece is plain: there’s real joy in turning human‑readable assembly into machine code. It’s hands‑on, surprisingly satisfying, and — let’s be honest — a little addictive.
Why it matters
This is part of a broader trend: developers rebuilding foundational tools to demystify computing, teach systems thinking, and preserve retro platforms. Whether you’re a student who’s never seen an assembler up close or a retrocomputing fan rebuilding old toolchains, this project promises a clear, runnable path to learning by doing. Single‑file projects can be messy; they’re also accessible. Roll up your sleeves — you might come away with a deeper appreciation for how software whispers to silicon.
Sources: briancallahan.net, Lobsters
Comments