You are here : assembly8086DAS

DAS - 8086

Decimal adjust After Subtraction. Corrects the result of subtraction of two packed BCD values. 

Algorithm: 

If low 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

DAS


Example

MOV AL, 0FFh  ; AL = 0FFh (-1)
DAS           ; AL = 99h, CF = 1
RET


Output / Return Value


Limitations


Alternatives / See Also


Reference