muls

Signed multiply

Multiplies the value of the first operand by the second operand.

Size .w

Used in
XNZVC –●●00
  • ● set from the result
  • 0 always 0
  • – not changed

Forms

Operands

<ea>
An operand using one of the instruction’s supported addressing modes, such as d0, (a0)+ or 4(a1). It may name a register, memory or an immediate value. More
Dn
A data register, d0 to d7. More
#imm
An immediate value written after #: a number, character or label, such as #10, #$FF or #'a'. It must fit the operation’s size: byte -128 to 255, word -32768 to 65535, or long -2147483648 to 4294967295; signed and unsigned spellings are accepted. More

The result is stored in the second operand. The first operand is read as a word, the second as a long

move.l #2, d0
muls #-3, d0 ; d0 = -6

move.l #-4, d1
muls #-5, d1 ; d1 = 20

* --- Word operands, long result ---
move.l #$100, d2
muls #$100, d2 ; d2 = $10000