Z80 cpu instructions, Instruction types – Zilog Z08470 User Manual

Page 44

Advertising
background image

Z80 CPU Instructions

UM008007-0715

32

Z80 CPU
User Manual

Z80 CPU Instructions

The Z80 CPU can execute 158 different instruction types including all 78 of the 8080A
CPU. The instructions fall into these major groups:

Load and Exchange

Block Transfer and Search

Arithmetic and Logical

Rotate and Shift

Bit Manipulation (Set, Reset, Test)

Jump, Call, and Return

Input/Output

Basic CPU Control

Instruction Types

The load instructions move data internally among CPU registers or between CPU registers
and external memory. All of these instructions specify a source location from which the
data is to be moved, and a destination location. The source location is not altered by a load
instruction. Examples of load group instructions include moves between any of the gen-
eral-purpose registers such as move the data to Register B from Register C. This group
also includes load-immediate to any CPU register or to any external memory location.
Other types of load instructions allow transfer between CPU registers and memory loca-
tions. The exchange instructions can trade the contents of two registers.

A unique set of block transfer instructions is provided in the Z80 CPU. With a single
instruction, a block of memory of any size can be moved to any other location in memory.
This set of block moves is extremely valuable when processing large strings of data. With
a single instruction, a block of external memory of any required length can be searched for
any 8-bit character. When the character is found or the end of the block is reached, the
instruction automatically terminates. Both the block transfer and the block search instruc-
tions can be interrupted during their execution so they are not occupying the CPU for long
periods of time.

The arithmetic and logical instructions operate on data stored in the Accumulator and
other general-purpose CPU registers or external memory locations. The results of the
operations are placed in the Accumulator and the appropriate flags are set according to the
result of the operation.

Advertising
This manual is related to the following products: