logoalt Hacker News

meekinstoday at 10:59 AM2 repliesview on HN

Due to its simplicity it's a fun little processor to program. Hacking on some assembly on a ZX spectrum emulator is a nice way to stay sane in this high abstraction LLM age.


Replies

flohofwoetoday at 11:19 AM

"Simple" is really not a word I would associate with the Z80 ;)

The ISA is quite messy because of the backward compatibility requirement with the Intel 8080 (e.g. the Z80 had to fill undocumented gaps in the 8080 opcode encoding map with new instructions, four of which were prefix instructions to unlock additional instruction 'subsets' (DD/FD for replacing instructions involving the HL register pair with indexed addressing modes via the IX/IY registers, and ED/CB prefixes for adding two entirely new opcode blocks).

If the Zilog engineers would have been free to design their own ISA I'm sure they would have been able to come up with a much more elegant design.

Also the Z80 had more than twice as many transistors as the 6502 (8500 for the Z80 vs 3500 for 6502).

I still prefer programming the Z80 over the 6502 though :)

show 3 replies
stevekemptoday at 2:55 PM

I cut my teeth writing assembly on a ZX Spectrum (mostly hacking games for infinite lives, etc).

Over the past couple of years I've gone back to the Z80, working on CP/M emulation, testing, and similar things. It's fun to play the old infocom games, and mess around with BIOSes when all you have is 64k.

There's a lot of good CP/M reference material out there, and numerous emulators to run it on modern systems