<<< MUL Instruction | Index | IMUL Instruction >>> |
The MUL instruction sets the Carry and Overflow flags if the upper half of the product is not equal to zero.
The Carry flag CF is normally used for unsigned arithmetic.
For example,
when AX is multiplied by a l6-bit operand, the product is stored in DX:AX.
If DX is not equal to zero, the Carry flag is set.
To multiply
0l00h × 2000h
we could use the following fragment:
.DATA one WORD 2000h two WORD 0100h .CODE mov ax, [one] mul [two] ; CF = 1, producing 0020h:0000h in DX:AX
<<< MUL Instruction | Index | IMUL Instruction >>> |