6502Arch

Table of Contents

1 Addressing modes

has a 16-byte address bus.

1.1 Absolute

  • Full memory location specified, i.e. $c000
  • 65536 bytes of addressable memory (216 duyyy)

1.2 Zero-page

  • 1 byte adress, i.e. $c0, 256 bytes adressable
  • faster, takes less program space

1.3 Zero-page, X

  • Relative adressing within the zero page.
  • Adds the value in reg. x with a 1-byte adress
  • i.e. STA $a0, X
  • Address wraps around if the addition is larger than 1 byte

1.4 Zero-page, Y

  • equiv to zero-page, X but can only be used with LDX and STX

1.5 Immediate

  • i.e. #$c0
  • loads immedate number into register

1.6 Relative

  • i.e. $c0, or label

1.7 Implicit

  • when operation doesn't deal with memory

1.8 Indirect

  • Uses absolute address to get another address
  • first address is LSB of address, following byte is MSB

1.9 Indexed Indirect

  • i.e. LDA ($c0, X)
  • Take a zero page adress and add the value in reg. x to it, look up 2 byte address

1.10 Indirect Indexed

  • zero page address dereferenced then Y is added to it

2 Stack

  • lives in memory between $0100 and $01ff

3 Jumping

  • JSR/RTS: Jump to subroutine and return from subroutine

Date: 2014-09-25T21:09-0400

Author: Alex Weisberger

Org version 7.9.3f with Emacs version 24

Validate XHTML 1.0