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
DAS
MOV AL, 0FFh ; AL = 0FFh (-1) DAS ; AL = 99h, CF = 1 RET