LSR

LSR

Operation:
Destination Shifted by <count> -->; Destination

Assembler Syntax:
LSR Dx, Dy
LSR #<data>, Dy
LSR <ea>

Attributes: Size = (Byte, Word, Long, Quad)

Description: Shifts the bits of the operand to the right. The carry bit
receives the last bit shifted out of the operand. The shift count for
the shifting of a register may be specified in two different ways:
1. Immediate -- The shift count is specified in the instr-
uction (shift range 1-8).
2. Register -- The shift count is the value in the data reg-
ister specified in instruction modulo 64.

The size of the operation can be specified as byte, word, or long.
An operand in memory can be shifted one bit only, and the operand
size is restricted to word.

Bits shifted out of the low-order bit go to both the carry and the
extend bits; the sign bit (MSB) is shifted into the high-order bit.

Condition Codes:

X Set according to the last bit shifted out of the operand.
Unaffected for a shift count of zero.
N Set if the result is negative. Cleared otherwise.
Z Set if the result is zero. Cleared otherwise.
V Always cleared.
C Set according to the last bit shifted out of the operand.
Cleared for a shift count of zero.