Extended addressing, Indexed addressing, Extended addressing indexed addressing – Zilog Z08470 User Manual
Page 48: Figure 29. extended addressing mode, Figure 30. indexed addressing mode

Z80 CPU Instructions
UM008007-0715
36
Z80 CPU
User Manual
Extended Addressing
Extended Addressing provides for two bytes (16 bits) of address to be included in the
instruction. This data can be an address to which a program can jump or it can be an
address at which an operand is located.
Extended addressing is required for a program to jump from any location in memory to
any other location, or load and store data in any memory location.
During extended addressing use, specify the source or destination address of an operand.
This notation (nn) is used to indicate the contents of memory at nn, in which nn is the 16-
bit address specified in the instruction. The two bytes of address nn are used as a pointer to
a memory location. The parentheses always indicates that the value enclosed within them
is used as a pointer to a memory location. For example, (1200) refers to the contents of
memory at location 1200.
Indexed Addressing
In the Indexed Addressing Mode, the byte of data following the op code contains a dis-
placement that is added to one of the two index registers (the op code specifies which
index register is used) to form a pointer to memory. The contents of the index register are
not altered by this operation.
An example of an indexed instruction is to load the contents of the memory location
(Index Register + Displacement) into the Accumulator. The displacement is a signed two’s
Figure 29. Extended Addressing Mode
Figure 30. Indexed Addressing Mode
Op Code
One or
Two Bytes
low-order Address to low-order Operand
high-order Address to low-order Operand
Op Code
Op Code
Displacement
Two-Byte Op Code
Operand added to index register
to form a pointer to memory