The last instruction in this group is the DAA instruction. DAA,
or Decimal Adjust Accumulator, allows the Z-80 to perform binary-
coded decimal (bed) addition or subtraction. (The 8080 can per-
form only bed addition automatically.) The DAA is performed di-
rectly after an ADD, ADC, INC, SUB, SBC, DEC, or NEG and
changes the binary results of the operation into bed results. Bed
addition will be discussed in detail in Section II.
ADD HL,SS
0 0
S
1 0 0 1
Fi
5-13 Sixteen- bit arithmetic
g.
.
register encoding.
00
BC
01 - DE
10
HL
11 •SP
16-BIT ARITHMETIC GROUP
All of the instructions in this group operate on 16-bit double-
precision values in either register pairs BC, DE, or HL, or in 16-bit
SBC Ht, SP
1 1 1 0
7
17, 0 1
0 1 1 1 0
-
01 0
ADD IX, IX
1 1 0\1 1 1 0 1
0 0
1
1 O
i
l 0 0 1
1
I
16 BITS
IX
ALU
(ADD)
BITS
(16
SECOND OPERAND)
Fig. 5-14. Sixteen-bit arithmetic instruction examples.
75
Need help?
Do you have a question about the Z80 and is the answer not in the manual?
Questions and answers