Table of Contents Previous topic Next topic
MICROPROCESSOR INSTRUCTION REFERENCE->DA
DA Decimal Adjust Accumulator
DA adjust the eight bit value in the accumulator resulting from the earlier addition of two variable (each in packed-BCD format), producing two four bit digits. Any ADD or ADDC instruction may have been used to perform the addition.
If the contents of bits 0-3 are greater than nine or the auxiliary carry is set, the accumulator is incremented by six.
The four high-order bits are then checked and if bits 4-7 exceed nine or the carry is set, these bits are increased by six.
If an overflow occurs, the carry is set.
|Decimal adjust accumulator:||DA A||1||1|