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 #48 background imageLoading...
Page #48 background image
The indexing operation is powerful because many programs must
have the ability to process
tables
or
lists
of data in memory. Ex-
amples of the use of indexing are provided in section II. Instruction
groups using the indexed addressing mode are the 8-Bit Load, 8-Bit
LD IIY + DI, N LOAD LOCATION IIY + DI WITH VALUE N
BYTE 3
BYTE 2
BYTE 1
BYTE 0
1 1 1 1 1 1 0 1
0 0
1 1 0 1 1 0
0 1
0 0 0 0 0 0
N
OP CODE
(M 1003H
D = 40H
EFFECTIVE
ADDRESS - 1040H
D=40H
VALUE TO BE STORED
Fig. 4-18. Indexed addressing example.
Arithmetic and Logical, Rotate and Shift, and Bit, Set, Reset, and
Test Groups.
BIT ADDRESSING
The last addressing group is the bit addressing group. Bit address-
ing is used in conjunction with the previous addressing modes to
provide testing, setting, or resetting any one of the 8-bits in an
operand. These operations would have to be performed by as many
as three instructions in the 8080 or other computers. An example
of this is provided for the SET B, (IX + D) instruction shown in
Fig. 4-19. The SET instruction sets a specified bit, and in this case
the address of the byte containing the bit to be set is given by
(IX + D), an indexed addressing operation. The bit specified in the
B field of the instruction will be set after the instruction has been
executed. No condition codes are affected. The bit to be set is as
follows:
B Field Bit to be Set
000 XXXXXXX 1
001 XXXXXX 1 X
010 XXXXX 1 XX
Oil XXXX 1 XXX
100 XXXIXXXX
101 XXIXXXXX
110 X 1 XXXXXX
111 1XXXXXXX
Other examples of the bit addressing mode are shown in Fig. 4-20,
which shows the "before" and "after" condition for various SET B,R
instructions specifying a bit set for CPU register C.
51

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