You are here : assembly8086DAA

DAA - 8086

Decimal adjust After Addition. Corrects the result of addition of two packed BCD values.

Algorithm

If lower nibble of AL > 9 or AF = 1 then  AL=AL+6 & AF = 1

else if AL > 9Fh or CF = 1 then : AL = AL + 60h & CF = 1


Syntax

DAA


Example

MOV AL, 0Fh  ; AL = 0Fh (15)
DAA          ; AL = 15h
RET


Output / Return Value


Limitations


Alternatives / See Also


Reference