Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
IMUL Instruction
 Detail Key Example                    Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Title:    Signed Multiply                       Flags: O D I T S Z A P C
                                                         ═════════════════
  Syntax:   IMUL src                                     ±       ? ? ? ? ±
            IMUL dest,const
            IMUL dest,src,const
            IMUL dest,src
 
  See also: MUL, IDIV, DIV, SHL
 
  Description:
 
     Multiplies an implied destination operand by a specified source
     operand. Both operands are treated as signed numbers. If a single
     16-bit operand is given, the implied destination is AX and the
     product goes into the DX:AX register pair. If a single 8-bit
     operand is given, the implied destination is AL and the product
     goes into AX.
 
     On the 80386/486, if the operand is EAX, the product goes into the
     EDX:EAX register pair. The carry and overflow flags are set if the
     product is sign-extended into DX for 16-bit operands, into AH for
     8-bit operands, or into EDX for 32-bit operands.
 
     Two additional syntaxes are available on the 80186-80486
     processors. In the two-operand form, a 16-bit register gives one
     of the factors and serves as the destination for the result; a
     source constant specifies the other factor.
 
     In the three-operand form, the first operand is a 16-bit register
     where the result will be stored; the second is a 16-bit register
     or memory operand containing one of the factors; and the third is
     a constant representing the other factor.
 
     With both variations, the overflow and carry flags are set if the
     result is too large to fit into the 16-bit destination register.
     Since the low 16 bits of the product are the same for both signed
     and unsigned multiplication, these syntaxes can be used for either
     signed or unsigned numbers. On the 80386/486, the operands can be
     either 16 or 32 bits wide.
 
     A fourth syntax is available on the 80386/486. Both the source and
     destination operands can be given specifically. The source can be
     any 16- or 32-bit memory operand or general-purpose register. The
     destination can be any general-purpose register of the same size.
     The overflow and carry flags are set if the product does not fit
     in the destination.
                                    -♦-