ST10 FAMILY PROGRAMMING MANUAL
CoMAC(R)su(-)
Group
Syntax
Operation
Syntax
Operation
Syntax
Operation
Syntax
Operation
Syntax
Operation
Data Types
Result
Description
Multiplies the two signed and unsigned 16-bit source operands "op1" and "op2", respectively. The
obtained signed 32-bit product is first sign-extended, and then, it is optionally 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. The result is never affected by the MP mode flag contained in the
MCW register. "-" option is used to negate the specified product, "R" option is used to negate the accumu-
lator 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 reg-
ister is automatically cleared. Note that "rnd" and "-" are exclusive as well as "-" and "R". This instruction
might be repeated and allows up to two parallel memory reads.
MAC Flags
N
*
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.
140/172
Mixed Multiply-Accumulate & Optional Round
Multiply/Multiply-Accumulate Instructions
CoMACsu
op1, op2
(tmp)
<-- (op1) * (op2)
(ACC)
<-- (ACC) + (tmp)
CoMACsu
op1, op2, rnd
(tmp)
<-- (op1) * (op2)
(ACC)
<-- (ACC) + (tmp) + 00 0000 8000
(MAL)
<-- 0
CoMACsu-
op1, op2
(tmp)
<-- (op1) * (op2)
(ACC)
<-- (ACC) - (tmp)
CoMACRsu
op1, op2
(tmp)
<-- (op1) * (op2)
(ACC)
<-- (tmp) - (ACC)
CoMACRsu
op1, op2, rnd
(tmp)
<-- (op1) * (op2)
(ACC)
<-- (tmp) - (ACC) + 00 0000 8000
(MAL)
<-- 0
DOUBLE WORD
40-bit signed value
Z
C
*
*
SV
E
*
*
h
h
SL
*
Need help?
Do you have a question about the ST10 Series and is the answer not in the manual?
Questions and answers