DAA¶
- DAA
- Decimal Adjust Accumulator
- Description
- Does cool stuff with binary-coded decimal.
- Uses
- Probably useful for BCD arithmetic?
- Results
Register/Flag 8-bit SflagSet to the 7th bit of the result ZflagSet if the result is 0; else reset HflagReally complicated P/VflagSet if the result has even parity; else reset NflagNot affected CflagReally 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:
ZmeansM=NNZmeansM≠NCmeansM<NNCmeansM≥N
- See Also
- ADD, ADC, RLD, RRD, SBC, SUB