r0mheat z80 lessons · interactive course

Learn how a Z80 runs a program

Follow assembly one instruction at a time. Watch the program counter fetch bytes, registers change, flags respond, and memory receive data.

A clear path through the material

New to number systems? Begin with bits. Then follow the numbered lessons in order. Hardware pages are useful references at any point.

  1. Binary and hexadecimal
  2. Registers and flags
  3. Run the first program

Number basics

Build the ideas used by assembly

Bits are the values the CPU stores and changes. These pages explain binary, hexadecimal, signed values, and the addresses used to find data.

Hardware references

Open these alongside any lesson

See the Z80’s register set and flags, then follow address, data, control, and clock signals between the CPU and the rest of the computer.

Course roadmap

Lessons 00–26 · follow the numbers

Each lesson builds on earlier instructions. Use Step to execute one instruction, Run to watch the program, or Step back to inspect a previous state.

Foundations

Lessons 00–03

Loops, memory and CPU tools

Lessons 04–13

Text, numbers and data

Lessons 14–19

Search and algorithms

Lessons 20–22

Interrupts and project

Lessons 23–25

Program files and memory

Lessons 26–26