Live coding an assembler for CP/M

Live coding an assembler for CP/M

As part of this, I’ve just written a mostly-functional clone of the original which was shipped with CP/M — a simple 8080 assembler. It’s missing a few features, like error recovery and transcript, but is functional enough to compile the original Digital Research CCP source code into an almost byte-for-byte copy of the original (Digital Research’s own assembler isn’t deterministic, leaving random garbage in uninitialised areas, where mine writes zeroes, hence the ‘almost’). The resulting binary is about 5.5kB vs the 8kB of the Digital Research hand-tooled original, which is probably due to it being Z80 machine code rather than the bigger and slower 8080 — I have an 8080 compiler but I just hadn’t bothered to get it set up.

Source: cowlark.com