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

Rotate the accumlator or address 1 bit left

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

Operation

C <- M7...M0 <- C

Table

ROL Rotate One Bit Left (Memory or Accumulator)

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

                                + + + - - -

addressing assembler opc bytes cyles


accumulator ROL A 2A 1 2 zeropage ROL oper 26 2 5 zeropage,X ROL oper,X 36 2 6 absolute ROL oper 2E 3 6 absolute,X ROL oper,X 3E 3 7

Flags

  • Carry: 1 if bit 7 was 1; 0 if bit 7 was 0
  • Zero: 1 if result is zero; 0 otherwise
  • Negative: 1 if bit 6 was 1; 0 if bit 7 was 0

Link to this section Summary

Link to this section Functions