Infineon Technologies C166S V2 User Manual page 390

16-bit microcontroller
Table of Contents

Advertisement

CoMUL
Group
Syntax
Source Operand(s)
Destination Operand(s)
Operation
IF (MP = 1) THEN
ELSE
END IF
(MAL) ← 0
Description
Multiplies the two signed 16-bit source operands op1 and op2. The resulting signed
32-bit product is first sign-extended; then, if the MP flag is set, it is one-bit left shifted.
Finally, the result is 2s complement rounded before being stored in the 40-bit ACC
register. The MAL register is cleared.
MAC Flags
MV
MSL
0
*
MV
Always cleared.
MSL
Not affected when MP or MS are cleared, otherwise, only set in case of
8000h by 8000h multiplication.
ME
Set when MP is set and MS is cleared and in case of 8000h by 8000h
multiplication. Cleared otherwise.
MSV Not affected.
MC
Always cleared.
MZ
Set if result equals zero. Cleared otherwise.
MN
Set if the most significant bit of the result is set. Cleared otherwise.
User Manual
Signed Multiply with Round
Multiply/Multiply-Accumulate Instructions
CoMUL op1, op2, rnd
op1, op2 → WORD
ACC → 40-bit signed value
(ACC) ← ((op1) * (op2)) <<1 + 00 0000 8000h
(ACC) ← (op1) * (op2) + 00 0000 8000h
ME
MSV
*
-
Detailed Instruction Description
MC
MZ
0
*
8-390
User Manual
C166S V2
CoMUL
MN
Sat.
*
yes
V 1.7, 2001-01

Advertisement

Table of Contents
loading

Table of Contents