IA-32 Assembly Language Reference Manual

ASCII Adjust AX before Division (aad)

aad

Operation

AL + (AH x 10) -> AL 0 -> AH

Description

aad prepares two unpacked BCD digits for a division operation that yields an unpacked result. The least-significant digit is in AL; the most-significant in AH.

aad prepares the AL and AH registers:

AL + (AH x 10) -> AL
 0 -> AH

AX is then equal to the binary equivalent of the original unpacked two-digit BCD number.

Example

Adjust the AL and AH registers for a division operation by setting the AX register equal to the original unpacked two-digit number:

aad