----------------------------------
Z-80 MICROPROCESSOR
INTERNAL
SYSTEM
CONTROL
SIGNALS
DATA BUS
DATA
ALU BUS
CONTROL
CPU
REGISTERS
NSTRUCTION
REGISTER
I
CPU
SYSTEM
CONTROL
SIGNALS
ADDRESS
BUS
CONTROL
INTERNAL
CONTROL
`---------------------------------'
B
D
H
IX
E
L
R
IY
SP
PC
B
D'
FLAG S'
C'
E'
Fig. 2-1
.
Z-80 Microprocessor architecture.
16-BIT
ADDRESS
BUS
binations
of A and F and the
remaining six general
-purpose
registers
are shown in Fig. 2-2.
The advantage in two blocks of general-purpose registers is that
a programmer may rapidly switch from one block to another. In the
simplest case,
this provides more register storage in the CPU. Reg-
ister
storage in the CPU is to be preferred over storage in memory
as data can be accessed by a program much more rapidly from CPU
registers than from external memory. In a more sophisticated use of
the block switching capability, the unused set of registers may be
used to hold the
environment
after receiving an
interrupt.
This con-
cept will be discussed in a later chapter in this section.
Just
as in
the 8080, the general-purpose registers are somewhat
specialized in function. Eight bits of data may be moved between
memory and any of the seven registers or from one register to the
next. Arithmetic and logical operations, however, such as adding
two operands or exclusive ORing two operands can only be done
using the A register (or A') and another register or memory location.
FLAGS
C
^--^-
^
DATA
BUS
16