6502
The 6502 processor is an 8-bit CPU that was used in many computers and consoles, including the NES and SNES.
Specifications
Emulation
Memory
The first 256B of memory is referred to as the ($0000-$00FF).
Registers
# |
Register |
Size |
Description |
PC |
Program Counter |
16 bit |
pointer to the next instruction |
SP |
Stack pointer |
8 bit |
holds low 8 bits of the next free location on the stack |
A |
Accumulator |
8 bit |
used for all arithmetic operations (except for incrementation and decrementation) |
X |
X register |
8 bit |
available for holding counter or offset values for memory access. It also has the special function of copying or changing the value of SP. |
Y |
Y register |
8 bits |
available for holding counter or offset values for memory access. |
Opcodes
All opcodes are 1 byte in size, and their operands are 0, 1, or 2 bytes
LDA
LDA #$33 ; Load 69 into A
STA
Exapunks