Instruction Set
4-66
IMUL
IMUL
Tips
Use SAL instead of IMUL to multiply integers by powers of 2. When multiplying an integer
by a power of 2, it is faster to use SAL than IMUL.
When using the single-operand form of IMUL, you can often ignore the high half of the
destination because the product is small enough to fit in only the low half of the destination.
If it is, IMUL clears CF and OF to 0; otherwise, IMUL sets CF and OF to 1.
When using the two- or three-operand forms of IMUL, the product can easily be large
enough so that it does not fit in the destination. Before using the result of either of these
forms, make sure that the destination contains the entire product. If it does, IMUL clears
CF and OF to 0; otherwise, IMUL sets CF and OF to 1.
Related Instructions
If you want to
See
Convert an 8-bit integer to its 16-bit equivalent
CBW
Multiply two unsigned numbers
MUL
Change the sign of an integer
NEG
Multiply an integer by a power of 2
SAL
Содержание 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...