AAS
ASCII ADJUST
FOR SUBTRACTION
AAS
Operation:
if ((AL) &
OFH)
>9
or (AF) = 1 then
(AL)
+-
(AL)
- 6
(AH)
+-
(AH)-1
(AF)
+-1
(CF) +-
(AF)
(AL)
~
(AL) &
OFH
Description:
AAS (ASCII Adjust for Subtraction) corrects
the result of a previous subtraction
of
two
valid unpacked decimal operands (the destina-
tion operand must have been specified as
Encoding:
1001111111
Flags
Affected:
AF,CF.
OF,
PF,
SF,
ZF
undefined
register AL). AAS changes the content
of
AL
to a valid unpacked decimal number; the high-
order half-byte
is
zeroed. AAS updates
AF
and CF; the content
of
OF,
PF,
SF and ZF
is
undefined following execution
of
AAS.
AAS Operands Clocks
Transfers Bytes
AAS Coding Example
(no operands)
4
-
1
AAS
2-52