AAD
ASCII
ADJUST
FOR
DIVISION
AAD
Operation:
(AL)
~
(A
H)
*
OAH
+ (AL)
(AH)
+-
0
Description:
AAD
(ASCII
Adjust
for Division) modifies
the
numerator
in
AL
before dividing two valid
unpacked decimal
operands
so
that
the quo-
tient produced by the division will be a valid
unpacked decimal
number.
AH
must be zero
Encoding:
1101010100001010
Flags Affected:
PF, SF, ZF.
AF, CF,
OF
undefined
for the subsequent DIY
to
produce the correct
result.
The
quotient
is
returned in
AL,
and the
remainder
is
returned in
AH;
both
high-order
half-bytes are zeroed.
AAD
updates
PF,
SF
and ZF; the
content
of
AF,
CF
and
OF
is
undefined following execution
of
AAD.
AAD Operands
Clocks Transfers Bytes
AAD
Coding Example
(no
operands)
60
-
2
AAD
2-50