r0mheat z80 lessons

Z80 reference

Trainer

Loading…

How to read this page

Each instruction lists its forms. Bytes shows the encoding: n is a byte value, lo hi a 16-bit value with the low byte first, d a signed index offset (−128 to 127), e a relative jump offset. T is the number of clock cycles, measured on the emulator of this trainer. Two numbers such as 12/7 mean: 12 when the jump is taken or the block instruction repeats, 7 when not.

Forms marked undocumented work on a real Z80, but Zilog did not document them. Programs for other assemblers may not accept them.

Registers

Flags (register F)

Conditions

Addressing modes

Idioms

Short ways to do common jobs. Bytes and T-states are added up from the measured forms below; 13/8 means 13 when the jump is taken or the block repeats, 8 when not.