EasyManuals Logo

ZiLOG eZ80 User Manual

Default Icon
411 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 #138 background imageLoading...
Page #138 background image
eZ80
®
CPU
User Manual
UM007714-0908 CPU Instruction Set
129
DAA
Decimal Adjust Accumulator
Operation
A Decimal Adjust (A)
Description
This instruction conditionally adjusts the accumulator, A, following addition and subtrac-
tion operations on binary-coded-decimal (BCD) values. For addition (
ADD
,
ADC
,
INC
)
or subtraction (
SUB
,
SBC
,
DEC
,
NEG
), Table 51 indicates the operation performed by
the
DAA
instruction.
Condition Bits Affected
Table 51. Operations of the DAA Instruction
Operation
C Before
DAA
Hex
Value in
Upper
Digit
(Bits 7:4)
H Before
DAA
Hex
Value in
Lower
Digit
(Bits 3:0)
Number
Added to
Byte
C After
DAA
H After
DAA
ADD, ADC,
or INC
0 0–9 0 0–9 00 0 0
0080AF0601
0 0–9 1 0–3 06 0 0
0 A–F 0 0–9 60 1 0
09F0AF6611
0 A–F 1 0–3 66 1 0
1 0–2 0 0–9 60 1 0
1020AF6611
1 0–3 1 0–3 66 1 0
SUB, SBC,
DEC, or
NEG
0 0–9 0 0–9 00 0 0
00816FFA00
17F009A010
1 6–F 1 6–F 9A 1 0
S Set if the msb of the result is 1 after the operation; reset
otherwise.
Z Set if result is 0; reset otherwise.
H See
Table 51.

Questions and Answers:

Question and Answer IconNeed help?

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

ZiLOG eZ80 Specifications

General IconGeneral
BrandZiLOG
ModeleZ80
CategoryComputer Hardware
LanguageEnglish

Related product manuals