User Manual
C166S V2
Detailed Instruction Description
User Manual
8-301
V 1.7, 2001-01
SHL
Shift Left
SHL
Group
Shift and Rotate Instructions
Syntax
SHL op1, op2
Source Operand(s)
op1
→
WORD
op2
→
shift counter
Destination Operand(s)
op1
→
WORD
Operation
(count)
←
(op2)
(C)
←
0
DO WHILE ((count)
≠
0)
(C)
←
(op1[15])
(op1[n])
←
(op1[n-1]) [n=15...1]
(op1[0])
←
0
(count)
←
(count) - 1
END WHILE
Description
Shifts the destination word operand op1 the number of times as specified by the source
operand op2. The least significant bits of the result are filled with zeros accordingly. The
most significant bit is shifted into the Carry. Only shift values between 0 and 15 are
allowed. When using a GPR as the count control, only the least significant four bits are
used.
CPU Flags
E
Always cleared.
Z
Set if result equals zero. Cleared otherwise.
V
Always cleared.
C
The carry flag is set according to the last most significant bit shifted out of
op1. Cleared for a shift count of zero.
N
Set if the most significant bit of the result is set. Cleared otherwise.
E
Z
V
C
N
0
*
0
S
*
Summary of Contents for C166S V2
Page 102: ...User Manual C166S V2 C166S V2 Memory Organization User Manual 3 102 V 1 7 2001 01...
Page 116: ...User Manual C166S V2 Instruction Pipeline User Manual 4 116 V 1 7 2001 01...
Page 152: ...User Manual C166S V2 Interrupt and Exception Handling User Manual 5 152 V 1 7 2001 01...
Page 204: ...User Manual C166S V2 Instruction Set User Manual 7 204 V 1 7 2001 01...
Page 420: ...User Manual C166S V2 Detailed Instruction Description User Manual 8 420 V 1 7 2001 01...
Page 432: ...User Manual C166S V2 Summary of CPU Subsystem Registers User Manual 9 432 V 1 7 2001 01...
Page 437: ...437...