Infineon Technologies C166S V2 User Manual page 408

16-bit microcontroller
Table of Contents

Advertisement

CoSHL
Group
Syntax
Source Operand(s)
Destination Operand(s)
Operation
(count) ← (op1)
(C) <- (ACC[39])
DO WHILE ((count) ≠ 0)
END WHILE
Description
Shifts the 40-bit ACC register contents left by the number of times specified by the
operand op1. The least significant bits of the result are filled with zeros accordingly.
Only shift values from 0 to 16 (inclusive) are allowed. op1 can be either a 5-bit unsigned
immediate data (the shift range is from 0 to 16 in this case) or the four least significant
bits (the shift range is from 0 to 15 in that case) of any register directly or indirectly
addressed operand.
Note: For this instruction only, the saturation is computed using the 40-bit result. So a
sign shifted over the 40 bit result is disregarded.
MAC Flags
MV
MSL
0
*
MV
Always cleared.
MSL
Set if the contents of ACC is automatically saturated. Not affected
otherwise.
ME
Set if the MAE is used. Cleared otherwise.
MSV Not affected.
MC
Carry flag is set according to the last most significant bit shifted out of
ACC or according to the sign of ACC.
MZ
Set if result equals zero. Cleared otherwise.
User Manual
Accumulator Logical Shift Left
Shift Instructions
CoSHL op1
op1 → 5-bit unsigned data
ACC → 40-bit signed value
(C) ← (ACC[39])
(ACC[n]) ← (ACC[n-1]) [n=39...1]
(ACC[0]) ← 0
(count) ← (count) -1
ME
MSV
*
-
Detailed Instruction Description
MC
MZ
*
*
8-408
User Manual
C166S V2
CoSHL
MN
Sat.
*
yes
V 1.7, 2001-01

Advertisement

Table of Contents
loading

Table of Contents