
Instruction Set
4-63
IMUL*
Multiply Integers
IMUL
What It Does
IMUL multiplies two integers.
Syntax
Description
IMUL operates on signed numbers (integers). The operation it performs depends on the
number of operands you specify. For example:
n
One operand: The operand you specify is the multiplicand. IMUL assumes that the
integer by which it is to be multiplied (the multiplier) is in AL or AX. (IMUL uses the
multiplier that is the same size as the multiplicand.)
IMUL places the product in AX or DX::AX. (The destination is always twice the size of
the multiplicand.)
n
Two operands: You specify the destination register for the product and the immediate
integer by which the multiplicand is to be multiplied (the multiplier). IMUL uses the
destination register as the multiplicand and then overwrites it with the product.
n
Three operands: This form of IMUL is the same as the two-operand form, except that
IMUL preserves the multiplicand. You specify the destination register for the product,
the multiplicand, and the immediate integer by which the multiplicand is to be multiplied
(the multiplier). IMUL preserves the multiplicand.
* – Integer immediate multiplies were not available on the original 8086/8088 systems.
Form
Opcode
Description
Clocks
Am186 Am188
IMUL
r/m8
F6
/5
AX=(r/m byte)•AL
25–28/31–34
25–28/31–34
IMUL
r/m16
F7
/5
DX::AX=(r/m word)•AX
34–37/40–43
34–37/44–47
IMUL
r16,r/m16,imm8
6B
/r ib
(word register)=(r/m word)•(sign-ext. byte integer)
22–25
22–25
IMUL
r16,imm8
6B
/r ib
(word register)=(word register)•(sign-ext. byte integer)
22–25
22–25
IMUL
r16,r/m16,imm16
69
/r iw
(word register)=(r/m word)•(sign-ext. word integer)
29–32
29–32
IMUL
r16,imm16
69
/r iw
(word register)=(word register)•(sign-ext. word integer)
29–32
29–32
IMUL
multiplicand
IMUL
product,multiplicand,multiplier
IMUL
product,multiplier
Use this form to multiply an integer in
memory or in a register by AL or AX,
and store the result in AX or DX::AX.
Use this form to multiply an integer in
memory or in a register by an
immediate integer, and specify the
register in which to place the result.
Use this form to multiply an integer
in a register by an immediate
integer, and overwrite the register
with the result.
Содержание Am186 Series
Страница 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Страница 10: ...Table of Contents x...
Страница 18: ...Programming 1 8...
Страница 40: ...Instruction Set Listing 3 14...