IMUL

INTEGER MULTIPLY IMUL

Operation:

 

Flags Affected:

(OEST) - (LSRC) * (RSRC) where

CF, OF

* is signed multiply

AF, PF, SF, ZF undefined

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

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.

Encoding:

11111 011 w 1mod 1 01 rIm 1

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

Page 114
Image 114
Intel 210200-002 manual Integer Multiply Imul