Ex6502.CPU.Executor.ROR (ex6502 v0.1.0) View Source

Rotate the accumlator or address 1 bit right

Bit 7 becomes the contents of the carry flag and bit 0 pre-shift enters the carry flag.

Operation

C -> M7...M0 -> C

Table

ROR Rotate One Bit Right (Memory or Accumulator)

C -> [76543210] -> C N Z C I D V

                                + + + - - -

addressing assembler opc bytes cyles


accumulator ROR A 6A 1 2 zeropage ROR oper 66 2 5 zeropage,X ROR oper,X 76 2 6 absolute ROR oper 6E 3 6 absolute,X ROR oper,X 7E 3 7

Flags

  • Carry: 1 if bit 0 was 1; 0 if bit 0 was 0
  • Zero: 1 if result is zero; 0 otherwise
  • Negative: 1 if bit carry flag was 1; 0 if carry flag was 0

Link to this section Summary

Link to this section Functions