In learning 6502 assembly, before doing much with “how to” do things, I thought it might be helpful to at least have a basic understanding of the 56 opcodes in the 6502’s instruction set. This post wont go into the details of each instruction, but lists each one with a brief description – a reference. I’ve capitalized key letters in the descriptions to show the relationship to the opcode instruction.
Instructions
ADC = ADd with Carry
AND = AND (w/accumulator)
ASL = Arithmetic Shift Left
BCC = Branch on Carry Clear
BCS = Branch on Carry Set
BEQ = Branch on EQual
BIT = BIT test
BMI = Branch on MInus
BNE = Branch on Not Equal
BPL = Branch on PLus
BRK = BReaK, or interrupt
BVC = Branch on oVerflow Clear
BVS = Branch on oVerflow Set
CLC = CLear Carry
CLD = CLear Decimal
CLI = CLear Interrupt disable
CLV = CLear oVerflow
CMP = CoMPare (w/accumulator)
CPX = ComPare with X
CPY = ComPare with Y
DEC = DECrement
DEX = DEcrement X
DEY = DEcrement Y
EOR = Exclusive OR (w/accumulator)
INC = INCrement
INX = INcrement X
INY = INcrement Y
JMP = JuMP (to address)
JSR = Jump to SubRoutine
LDA = LoaD Accumulator
LDX = LoaD X
LDY = LoaD Y
LSR = Logical Shift Right
NOP = No OPeration
ORA = OR with Accumulator
PHA = PusH Accumulator
PHP = PusH Processor status
PLA = PuLl Accumulator
PLP = PuLl Processor status
ROL = ROtate Left
ROR = ROtate Right
RTI = ReTurn from Interrupt
RTS = ReTurn from Subroutine
SBC = SuBtract with Carry
SEC = SEt Carry
SED = SEt Decimal
SEI = SEt Interrupt disable
STA = STore Accumulator
STX = STore X
STY = STore Y
TAX = Transfer Accumulator to X
TAY = Transfer Accumulator to Y
TSX = Transfer Stack pointer to X
TXA = Transfer X to Accumulator
TXS = Transfer X to Stack pointer
TYA = Transfer Y to Accumulator
Now that I have a basic understanding of the available instructions, I’ll start to explore them in more detail. Until next time…