Skip to main content

MOS-6502 Instruction Set

·

Instruction set for all variation of the MOS-6502. Check specification for abbreviations.

Sorted alphabetically #

mnemonic Alias Description Flags affected CPU
ADC Add With Carry n,v,z,c 6502
AND AND Accumulator With Memory n,z 6502
ASL ASL A Accumulator or Memory Shift Left n,z,c 6502
BBR BBR# Branch on Bit in zero page Reset none R
BBS BBS# Branch on Bit in zero page Set none R
BCC BLT Branch if Carry Clear none 6502
BCS BGE Branch if Carry Set none 6502
BEQ Branch if Equal none 6502
BIT Test Bits n,v,z 6502
BMI Branch if Minus none 6502
BNE Branch if Not Equal none 6502
BPL Branch if Plus none 6502
BRA Branch Always none 65C02
BRK Break b,d,i 6502
BRL BRA Branch Long Always none 65816
BVC Branch if Overflow Clear none 6502
BVS Branch if Overflow Set none 6502
CLC Clear Carry c 6502
CLD Clear Decimal Mode Flag d 6502
CLI Clear Interrupt Disable Flag i 6502
CLV Clear Overflow Flag v 6502
CMP Compare Accumulator With Memory n,z,c 6502
COP Co-Processor Enable d,i 6502
CPX Compare Index Register X with Memory n,z,c 6502
CPY Compare Index Register Y with Memory n,z,c 6502
DEA DEC A Decrement Accumulator n,z 65C02
DEC Decrement n,z 6502
DEX Decrement Index Register X n,z 6502
DEY Decrement Index Register Y n,z 6502
EOR Exclusive-OR Accumulator with Memory n,z 6502
INA INC A Increment Accumulator n,z 65C02
INC Increment n,z 6502
INX Increment Index Register X n,z 6502
INY Increment Index Register Y n,z 6502
JML Jump long none 65816
JMP Jump none 6502
JSL Jump to Subroutine long none 65816
JSR Jump to Subroutine none 6502
LDA Load Accumulator from Memory n,z 6502
LDX Load Index Register X from Memory n,z 6502
LDY Load Index Register Y from Memory n,z 6502
LSR LSR A Logical Shift Memory or Accumulator Right n,z,c 6502
MVN Block Move Negative none 65816
MVP Block Move Positive none 65816
NOP No Operation none 6502
ORA OR Accumulator with Memory n,z 6502
PEA Push Effective Absolute Address none 6502
PEI Push Effective Indirect Address none 6502
PER Push Effective PC Relative Indirect Address none 6502
PHA Push Accumulator none 6502
PHB Push Data Bank Register none 65816
PHD Push Direct Page Register none 65816
PHK Push Program Bank Register none 65816
PHP Push Processor Status Register none 6502
PHX Push Index Register X none 65C02
PHY Push Index Register Y none 65C02
PLA Pull Accumulator n,z 6502
PLB Pull Data Bank Register n,z 65816
PLD Pull Direct Page Register n,z 65816
PLP Pull Processor Status Register n,z 6502
PLX Pull Index Register X n,z 65C02
PLY Pull Index Register Y n,z 65C02
REP Reset Processor Status Bits all except b 65816
RMB RMB# Reset (clear) bit number bit# in zero page none R
ROL ROL A Rotate Memory or Accumulator Left n,z,c 6502
ROR ROR A Rotate Memory or Accumulator Right n,z,c 6502
RTI Return from Interrupt all except b 6502
RTL Return from Subroutine Long none 65816
RTS Return from Subroutine none 6502
SBC Subtract with Borrow from Accumulator n,v,z,c 6502
SEC Set Carry Flag c 6502
SED Set Decimal Flag d 6502
SEI Set Interrupt Disable Flag i 6502
SEP Set Processor Status Bits all except b 65816
SMB SMB# Set bit number bit# in zero page none R
STA Store Accumulator to Memory none 6502
STP Stop Processor none WDC
STX Store Index Register X to Memory none 6502
STY Store Index Register Y to Memory none 6502
STZ Store Zero to Memory none 65C02
TAX Transfer Accumulator to Index Register X n,z 6502
TAY Transfer Accumulator to Index Register Y n,z 6502
TCD Transfer 16-bit Accumulator to Direct Page Register n,z 65816
TCS Transfer 16-bit Accumulator to Stack Pointer none 65816
TDC Transfer Direct Page Register to 16-bit Accumulator n,z 65816
TRB Test and Reset Memory Bits Against Accumulator z 65C02
TSB Test and Set Memory Bits Against Accumulator z 65C02
TSC Transfer Stack Pointer to 16-bit Accumulator n,z 65816
TSX Transfer Stack Pointer to Index Register X n,z 6502
TXA Transfer Index Register X to Accumulator n,z 6502
TXS Transfer Index Register X to Stack Pointer none 6502
TXY Transfer Index Register X to Index Register Y n,z 65816
TYA Transfer Index Register Y to Accumulator n,z 6502
TYX Transfer Index Register Y to Index Register X n,z 6502
WAI Wait for Interrupt none WDC
WDM Reserved for Future Expansion none 65816
XBA Exchange B and A 8-bit Accumulators n,z 65816
XCE Exchange Carry and Emulation Flags m,b/x,c,e 65816

Other specifications #