Motorola DSP56800 Manual page 362

16-bit digital signal processor
Table of Contents

Advertisement

MPYSU
Operation:
S1 * S2 → D (S1 signed, S2 unsigned)
Description: Multiply the two 16-bit source operands (S1 and S2), and store the product in the specified 36-bit des-
tination accumulator (D). S1 can be unsigned; S2 is always considered unsigned. This mixed arith-
metic multiply does not allow a parallel move and can be used for multi-precision multiplications.
Usage:
In addition to single-precision multiplication of a signed value times unsigned value, this instruction
is also used for multi-precision multiplications, as shown in Section 3.3.8.2, "Multi-Precision Multi-
plication," on page 3-23.
Example:
MPYSU
Before Execution
0
0000
A2
A1
Explanation of Example:
The 16-bit X0 register contains the value $3456, and the 16-bit Y1 register contains the value $8000.
Execution of the MPYSU X0,Y0,A instruction multiplies the 16-bit signed value in the X0 register
by the 16-bit unsigned value in Y0 and stores the signed result into the A accumulator. If this was a
MPY instruction, Y0 ($8000) would equal -1.0, and the multiplication result would be
$F:CBAA:0000. Since this is a MPYSU instruction, Y0 is considered unsigned and equals +1.0. This
gives a multiplication result of $0:3456:0000.
A-132
Signed Unsigned Multiply
Assembler Syntax:
MPYSU
X0,Y0,A
0000
A0
X0
3456
Y0
8000
DSP56800 Family Manual
S1,S2,D
After Execution
0
3456
A2
A1
X0
Y0
MPYSU
(no parallel move)
0000
A0
3456
8000

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents