Function:
This instruction regularly performs the following action:
- unpacked BCD in AX example (AX = 0104h)
- AL = AH * 10d + AL (AL = 0eh )
- AH = 00 (AH = 00h )
The normal opcode decodes as follows: d5,0a
The instruction itself is an instruction plus operand. By replacing the
second byte with any number in the range 00 - ff you can build your own
instruction AAD for various number systems in those ranges. For example
by coding d5,10 you achieve an instruction that performs:
- AL = AH * 16d + AL.
- AH = 00
This feature of Intel's chips can be used to determine whether there is
a true Intel CPU installed in a system.
(NEC difference supplied by Anthony Naggs)
AAM Adjust After BCD Multiplication
──────────────────────────────────────────────────────────────────────────────