ST10 FAMILY PROGRAMMING MANUAL
143/172
Description
Multiplies the two signed 16-bit source operands “op1” and “op2”. The obtained signed 32-bit product is
first sign-extended, then and on condition the MP flag is set, it is one-bit left shifted, and next, it is option-
ally negated prior being added/subtracted to/from the 40-bit ACC register content, finally the obtained
result is optionally rounded before being stored in the 40-bit ACC register. “-” option is used to negate the
specified product, “R” option is used to negate the accumulator content, and finally “rnd” option is used to
round the result using two’s complement rounding. The default sign option is “+” and the default round
option is “no round”. When “rnd” option is used, MAL register is automatically cleared. Note that “rnd” and
“-” are exclusive as well as “-” and “R”. This instruction might be repeated and performs two parallel mem-
ory reads. In parallel to the arithmetic operation and to the two parallel reads, the data pointed to by IDX
i
overwrites another data located in memory (DPRAM). The address of the overwritten data depends on
the operation executed on IDX
i
, as explained by the following table
MAC Flags
Addressing Modes
Addressing Mode
Overwritten Address
[IDX
i
]
(no change)
[IDX
i
+]
(IDX
i
) - 2
[IDX
i
-]
(IDX
i
) + 2
[IDX
i
+QX
j
]
(IDX
i
) - (QX
j
)
[IDX
i
-QX
j
]
(IDX
i
) + (QX
j
)
N
Z
C
SV
E
SL
*
*
*
*
*
*
N
Set if the most significant bit of the result is set. Cleared otherwise.
Z
Set if the result equals zero. Cleared otherwise.
C
Set if a carry or borrow is generated. Cleared otherwise.
SV
Set if an arithmetic overflow occurred. Not affected otherwise.
E
Set if the MAE is used. Cleared otherwise.
SL
Set if the contents of the ACC is automatically saturated. Not affected otherwise.
Mnemonic
Rep
Format
Bytes
CoMACM
[IDX
i
⊗
], [Rw
m
⊗]
Yes
93 Xm D8 rrrr:rqqq
4
CoMACM-
[IDX
i
⊗
], [Rw
m
⊗]
Yes
93 Xm E8 rrrr:rqqq
4
CoMACM
[IDX
i
⊗
], [Rw
m
⊗]
, rnd
Yes
93 Xm D9 rrrr:rqqq
4
CoMACMR
[IDX
i
⊗
], [Rw
m
⊗]
Yes
93 Xm F8 rrrr:rqqq
4
CoMACMR
[IDX
i
⊗
], [Rw
m
⊗]
, rnd
Yes
93 Xm F9 rrrr:rqqq
4
Summary of Contents for ST10 Series
Page 2: ......