Register addressing, Implied addressing, Register indirect addressing – Zilog Z08470 User Manual
Page 49: Figure 31. register indirect addressing mode
![background image](https://www.manualsdir.com/files/771210/content/doc049.png)
UM008007-0715
Register Addressing
Z80 CPU
User Manual
37
complement number. Indexed addressing greatly simplifies programs using tables of data
because the index register can point to the start of any table. Two index registers are pro-
vided because often operations require two or more tables. Indexed addressing also allows
for relocatable code.
The two index registers in the Z80 CPU are referred to as IX and IY. To indicate indexed
addressing, use the following notation:
(IX+d) or (IY+d)
In this notation, d is the displacement specified after the op code. The parentheses indicate
that this value is used as a pointer to external memory.
Register Addressing
Many of the Z80 op codes contain bits of information that specify which CPU register is to
be used for an operation. An example of register addressing is to load the data in Register
6 into Register C.
Implied Addressing
Implied addressing refers to operations in which the op code automatically implies one or
more CPU registers as containing the operands. An example is the set of arithmetic opera-
tions in which the Accumulator is always implied to be the destination of the results.
Register Indirect Addressing
This type of addressing specifies a 16-bit CPU register pair (such as HL) to be used as a
pointer to any location in memory. This type of instruction is powerful and it is used in a
wide range of applications.
An example of this type of instruction is to load the Accumulator with the data in the
memory location pointed to by the HL register contents. Indexed addressing is actually a
form of Register Indirect addressing except that a displacement is added with indexed
addressing. Register indirect addressing allows for powerful but simple to implement
memory accesses. The block move and search commands in the Z80 CPU are extensions
of this type of addressing in which automatic register incrementing, decrementing, and
comparing is added. The notation for indicating Register Indirect addressing is to put
Figure 31. Register Indirect Addressing Mode
Op Code
One or Two Bytes