362 EMBEDDED SYSTEMS
i) e source and destination registers are 32 bits in length. If the product is longer
than 32 bits, only the lower bits are preserved in the destination register.
ii) Immediate data cannot be used as a source operand.
iii) If the multiplicand and multiplier are signed numbers, it is up to the programmer to
identify a logic to interpret the sign of the product.
iv) e instruction can be made conditional.
Example
MUL R1, R2, R3 ;R1 = R2 × R3
MULS R1, R2, R3 ;R1 = R2 × R3 and fl ags are also set
MULSEQ R3, R2, R1 ;R1 = R2 × R3 is done only if the Z = 1
;(because of the EQ suffi x)
;because of the S suffi x, fl ags are updated
MULEQ R4, R3, R5 ;if Z = 1, R4 = R3 × R5
10.11.2 | Multiply and Accumulate
e format ...