English
Language : 

Z86E3016PSG Datasheet, PDF (260/348 Pages) Zilog, Inc. – Z86E3016PSG
Z8 Family of Microcontrollers
User Manual
242
Decimal Adjust
DA dst
Instruction Format
OPC
dst
Cycles
8
8
OPC
(Hex)
40
41
Address Mode
dst
R
IR
Operation
dst ← DA dst
The destination operand is adjusted to form two 4-bit BCD digits follow-
ing a binary addition or subtraction operation on BCD encoded bytes. For
addition (ADD and ADC) or subtraction (SUB and SBC), the following
table indicates the operation performed.
Instruction
ADD
ADC
SUB
Carry
Before DA
0
0
0
0
0
0
1
1
1
0
0
Bits 7–4
Value
(Hex)
0–9
0–8
0–9
A–F
9–F
A–F
0–2
0–2
0–3
0–9
0–8
H Flag
Before DA
0
0
1
0
0
1
0
0
1
0
1
Bits 3–0
Value
(Hex)
0–9
A–F
0–3
0–9
A–F
0–3
0–9
A–F
0–3
0–9
6–F
Number
Added To
Byte
00
06
06
60
66
66
60
66
66
00
FA
Carry
After DA
0
0
0
1
1
1
1
1
1
0
0
Instruction Description
UM001602-0904