At the heart of the Spectrum (and many other computers, such as the Amstrad CPC, MSX, CP/M machines and the Gameboy) is the Zilog Z80A CPU, which runs at approximately 3.5MHz.

The instruction set is large and comprehensive, which can make it intimidating. However, once you start learning, you soon learn patterns and realise that it is made up of just a few types of command, most of which are either for arithmetic or loading values from processor registers or memory. Indeed, there are so many that there are several sets; in addition to the normal 256, you can access three further sets of 256 by adding one of three prefixes. Some of these are undocumented and can be unreliable or incompatible on different version of the CPU or on different machines.

If the instruction requires a prefix or arguments, it may be longer than one byte, and it is possible for a single instruction to be up to five bytes in length.

Each instruction takes a certain number of CPU cycles to run, depending on the complexity and whether memory or I/O ports need to be accessed. In the case of our table, some of this timing information is currently unavailable, and so the value has been left blank.

Key
^    16-bit number (two bytes)
$    8-bit number (one byte)
%    2s comp offset (1 byte)

You can also download a version in Microsoft Excel format – Z80 instruction set with mnemonics, length and timing.

Credit for the information needs to go to Time Proofing and MSX Assembly Page. All information regarding the Z80 family of CPUs is copyright of Zilog.