THE
80286
INSTRUCTION SET
DAS-Decimal
Adjust
AL
After Subtraction
Opcode Instruction
Clocks
Description
2F DAS
3 Decimal adjust
AL
after subtraction
FLAGS MODIFIED
Sign, zero, auxiliary carry, parity, carry
FLAGS UNDEFINED
Overflow
OPERATION
DAS should be executed only after a subtraction instruction which leaves a two-BCD-digit byte result
in
the AL register. The operands should consist of
two
packed BCD digits. In this case, the DAS
instruction
will
adjust AL
to
contain the correct packed two-digit decimal result.
The precise definition of
DAS
is
as
follows:
1.
If
the lower four bits of AL are greater than
9,
or
if the auxiliary carry flag
is
1,
then decrement
AL
by
6,
and set the auxiliary carry flag. Otherwise, reset the auxiliary carry flag.
2.
If
AL
is
now
greater than 9FH,
or
if the carry flag
is
set, then decrement AL
by
60H, and set the
carry flag. Otherwise, clear the carry flag.
PROTECTED MODE EXCEPTIONS
None
REAL ADDRESS MODE EXCEPTIONS
None
8-37