
30Mar98@15:00h
Semiconductor Group
105
Version 1.2, 12.97
C166 Family Instruction Set
Instruction Description
SHL
Shift Left
SHL
Syntax
SHL
op1, op2
Operation
(count)
←
(op2)
(C)
←
0
DO WHILE (count)
≠
0
(C)
←
(op1
15
)
(op1
n
)
←
(op1
n-1
) [n=1...15]
(op1
0
)
←
0
(count)
←
(count) - 1
END WHILE
Data Types
WORD
Description
Shifts the destination word operand op1 left by as many times as specified
by the source operand op2. The least significant bits of the result are filled
with zeros accordingly. The MSB is shifted into the Carry. Only shift val-
ues between 0 and 15 are allowed. When using a GPR as the count con-
trol, only the least significant 4 bits are used.
E Always cleared.
Z Set if result equals zero. Cleared otherwise.
V Always cleared.
C The carry flag is set according to the last MSB 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.
Addressing Modes
Mnemonic
Format
Bytes
SHL
Rw
n
, Rw
m
4C nm
2
SHL
Rw
n
, #data4
5C #n
2
Condition Flags
E
Z
V
C
N
0
*
0
S
*