80386 Programmer's Reference Manual -- Opcode AAD

AAD -- ASCII Adjust AX before Division

OpcodeInstructionClocks DescriptionExample
D5 0Aaad 19 ASCII adjust AX before divisionaad


AL := AH * 10 + AL;
AH := 0;


AAD is used to prepare two unpacked BCD digits (the least-significant digit in AL, the most-significant digit in AH) for a division operation that will yield an unpacked result. This is accomplished by setting AL to AL + (10 * AH), and then setting AH to 0. AX is then equal to the binary equivalent of the original unpacked two-digit number.

Flags Affected

SF, ZF, and PF as described in Appendix C; OF, AF, and CF are undefined

Protected Mode Exceptions


Real Address Mode Exceptions


Virtual 8086 Mode Exceptions


[Home Page dell'ITIS "Fermi"] [80386 Programmer's Reference Manual Index] [Previous] [Next]