DAA

Name

Decimal Adjust Accumulator

Function

If the contents of the accumulator are greater than 9, or if
the carry bit = 1, the accumulator is incremented by 6.
Otherwise, the accumulator is not affected.

Syntax

DAA

Assembled

Binary

11111011

Decimal

251

Hexadecimal

0xFB

Symbolic

../../_images/daa-sym.png

Execution

1 word, 8-bit code and an execution time of 10.3 \({\mu}\) sec

Side-effects

As Described

Implemented

daa

Detailed Description

If the contents of the accumulator are greater than 9, or if the carry bit = 1, the accumulator is incremented by 6.

Otherwise, the accumulator is not affected.

If the result of incrementing the accumulator produces a carry out of the high order bit position, the cary bit is set.

Otherwise the carry bit is unaffected (in particular it is not reset).

Notes

This instruction is used when adding decimal numbers. For an example of this see Decimal Addition:

The opcode for this instruction does not contain any additional data:

../../_images/daa.png