A 6502 instruction that atomically shifts the bits in a value one position to the right, setting the most significant bit to 0 and moving the least significant bit into carry. Useful in implementing a linear feedback shift register.
  • Function: N >>= 1
  • Updates flags: S . . . . . Z C
  • Opcode numbers:
    dp    $46
    impl  $4A  ; works on value in A
    abs   $4E
    d,x   $56
    a,x   $5E
    

Don't forget to add 2 cycles to modes other than impl, as those modes are read-modify-write.

Similar: ASL | ROL | ROR | INC | DEC
See also: 6502 instructions | 6502 addressing modes

In MPLS terms, LSR is a 'Label Switch Router'.

Log in or register to write something here or to contact authors.