DAA¶
- DAA
- Decimal Adjust Accumulator
- Description
- Does cool stuff with binary-coded decimal.
- Uses
- Probably useful for BCD arithmetic?
- Results
Register/Flag 8-bit S
flagSet to the 7th bit of the result Z
flagSet if the result is 0; else reset H
flagReally complicated P/V
flagSet if the result has even parity; else reset N
flagNot affected C
flagReally complicated - Allowed Instructions
Instruction Opcode CC (ADL/non-ADL) CC (.S) CC (.L) daa $27 1F X X - Notes
- When using CP with signed integers, the flags are set as follows:
Z
meansM
=N
NZ
meansM
≠N
C
meansM
<N
NC
meansM
≥N
- See Also
- ADD, ADC, RLD, RRD, SBC, SUB