Table of Contents
Previous topic Next topic
MICROPROCESSOR INSTRUCTION REFERENCE->LSL
LSL Logical Shift Left
Destination shifted by <count> -> Destination
C <- OPERAND <- 0
X <-
Assembler Syntax: | LSL Dx,Dy |
| LSL #<data>,Dy |
| LSL <ea> |
<ea> - memory alterable only
Dx contains shift count
Immediate shift data may be 1 - 8
Memory can be shifted only 1 bit
Size: Byte, Word, Long except if Memory Shift when only Word Allowed
Condition Codes:
N Set if most significant bit of result is set, else cleared
Z Set if result zero, else cleared
V Set if the most significant bit is changed at any time during shift operation, else clear
C Set according to last bit shifted out of operand, cleared for a shift count of zero
X Set according to last bit shifted out of operand, unaffected by a shift count of zero
| Allowable Addressing Modes |
|
| LSL | Dx,Dy |
| LSL | #(data),Dy |
| LSL | (An) |
| LSL | (An)+ |
| LSL | -(An) |
| LSL | (d16,An) |
| LSL | (d8,An,Xn) |
| LSL | (bd,An,Xn) |
| LSL | ([bd,An,Xn],od) |
| LSL | ([bd,An],Xn,od) |
| LSL | (xxx).W |
| LSL | (xxx).L |
Addressing modes with [] are not supported by CPU32 based microcontrollers