Logical Shift
LSH
13-137
Assembly Language Instructions
Cycles 1
Status Bits These condition flags are modified only if the destination register is R7–R0.
LUF Unaffected
LV Unaffected
UF 0
NMSB of the output
Z1 if a 0 output is generated; 0 otherwise
V0
CSet to the value of the last bit shifted out; 0 for a shift
count
of 0
OVM Operation is not affected by OVM bit value.
Example 1 LSH R4,R7
Before Instruction After Instruction
R4 00 0000 0018 R4 00 0000 0018
R7 00 0000 02AC R7 00 AC00 0000
LUF 0LUF 0
LV 0LV 0
UF 0UF 0
N0N1
Z0Z0
V0V1
C0C0
24 24
Example 2 LSH *–AR5(IR1),R5
Before Instruction After Instruction
R5 00 12C0 0000 R5 00 0001 2C00
AR5 80 9908 AR5 80 9908
IR0 4IR0 4
LUF 0LUF 0
LV 0LV 0
UF 0UF 0
N0N0
Z0Z0
V0V0
C0C0
Data memory
809904h 0FFFFFFF4 809904h 0FFFFFFF4
–12 –12
Mode Bit