Skip to content

Instantly share code, notes, and snippets.

@Chubek
Created September 11, 2025 11:11
Show Gist options
  • Save Chubek/fc8e75af79bc796d1d868cd7cd4d0919 to your computer and use it in GitHub Desktop.
Save Chubek/fc8e75af79bc796d1d868cd7cd4d0919 to your computer and use it in GitHub Desktop.
6502 instructions, with mnemonics, opcodes, bytes, cycles
ADC N=+,Z=+,C=+,I=-,D=-,V=+, immediate, 0x69 2 2
ADC N=+,Z=+,C=+,I=-,D=-,V=+, zeropage, 0x65 2 3
ADC N=+,Z=+,C=+,I=-,D=-,V=+, zeropage,X, 0x75 2 4
ADC N=+,Z=+,C=+,I=-,D=-,V=+, absolute, 0x6D 3 4
ADC N=+,Z=+,C=+,I=-,D=-,V=+, absolute,X, 0x7D 3 4*
ADC N=+,Z=+,C=+,I=-,D=-,V=+, absolute,Y, 0x79 3 4*
ADC N=+,Z=+,C=+,I=-,D=-,V=+, (indirect,X), 0x61 2 6
ADC N=+,Z=+,C=+,I=-,D=-,V=+, (indirect),Y, 0x71 2 5*
AND N=+,Z=+,C=-,I=-,D=-,V=-, immediate, 0x29 2 2
AND N=+,Z=+,C=-,I=-,D=-,V=-, zeropage, 0x25 2 3
AND N=+,Z=+,C=-,I=-,D=-,V=-, zeropage,X, 0x35 2 4
AND N=+,Z=+,C=-,I=-,D=-,V=-, absolute, 0x2D 3 4
AND N=+,Z=+,C=-,I=-,D=-,V=-, absolute,X, 0x3D 3 4*
AND N=+,Z=+,C=-,I=-,D=-,V=-, absolute,Y, 0x39 3 4*
AND N=+,Z=+,C=-,I=-,D=-,V=-, (indirect,X), 0x21 2 6
AND N=+,Z=+,C=-,I=-,D=-,V=-, (indirect),Y, 0x31 2 5*
ASL N=+,Z=+,C=+,I=-,D=-,V=-, accumulator, 0x0A 1 2
ASL N=+,Z=+,C=+,I=-,D=-,V=-, zeropage, 0x06 2 5
ASL N=+,Z=+,C=+,I=-,D=-,V=-, zeropage,X, 0x16 2 6
ASL N=+,Z=+,C=+,I=-,D=-,V=-, absolute, 0x0E 3 6
ASL N=+,Z=+,C=+,I=-,D=-,V=-, absolute,X, 0x1E 3 7
BCC N=-,Z=-,C=-,I=-,D=-,V=-, relative, 0x90 2 2**
BCS N=-,Z=-,C=-,I=-,D=-,V=-, relative, 0xB0 2 2**
BEQ N=-,Z=-,C=-,I=-,D=-,V=-, relative, 0xF0 2 2**
BIT N=M7,Z=+,C=-,I=-,D=-,V=M6, zeropage, 0x24 2 3
BIT N=M7,Z=+,C=-,I=-,D=-,V=M6, absolute, 0x2C 3 4
BMI N=-,Z=-,C=-,I=-,D=-,V=-, relative, 0x30 2 2**
BNE N=-,Z=-,C=-,I=-,D=-,V=-, relative, 0xD0 2 2**
BPL N=-,Z=-,C=-,I=-,D=-,V=-, relative, 0x10 2 2**
BRK N=-,Z=-,C=-,I=1,D=-,V=-, implied, 0x00 1 7
BVC N=-,Z=-,C=-,I=-,D=-,V=-, relative, 0x50 2 2**
BVS N=-,Z=-,C=-,I=-,D=-,V=-, relative, 0x70 2 2**
CLC N=-,Z=-,C=0,I=-,D=-,V=-, implied, 0x18 1 2
CLD N=-,Z=-,C=-,I=-,D=0,V=-, implied, 0xD8 1 2
CLI N=-,Z=-,C=-,I=0,D=-,V=-, implied, 0x58 1 2
CLV N=-,Z=-,C=-,I=-,D=-,V=0, implied, 0xB8 1 2
CMP N=+,Z=+,C=+,I=-,D=-,V=-, immediate, 0xC9 2 2
CMP N=+,Z=+,C=+,I=-,D=-,V=-, zeropage, 0xC5 2 3
CMP N=+,Z=+,C=+,I=-,D=-,V=-, zeropage,X, 0xD5 2 4
CMP N=+,Z=+,C=+,I=-,D=-,V=-, absolute, 0xCD 3 4
CMP N=+,Z=+,C=+,I=-,D=-,V=-, absolute,X, 0xDD 3 4*
CMP N=+,Z=+,C=+,I=-,D=-,V=-, absolute,Y, 0xD9 3 4*
CMP N=+,Z=+,C=+,I=-,D=-,V=-, (indirect,X), 0xC1 2 6
CMP N=+,Z=+,C=+,I=-,D=-,V=-, (indirect),Y, 0xD1 2 5*
CPX N=+,Z=+,C=+,I=-,D=-,V=-, immediate, 0xE0 2 2
CPX N=+,Z=+,C=+,I=-,D=-,V=-, zeropage, 0xE4 2 3
CPX N=+,Z=+,C=+,I=-,D=-,V=-, absolute, 0xEC 3 4
CPY N=+,Z=+,C=+,I=-,D=-,V=-, immediate, 0xC0 2 2
CPY N=+,Z=+,C=+,I=-,D=-,V=-, zeropage, 0xC4 2 3
CPY N=+,Z=+,C=+,I=-,D=-,V=-, absolute, 0xCC 3 4
DEC N=+,Z=+,C=-,I=-,D=-,V=-, zeropage, 0xC6 2 5
DEC N=+,Z=+,C=-,I=-,D=-,V=-, zeropage,X, 0xD6 2 6
DEC N=+,Z=+,C=-,I=-,D=-,V=-, absolute, 0xCE 3 6
DEC N=+,Z=+,C=-,I=-,D=-,V=-, absolute,X, 0xDE 3 7
DEX N=+,Z=+,C=-,I=-,D=-,V=-, implied, 0xCA 1 2
DEY N=+,Z=+,C=-,I=-,D=-,V=-, implied, 0x88 1 2
EOR N=+,Z=+,C=-,I=-,D=-,V=-, immediate, 0x49 2 2
EOR N=+,Z=+,C=-,I=-,D=-,V=-, zeropage, 0x45 2 3
EOR N=+,Z=+,C=-,I=-,D=-,V=-, zeropage,X, 0x55 2 4
EOR N=+,Z=+,C=-,I=-,D=-,V=-, absolute, 0x4D 3 4
EOR N=+,Z=+,C=-,I=-,D=-,V=-, absolute,X, 0x5D 3 4*
EOR N=+,Z=+,C=-,I=-,D=-,V=-, absolute,Y, 0x59 3 4*
EOR N=+,Z=+,C=-,I=-,D=-,V=-, (indirect,X), 0x41 2 6
EOR N=+,Z=+,C=-,I=-,D=-,V=-, (indirect),Y, 0x51 2 5*
INC N=+,Z=+,C=-,I=-,D=-,V=-, zeropage, 0xE6 2 5
INC N=+,Z=+,C=-,I=-,D=-,V=-, zeropage,X, 0xF6 2 6
INC N=+,Z=+,C=-,I=-,D=-,V=-, absolute, 0xEE 3 6
INC N=+,Z=+,C=-,I=-,D=-,V=-, absolute,X, 0xFE 3 7
INX N=+,Z=+,C=-,I=-,D=-,V=-, implied, 0xE8 1 2
INY N=+,Z=+,C=-,I=-,D=-,V=-, implied, 0xC8 1 2
JMP N=-,Z=-,C=-,I=-,D=-,V=-, absolute, 0x4C 3 3
JMP N=-,Z=-,C=-,I=-,D=-,V=-, indirect, 0x6C 3 5
JSR N=-,Z=-,C=-,I=-,D=-,V=-, absolute, 0x20 3 6
LDA N=+,Z=+,C=-,I=-,D=-,V=-, immediate, 0xA9 2 2
LDA N=+,Z=+,C=-,I=-,D=-,V=-, zeropage, 0xA5 2 3
LDA N=+,Z=+,C=-,I=-,D=-,V=-, zeropage,X, 0xB5 2 4
LDA N=+,Z=+,C=-,I=-,D=-,V=-, absolute, 0xAD 3 4
LDA N=+,Z=+,C=-,I=-,D=-,V=-, absolute,X, 0xBD 3 4*
LDA N=+,Z=+,C=-,I=-,D=-,V=-, absolute,Y, 0xB9 3 4*
LDA N=+,Z=+,C=-,I=-,D=-,V=-, (indirect,X), 0xA1 2 6
LDA N=+,Z=+,C=-,I=-,D=-,V=-, (indirect),Y, 0xB1 2 5*
LDX N=+,Z=+,C=-,I=-,D=-,V=-, immediate, 0xA2 2 2
LDX N=+,Z=+,C=-,I=-,D=-,V=-, zeropage, 0xA6 2 3
LDX N=+,Z=+,C=-,I=-,D=-,V=-, zeropage,Y, 0xB6 2 4
LDX N=+,Z=+,C=-,I=-,D=-,V=-, absolute, 0xAE 3 4
LDX N=+,Z=+,C=-,I=-,D=-,V=-, absolute,Y, 0xBE 3 4*
LDY N=+,Z=+,C=-,I=-,D=-,V=-, immediate, 0xA0 2 2
LDY N=+,Z=+,C=-,I=-,D=-,V=-, zeropage, 0xA4 2 3
LDY N=+,Z=+,C=-,I=-,D=-,V=-, zeropage,X, 0xB4 2 4
LDY N=+,Z=+,C=-,I=-,D=-,V=-, absolute, 0xAC 3 4
LDY N=+,Z=+,C=-,I=-,D=-,V=-, absolute,X, 0xBC 3 4*
LSR N=0,Z=+,C=+,I=-,D=-,V=-, accumulator, 0x4A 1 2
LSR N=0,Z=+,C=+,I=-,D=-,V=-, zeropage, 0x46 2 5
LSR N=0,Z=+,C=+,I=-,D=-,V=-, zeropage,X, 0x56 2 6
LSR N=0,Z=+,C=+,I=-,D=-,V=-, absolute, 0x4E 3 6
LSR N=0,Z=+,C=+,I=-,D=-,V=-, absolute,X, 0x5E 3 7
NOP N=-,Z=-,C=-,I=-,D=-,V=-, implied, 0xEA 1 2
ORA N=+,Z=+,C=-,I=-,D=-,V=-, immediate, 0x09 2 2
ORA N=+,Z=+,C=-,I=-,D=-,V=-, zeropage, 0x05 2 3
ORA N=+,Z=+,C=-,I=-,D=-,V=-, zeropage,X, 0x15 2 4
ORA N=+,Z=+,C=-,I=-,D=-,V=-, absolute, 0x0D 3 4
ORA N=+,Z=+,C=-,I=-,D=-,V=-, absolute,X, 0x1D 3 4*
ORA N=+,Z=+,C=-,I=-,D=-,V=-, absolute,Y, 0x19 3 4*
ORA N=+,Z=+,C=-,I=-,D=-,V=-, (indirect,X), 0x01 2 6
ORA N=+,Z=+,C=-,I=-,D=-,V=-, (indirect),Y, 0x11 2 5*
PHA N=-,Z=-,C=-,I=-,D=-,V=-, implied, 0x48 1 3
PHP N=-,Z=-,C=-,I=-,D=-,V=-, implied, 0x08 1 3
PLA N=+,Z=+,C=-,I=-,D=-,V=-, implied, 0x68 1 4
ROL N=+,Z=+,C=+,I=-,D=-,V=-, accumulator, 0x2A 1 2
ROL N=+,Z=+,C=+,I=-,D=-,V=-, zeropage, 0x26 2 5
ROL N=+,Z=+,C=+,I=-,D=-,V=-, zeropage,X, 0x36 2 6
ROL N=+,Z=+,C=+,I=-,D=-,V=-, absolute, 0x2E 3 6
ROL N=+,Z=+,C=+,I=-,D=-,V=-, absolute,X, 0x3E 3 7
ROR N=+,Z=+,C=+,I=-,D=-,V=-, accumulator, 0x6A 1 2
ROR N=+,Z=+,C=+,I=-,D=-,V=-, zeropage, 0x66 2 5
ROR N=+,Z=+,C=+,I=-,D=-,V=-, zeropage,X, 0x76 2 6
ROR N=+,Z=+,C=+,I=-,D=-,V=-, absolute, 0x6E 3 6
ROR N=+,Z=+,C=+,I=-,D=-,V=-, absolute,X, 0x7E 3 7
RTS N=-,Z=-,C=-,I=-,D=-,V=-, implied, 0x60 1 6
SBC N=+,Z=+,C=+,I=-,D=-,V=+, immediate, 0xE9 2 2
SBC N=+,Z=+,C=+,I=-,D=-,V=+, zeropage, 0xE5 2 3
SBC N=+,Z=+,C=+,I=-,D=-,V=+, zeropage,X, 0xF5 2 4
SBC N=+,Z=+,C=+,I=-,D=-,V=+, absolute, 0xED 3 4
SBC N=+,Z=+,C=+,I=-,D=-,V=+, absolute,X, 0xFD 3 4*
SBC N=+,Z=+,C=+,I=-,D=-,V=+, absolute,Y, 0xF9 3 4*
SBC N=+,Z=+,C=+,I=-,D=-,V=+, (indirect,X), 0xE1 2 6
SBC N=+,Z=+,C=+,I=-,D=-,V=+, (indirect),Y, 0xF1 2 5*
SEC N=-,Z=-,C=1,I=-,D=-,V=-, implied, 0x38 1 2
SED N=-,Z=-,C=-,I=-,D=1,V=-, implied, 0xF8 1 2
SEI N=-,Z=-,C=-,I=1,D=-,V=-, implied, 0x78 1 2
STA N=-,Z=-,C=-,I=-,D=-,V=-, zeropage, 0x85 2 3
STA N=-,Z=-,C=-,I=-,D=-,V=-, zeropage,X, 0x95 2 4
STA N=-,Z=-,C=-,I=-,D=-,V=-, absolute, 0x8D 3 4
STA N=-,Z=-,C=-,I=-,D=-,V=-, absolute,X, 0x9D 3 5
STA N=-,Z=-,C=-,I=-,D=-,V=-, absolute,Y, 0x99 3 5
STA N=-,Z=-,C=-,I=-,D=-,V=-, (indirect,X), 0x81 2 6
STA N=-,Z=-,C=-,I=-,D=-,V=-, (indirect),Y, 0x91 2 6
STX N=-,Z=-,C=-,I=-,D=-,V=-, zeropage, 0x86 2 3
STX N=-,Z=-,C=-,I=-,D=-,V=-, zeropage,Y, 0x96 2 4
STX N=-,Z=-,C=-,I=-,D=-,V=-, absolute, 0x8E 3 4
STY N=-,Z=-,C=-,I=-,D=-,V=-, zeropage, 0x84 2 3
STY N=-,Z=-,C=-,I=-,D=-,V=-, zeropage,X, 0x94 2 4
STY N=-,Z=-,C=-,I=-,D=-,V=-, absolute, 0x8C 3 4
TAX N=+,Z=+,C=-,I=-,D=-,V=-, implied, 0xAA 1 2
TAY N=+,Z=+,C=-,I=-,D=-,V=-, implied, 0xA8 1 2
TSX N=+,Z=+,C=-,I=-,D=-,V=-, implied, 0xBA 1 2
TXA N=+,Z=+,C=-,I=-,D=-,V=-, implied, 0x8A 1 2
TXS N=-,Z=-,C=-,I=-,D=-,V=-, implied, 0x9A 1 2
TYA N=+,Z=+,C=-,I=-,D=-,V=-, implied, 0x98 1 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment