Indirect Register Addressing (Ir); Indexed Addressing (X) - ZiLOG Z8 Technical Manual

Microcomputer
Hide thumbs Also See for Z8:
Table of Contents

Advertisement

Address Modes
4.3 INDIRECT REGISTER ADDRESSING (IR)
4.4
INDEXED ADDRESSING (X)
In the Indirect Register addressing mode, the con-
tents of the specified register is the address of
the operand (Figures 4-3 and 4-4).
Depending
upon
the
instruction
selected,
the
address points to a register, program memory, or
an external data memory location.
The Indexed addressing mode is used only by the
Load (LD) instruction. An indexed address consists
of a register address offset by the contents of a
designated working register (the Index).
This
offset is added to the register address to obtain
the address of the operand.
Figure 4-5 illus-
trates this addressing convention.
When accessing program memory or external data
memory, register pairs or working register pairs
are used to hold the 16-bit addresses.
8·BIT REGISTER
FILE ADDRESS
PROGRAM MEMORY
REGISTER FILE
't~====~d~s~t====~~-;~~~)Q~~~~~~~t:;~~~~~==~
ONE.OPERAND
OPCODE
POINTS TO ONE REGISTER
INSTRUCTION
IN REGISTER FILE
EXAMPLE
ADDRESS OF
OPERAND USED
BY INSTRUCTION
VALUE USED IN
INTRODUCTION
EXECUTION
OPERAND
Figure 4-3.
Indirect Register Addressing to Register File
4·BIT WORKING
REGISTER ADDRESS
INSTRUCTION EXAMPLE
REFERENCES EITHER
PROGRAM MEMORY
src
PROGRAM MEMORY
A--~~";;;';;~-~
OR DATA MEMORY
POINTS TO WORKING
REGISTER PAIR
(EVEN ADDRESS)
REGISTER FILE
RP
REGISTER
PAIR
PROGRAM MEMORY
OR
DATA MEMORY
Figure 4-4.
Indirect Register Addressing to Program or Data Memory
POINTS TO
ORIGIN OF
WORKING
REGISTER
GROUP
16·BIT
ADDRESS
POINTS TO
PROGRAM
OR DATA
MEMORY
4-2
3047·075, 3047·076

Advertisement

Table of Contents
loading

Table of Contents