Intel 210200-002 Baby Furniture User Manual


 
IMUL
INTEGER MULTIPLY
IMUL
Operation:
(OEST) - (LSRC) * (RSRC)
where
* is
signed
multiply
if
(ext) =
sign-extension
of
(LOW)
then
(CF) - a
else
(CF)
-1
;
(OF) - (CF)
Description:
IMULsource
IMUL (Integer Multiply) performs a signed
multiplication of the source operand and the
accumulator.
If
the source
is
a byte, then it
is
multiplied by register AL, and the double-
length result
is
returned in AH and AL.
If
the
source
is
a word, then it
is
multiplied by
register AX, and the double-length result
is
returned in registers DX and AX.
If
the upper
Encoding:
11111
011
w 1
mod
1 01 rIm 1
Flags
Affected:
CF, OF
AF, PF, SF, ZF
undefined
half of the result (AH for byte source, DX for
word source)
is
not the sign extension of the
lower half of the result, CF and
OF are set;
otherwise they are cleared. When CF and
OF
are set, they indicate that
AH
or DX contains
significant digits of the result. The content of
AF,
PF, SF and ZF
is
undefined following
exe-
cution of IMUL.
if
w = 0
then
LSRC =
AL,
RSRC = EA, OEST =
AH,
EXT =
AH,
LOW =
AL
else
LSRC = AX, RSRC = EA, OEST = OX:AX, EXT =
OX,
LOW = AX
IMUL Operands Clocks
Transfers
Bytes
IMUL Coding Example
reg8
80-98
- 2
IMULCL
reg16
128-154
- 2
IMUL
BX
mem8
(86-104)
+
EA
1
2-4
IMUL RATE_BYTE
mem16 (138-164)+
EA
1
2-4
IMUL RATE_WORD [BP]
[01]
2-79