LSL Instruction
Performs a logical shift to the left on a data register or a memory location. There are three possibilities:
1. Shift a data register to the left. Number of steps is stored in another data
register.
2. Shift a data register to the left. Number of steps is an immediate value.
Shift range 1-8 bits.
3. Shift a word in the memory one bit to the left.
ADDRESS METHODS: 3) (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l
DATA LENGTH: Byte, word, longword
FLAGS: |
X - The last bit that was sent out of the operand. Unaffected if number of steps is 0. |
N - S |
Z - S |
C - Same as X |
V - Set if the most significant bit was changed during the operation, otherwise it is cleared.
|
SYNTAX: |
LSL Dx,Dy |
LSL #<data>,Dy |
LSL <ea> |
EXAMPLE CODE:
LSL.B #1,D0 if
D0.B contained 00001111, it would now be 00011110