ST10 FAMILY PROGRAMMING MANUAL
154/172
CoMUL(-)
Signed Multiply & Optional Round
Group
Multiply/Multiply-Accumulate Instructions
Syntax
CoMUL
op1, op2
Operation
IF (MP = 1) THEN
(ACC)
<-- ((op1) * (op2)) << 1
ELSE
(ACC)
<-- (op1) * (op2)
END IF
Syntax
CoMUL-
op1, op2
Operation
IF (MP = 1) THEN
(ACC)
<-- - ( ((op1) * (op2)) << 1)
ELSE
(ACC)
<-- - ( (op1) * (op2) )
END IF
Syntax
CoMUL
op1, op2, rnd
Operation
IF (MP = 1) THEN
(ACC)
<-- ((op1) * (op2)) << 1 + 00 0000 8000
h
ELSE
(ACC)
<-- (op1) * (op2) + 00 0000 8000
h
END IF
(MAL) <--
0
Data Types
DOUBLE WORD
Result
32-bit signed value
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 MP is set, it is one-bit left shifted, and finally, it is optionally
either negated or rounded before being stored in the 40-bit ACC register. The “-” option is used to negate
the specified product while the “rnd” option is used to round the product using two’s complement round-
ing. The default sign option is “+” and the default round option is “no round”. When “rnd” option is used,
MAL register is automatically cleared. “rnd” and “-” are exclusive. This non-repeatable instruction allows
up to two parallel memory reads
MAC Flags
N
Z
C
SV
E
SL
*
*
0
-
* *
N
Set if the most significant bit of the result is set. Cleared otherwise.
Z
Set if the result equals zero. Cleared otherwise.
C
Always cleared.
SV
Not affected.
E
Always cleared when MP is cleared, otherwise, only set in case of 8000
h
by 8000
h
multiplication.
SL
Not affected when MP or MS are cleared, otherwise, only set in case of 8000
h
by 8000
h
multipli-
cation.
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...