Undocumented OpCodes: AAD


AAD - D5 IMM8 - ASCII Adjust before Division


Undocumented:  Available to all Intel x86 processors
               Useful in production source code.
                                                              AAD
Flags:                               ASCII Adjust before Division
+-+-+-+-+-+-+-+-+-+                       +----------+----------+
|O|D|I|T|S|Z|A|P|C|                       | 11010101 |   DATA   |
+-+-+-+-+-+-+-+-+-+                       +----------+----------+
|+| | | |+|+|+|+|+|                       |    D5    |     IMM8 |
+-+-+-+-+-+-+-+-+-+                       +----------+----------+

This instruction is the multiplication counterpart to AAM. As is the case with AAM, AAD uses the second byte as an operand. This operand is the multiplicand for AAD. Like AAM, AAD provides a way to execute a MUL IMM8 that is unavailable through any other means in the CPU. Unlike MUL, or IMUL, AAD sets all of the CPU status flags according to the result. Intel states that the Overflow Flag (OF), Auxiliary carry Flag (AF), and Carry Flag (CF) are undefined. This assertion is incorrect. These flags are fully defined, and are set consistently with respect to any other integer operations. And again, like AMM, beginning with the Pentium, Intel has finally acknowledged the existence of the second byte of this instruction as its operand. Intel says:

This instruction exists in this form on all Intel x86 processors. See the file AAD.ASM for diagnostics source code for this instruction.


Get description of        [AAM]        [SALC]       [ICEBP]      [UMOV]       [LOADALL]
New P6 OpCodes            [CMOV]       [FCMOV]      [FCOMI]      [RDPMC]
                          [INT01]      [SALC]       [UD2]

Download this file -- OpCodes.ZIP
ftp://ftp.x86.org/pub/x86/dloads/OPCODES.ZIP


Return to 
theIntel
Secrets home page



© 1991-1999 Intel Secrets Web Site and Robert Collins. PGP key available.

Make no mistake!
This web site is proud to provide superior information and service without any affiliation to Intel Corporation.

"Intel Secrets", "What Intel doesn't want you to know" and anything with a dropped e in it, are phrases that infuriate Intel Corporation.

Pentium, Intel, and the letter "I" are registered trademarks of Intel Corporation. 386, 486, 586, P6, all other letters, and all other numbers are not!
All other trademarks are those of their respective companies. See Trademarks and Disclaimers for more info.

Robert Collins works somewhere in the United States of America. Robert may be reached via email or telephone.