EasyManuals Logo

ZiLOG Z80 Handbook

ZiLOG Z80
297 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #43 background imageLoading...
Page #43 background image
REGISTER INDIRECT ADDRESSING
Instructions in this group include the original 8008 instructions
that utilized the H and L register pair (High and Low) as a mem-
ory address pointer. In the 8008, data in memory could only be ad-
dressed by the HL pointer. The 8080 added the capability to use
register pairs B,C and D,E as pointers and also added the capabil-
ity of Extended Addressing, where each memory location could be
individually addressed. Register Indirect Addressing is a detriment
where data must be addressed in random (noncontiguous) memory
locations. When data is grouped in contiguous blocks, such as tables
or strings, however, accessing data by the pointer method is some-
what more efficient. The reason for the inefficiency in accessing
random memory locations is that the pointer register must be loaded
with the address of the new byte of data to be accessed before each
instruction of this kind is executed. Access of contiguous data is
made simpler by instructions that automatically increment and dec-
rement by one the register pairs used as pointers. The two proce-
dures for accessing blocks of random and contiguous data are shown
in Table 4-1, along with the relative times. Note that the examples
are for illustrative purposes only to point out the deficiencies in
register indirect addressing; the Z-80 has more eff
icient ways to ac-
cess data and they will be described later in this chapter.
Table 4
-
1. Data Access Using Register Indirect Addressing Charts
THIRD DATA BYTE
FIRST DATA BYTE
SECOND DATA BYTE
FOURTH DATA BYTE
RANDOM ACCESS
1. LOAD DATA POINTER WITH ADDRESS OF
NEXT DATA BYTE
(
5 UNITS).
2. LOAD BYTE USING REGISTER INDIRECT
ADDRESSING (3.5).
3. PROCESS DATA BYTE (X).
4. DONE? IF NOT
. GO TO 1(7).
5. DONE.
X + 15.5 UNITSIBYTE
CALL & RTN
FIRST DATA BYTE
SECOND DATA BYTE
THIRD DATA BYTE
FOURTH DATA BYTE
LAST DATA BYTE
SEQUENTIAL
(
CONTIGUOUS
)
ACCESS
1. LOAD DATA POINTER WITH START OF DATA.
2. LOAD BYTE USING REGISTER INDIRECT
ADDRESSING (3.5).
3. PROCESS DATA BYTE (X).
4. BUMP REGISTER POINTER BY 1(2.5).
5. DONE? IF NOT, GO TO 2 )7).
6. DONE.
X + 13 UNITSIBYTE
46

Other manuals for ZiLOG Z80

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ZiLOG Z80 and is the answer not in the manual?

ZiLOG Z80 Specifications

General IconGeneral
ManufacturerZiLOG
Introduction Year1976
Clock Speed2.5 MHz to 20 MHz
Data Width8-bit
Address Width16-bit
Instruction SetZ80
Transistor Count8, 500
Package40-pin DIP
CategoryMicroprocessor
Memory Address Space64 KB
Voltage Supply5V

Related product manuals