[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
AAD ASCII Adjust before Division Flags: O D I T S Z A P C
? * * ? * ?
AAD
Logic: AL . AH * 10 + AL
AH . 0
AAD converts the unpacked two-digit BCD number in AX into binary in
preparation for a division using DIV or IDIV, which require binary
rather than BCD numbers.
--------------------------------------------------------------------------
Operands Clocks Transfers Bytes Example
no operands 60 - 2 AAD
--------------------------------------------------------------------------
AAD modifies the numerator in AL so that the result produced by a
division will be a valid unpacked BCD number. For the subsequent DIV
to produce the correct result, AH must be 0. After the division, the
quotient is returned in AL, and the remainder in AH. Both high-order
nibbles are zeroed.
Note: Unpacked BCD stores one digit per byte; AH contains
the most-significant digit and AL the least-
significant digit.
See Also:
AAA
AAS
AAM
DIV
IDIV
Flags
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson