A developer porting LZ4 decompression across Z80, 8080, 8086, 6502, 6800, and 6809 uses the exercise to map the architectural relationships and tradeoffs among these CPUs.
Key Takeaways
Z80 is binary-compatible with the 8080; 8080 lacks relative jumps, shadow registers, index registers IX/IY, and most multi-byte instructions.
8086 extends 8080 principles to 16-bit: splittable registers AX/BX/CX/DX, two data segment pointers DS/ES enabling simultaneous input/output buffer access without register juggling.
8086 segmentation uses 16-byte paragraph granularity vs 65816 64KB banks, making far-pointer arithmetic less painful and 64KB buffers trivially addressable with 16-bit offsets if 16-byte aligned.
6809 improves on 6800 by adding 16-bit accumulator D, second index register Y, stack pointers usable as index registers, 16-bit displacements, and a Direct Page register replacing zero-page.
Recommended modern assemblers: Pasmo with -w8080 for Z80/8080, NASM for 8086, asm6809 for 6809.