29 lines
2.1 KiB
Markdown
Executable File
29 lines
2.1 KiB
Markdown
Executable File
MUL - Unsigned Multiply
|
||
|
||
## Description
|
||
|
||
Performs an unsigned multiplication of the first operand (destination operand) and the second operand (source operand) and stores the result in
|
||
the destination operand. The destination operand is an implied operand located in register AL, AX or EAX (depending on the size of the operand).
|
||
The source operand is located in a general-purpose register or a memory location.
|
||
|
||
## Instruction
|
||
|
||
| Opcode | Assembly | Op/En | Modern Mode | Legacy Mode | Description |
|
||
|---------------|-----------|-------|-------------|-------------|------------------------------------------------------------------------------|
|
||
| F6 /4 | MUL r/m8 | M | Valid | Valid | Unsigned multiply (AX=AL*r/m8). |
|
||
| REX + F6 /4 | MUL r/m8* | M | Valid | N.E. | Unsigned multiply (AX=AL*r/m8). |
|
||
| F7 /4 | MUL r/m16 | M | Valid | Valid | Unsigned multiply (DX:AX=AX*r/m16). |
|
||
| F7 /4 | MUL r/m32 | M | Valid | Valid | Unsigned multiply (EDX:EAX=EAX*r/m32). |
|
||
| REX.W + F7 /4 | MUL r/m64 | M | Valid | N.E. | Unsigned multiply (RDX:RAX=RAX*r/m64). |
|
||
|
||
- In 64-bit mode, r/m8 can not be encoded to access the following byte registers if a REX prefix is used: AH, BH, CH, DH.
|
||
|
||
## Information
|
||
|
||
The result is stored in register AX, register pair DX:AX, or register pair EDX:EAX (depending on the operand size), with the high-order bits of
|
||
the product contained in register AH, DX, or EDX, respectively. If the high-order bits of the product are 0, the CF and OF flags are cleared;
|
||
otherwise, the flags are set.
|
||
|
||
In 64-bit mode, the instruction’s default operation size is 32 bits. Use of the REX.R prefix permits access to additional registers (R8-R15).
|
||
Use of the REX.W prefix promotes operation to 64 bits.
|