Intel and compatable CPU's Programming Information
prev: DAA Decimal Adjust AL after Addition
next: DEC Decrement by 1
DAS -- Decimal Adjust AL after Subtraction
Opcode Instruction Clocks Description 2F DAS 4 Decimal adjust AL after subtraction
IF (AL AND 0FH) > 9 OR AF = 1 THEN AL := AL - 6; AF := 1; ELSE AF := 0; FI; IF (AL > 9FH) OR (CF = 1) THEN AL := AL - 60H; CF := 1; ELSE CF := 0; FI;
DescriptionExecute DAS only after a subtraction instruction that leaves a two-BCD-digit byte result in the AL register. The operands should consist of two packed BCD digits. DAS adjusts AL to contain the correct packed two-digit decimal result.
Flags AffectedAF and CF as described above; SF, ZF, and PF as described in Appendix C.
Protected Mode ExceptionsNone
Real Address Mode ExceptionsNone
Virtual 8086 Mode ExceptionsNone