
Programming the Z80
by Rodnay Zaks · first published 1979
15mentions
8recommended by
12HN commenters
2010–2026first – last mentioned
67% recommend33% neutral
Why HN recommends it
A thorough guide to the Z80 covering architecture, instruction fetching and decoding, and clock behavior alongside assembly programming; suits anyone wanting to learn how hardware and machine code work.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.






A good reference for Z80 programming is Rodnay Zaks' Programming the Z80. On page 94 at the start of the chapter Basic Programming Techniques there's a section on 8-bit addition. The program is as follows: LD A,(ADR1) LOAD OP1 INTO A LD HL,ADR2…
on “Z80 arithmetic: also surprisingly terrible (2018)” ↗…going to use a Z80, since that's one I'm familiar with. 2) Get hold of a good book, making sure it includes a section that exhaustively describes each instruction and the machine code for each. Eg. "Programming the Z80" by Rodnay Zaks. The microprocessor's datasheet will generally do if your familiar with other processors. 3) Read the book, cover to cover. 4) Make three vertical columns on a sheet of paper. 5) Write…
on “Manually creating an ELF executable” ↗"Programming the Z80" by Rodnay Zaks. I read it when it was first published, and it was the first real programming book I'd ever read. I'd written programs before this, inventing my own language and hardware, then emulating…
on “Ask HN: Which book introduced you to programming?” ↗…wrote assembly on paper and hand-translated into machine code. It's such a different world now, being able to order online, if not download instantly, just about everything. I came across Rodney Zaks' Programming the Z80 about 10 years ago in a second hand shop and it was like seeing the Holy Grail—a legendary book I never imagined I'd ever see a copy of, much less own.
on “Nepalese student learns HTML, JavaScript, CSS using just a mobile phone” ↗Happy birthday! The Z80 was the first CPU I rode, more luxurious than the subsequent 6502 and 6510. I still have a TI calculator with a low-energy Z80. Cheers to Rodnay Zaks for "Programming the Z80"!
on “The Zilog Z80 has turned 50” ↗Rodney Zaks wrote the definitive guide to the Z80: https://en.wikipedia.org/wiki/Programming_the_Z80
on “The Complete Spectrum ROM Disassembly” ↗> Rodney Zak's "Programming the Z80" The first and still the best programming book I ever read. It taught me architecture, instruction fetching and decoding, how the clock comes into it, as well as the usual assembly programming. I loved…
on “Disassembly of Pokémon Red” ↗…in the mid 80s without ever seeing any books about either. Not sure how, picked up bits and pieces from computer magazines in libraries. A few years ago in a 2nd hand bookstore I finally laid eyes on Programming the Z80, which I'd heard about but never seen, and I was like "OMG, I would've given a leg to have had that in 1985!" Life with LibGen (and StackExchange) is so vastly different to my childhood isolation from…
on “Learning to program is getting harder” ↗Rodney Zack's "Programming the Z80". Yes, I'm that old :) As a side note, it's still an excellent book to learn the workings of computer hardware.
on “Which programming book you just couldn’t stop reading from start to end?” ↗…then instantly download anything they reference. Most software is free too.. I love it, but it's hard not to imagine how very different my childhood would've been. I came across a copy of Zaks' fabled Programming the Z80 in a bookshop a few years ago, which I'd never seen before in person, and I was like My god, I would've given a leg for this 30 years ago.
on “Things I’ve learned in 20 years of programming” ↗…hacking ever since. I still miss those days of actually counting the clock cycles of different instruction combinations to find the most efficient code via the look-up tables in the back of Rodnay Zak's "Programming the Z80". Oh, and we had to manually enter the hex codes of the instructions to write those programs - before there was a decent assembler available. I recall adding a full-size mechanical keyboard, a 16KB…
on “5 March 1981: The ZX81 home computer launches with 1kb memory” ↗Not the author but I bought a book about assembler for my Sinclair ZX81. I just discovered it's got a Wikipedia page https://en.wikipedia.org/wiki/Programming_the_Z80 Edit: wow, see this comment of elvis70 > The author has made his book freely available : http://www.z80.info/zaks.html
on “My first Z80 assembly language program” ↗…from a limited subset of BASIC to Z80 machine code. No assembler, no linker, no loader, just a straight conversion from BASIC source to Z80 machine code residing in memory. Added in edit: Radnay Zaks, "Programming the Z80", first published 1979. The subset of BASIC was enough to actually write the compiler, and I remember adding the DATA and READ statements to the compiler, then using them, and the net result was smaller.…
I didn't really get past the 'ineffective fumbling', alas. Got good at BASIC programming on the ZX Spectrum, and read that (I think) Matthew Smith learned Assembly by reading 'Programming the Z80' by Zaks. So I got that for Christmas one year, and got totally drowned by it; had three concerted attempts to understand it, and while I had some idea, it wasn't enough to get going. Decided I was…
on “How I learned to program” ↗I guess my buckets are different. I have CPU books (eg. Programming the Z80), language books (eg. K&R), sysadmin books (a bunch of old O'Reilly), operating systems (VMS, Multics, Unix, Windows, BeOS, QNX, etc), a heap of GUI toolkit books (X11, Qt, Tk). History and culture (Soul…
on “Does Your Office Have a Library?” ↗