This file is the html version of 6502machinecode.asc. The big ol'table of 6502 opcodes makes more sense in octal. note: b is a byte operand, w is a word operand, [] means accessing memory at the address inside. Red opcodes are unofficial.
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |
---|---|---|---|---|---|---|---|---|
00 | BRK | ORA[[b+X]] | XX | SLO[[b+X]]? | NOP[b]? | ORA[b] | ASL[b] | SLO[b]? |
01 | PHP | ORA b | ASL A | ANC b? | NOP[w]? | ORA[w] | ASL[w] | SLO[w]? |
02 | BPL b | ORA[[b]+Y] | XX | SLO[[b]+Y]? | NOP[b+X]? | ORA[b+X] | ASL[b+X] | SLO[b+X]? |
03 | CLC | ORA[w+Y] | NOP? | SLO[w+Y]? | NOP[w+X]? | ORA[w+X] | ASL[w+X] | SLO[w+X]? |
04 | JSR w | AND[[b+X]] | XX | RLA[[b+X]]? | BIT[b] | AND[b] | ROL[b] | RLA[b]? |
05 | PLP | AND b | ROL A | ANC b? | BIT[w] | AND[w] | ROL[w] | RLA[w]? |
06 | BMI b | AND[[b]+Y] | XX | RLA[[b]+Y]? | NOP[b+X]? | AND[b+X] | ROL[b+X] | RLA[b+X]? |
07 | SEC | AND[w+Y] | NOP? | RLA[w+Y]? | NOP[w+X]? | AND[w+X] | ROL[w+X] | RLA[w+X]? |
10 | RTI | EOR[[b+X]] | XX | SRE[[b+X]]? | NOP[b]? | EOR[b] | LSR[b] | SRE[b]? |
11 | PHA | EOR b | LSR A | ALR b? | JMP w | EOR[w] | LSR[w] | SRE[w]? |
12 | BVC b | EOR[[b]+Y] | XX | SRE[[b]+Y]? | NOP[b+X]? | EOR[b+X] | LSR[b+X] | SRE[b+X]? |
13 | CLI | EOR[w+Y] | NOP? | SRE[w+Y]? | NOP[w+X]? | EOR[w+X] | LSR[w+X] | SRE[w+X]? |
14 | RTS | ADC[[b+X]] | XX | RRA[[b+X]]? | NOP[b]? | ADC[b] | ROR[b] | RRA[b]? |
15 | PLA | ADC b | ROR A | ARR b? | JMP[w] | ADC[w] | ROR[w] | RRA[w]? |
16 | BVS b | ADC[[b]+Y] | XX | RRA[[b]+Y]? | NOP[b+X]? | ADC[b+X] | ROR[b+X] | RRA[b+X]? |
17 | SEI | ADC[w+Y] | NOP? | RRA[w+Y]? | NOP[w+X]? | ADC[w+X] | ROR[w+X] | RRA[w+X]? |
20 | NOP b? | STA[[b+X]] | NOP b? | SAX[[b+X]]? | STY[b] | STA[b] | STX[b] | SAX[b]? |
21 | DEY | NOP b? | TXA | XX | STY[w] | STA[w] | STX[w] | SAX[w]? |
22 | BCC b | STA[[b]+Y] | XX | XX | STY[b+X] | STA[b+X] | STX[b+X] | SAX[b+Y]? |
23 | TYA | STA[w+Y] | TXS | XX | XX | STA[w+X] | XX | XX |
24 | LDY b | LDA[[b+X]] | LDX b | LAX[[b+X]]? | LDY[b] | LDA[b] | LDX[b] | LAX [b]? |
25 | TAY | LDA b | TAX | XX | LDY[w] | LDA[w] | LDX[w] | LAX [w]? |
26 | BCS b | LDA[[b]+Y] | XX | LAX[[b]+Y]? | LDY[b+X] | LDA[b+X] | LDX[b+X] | LAX[b+Y]? |
27 | CLV | LDA[w+Y] | TSX | XX | LDY[w+X] | LDA[w+X] | LDX[w+Y] | LAX[w+Y]? |
30 | CPY b | CMP[[b+X]] | NOP b? | DCP[[b+X]]? | CPY[b] | CMP[b] | DEC[b] | DCP[b]? |
31 | INY | CMP b | DEX | AXS b? | CPY[w] | CMP[w] | DEC[w] | DCP[w]? |
32 | BNE b | CMP[[b]+Y] | XX | DCP[[b]+Y]? | NOP[b+X]? | CMP[b+X] | DEC[b+X] | DCP[b+X]? |
33 | CLD | CMP[w+Y] | NOP? | DCP[w+Y]? | NOP[w+X]? | CMP[w+X] | DEC[w+X] | DCP[w+X]? |
34 | CPX b | SBC[[b+X]] | NOP b? | ISC[[b+X]]? | CPX[b] | SBC[b] | INC[b] | ISC[b]? |
35 | INX | SBC b | NOP | XX | CPX[w] | SBC[w] | INC[w] | ISC[w]? |
36 | BEQ b | SBC[[b]+Y] | XX | ISC[[b]+Y]? | NOP[b+X]? | SBC[b+X] | INC[b+X] | ISC[b+X]? |
37 | SED | SBC[w+Y] | NOP? | ISC[w+Y]? | NOP[w+X]? | SBC[w+X] | INC[w+Y] | ISC[w+X]? |