Z80 Instruction Timings

The list below gives all the Z80 instructions (including as many of the undocumented ones that I know of) with their timings and effects on the flags register.

Where similar instructions have the same timings and flag results I've separated the alternate forms with a "/". e.g. "CP (HL) /n" represents both "CP (HL)" and "CP n" (where n is an 8-bit value). Where two timings are listed for an opcode, the first is when the test condition is matched and the second when it isn't (for block operations, this means the implicit jump back to repeat).

At a later stage I will also add the machine state timings, possibly denoting where the fetch/execute overlap occurs.

Note: As well as the normal 8-bit registers "r" also represents the two halves, IXH, IXL, IYH or IYL of the 16-bit index registers.

Note on contended Memory:

On all models of the ZX Spectrum, when the graphic display area in the middle of the screen is being drawn, the Z80 is blocked for up to 6 t-states. This means that any memory I/O in the first page of RAM (0x4000-0x7fff) will run slower. When writing high-performance display routines, try to synchronise it with the display refresh interrupt and do all memory accesses when the border colour is being sent to the TV. On the 48K model you can also monitor the floating-bus (input from port 255) to check the horizontal refresh status.

The precise timings for memory contention vary depending on whether it's a pre-issue 3 48k model or not or a 128K toastrack/+2/ or +2A/+3.

Z80 Timings