A 6502 instruction that shifts all bits in the A register or a memory location to the right, moving bit 0 into the carry and the old carry into bit 7.
  • Function: (N >> 1) | (C << 7) => N
  • Updates flags: S Z C
  • Opcode numbers:
    dp    $26
    impl  $2A  ; affects accumulator
    abs   $2E
    d,x   $36
    a,x   $3E
    

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

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

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