* Notes - 6502 Instruction Set - 3-letter instructions - optional argument, value or address - program counter and progression * Moving values around - LDA, LDX, LDY :: load a value into a register - STA, STX, STY :: store a value from a register to memory - TAX, TXA, TAY, TYA :: copy a value between registers * Math - ADC :: add in accumulator, with carry bit - SBC :: subtract in accumulator, with carry (borrow) bit - SEC, CLC :: set or clear carry bit * Bitwise operations - ASL :: shift accumulator left (multiply by 2) - LSR :: shift accumulator bits right (divide by 2) - ROL :: rotate accumulator bits left, wrapping carry - ROR :: rotate accumulator bits right, wrapping carry - AND :: do boolean AND in accumulator - ORA :: do boolean OR in accumulator - EOR :: do boolean exclusive OR in accumulator - BIT :: check if bits are set in a location * Looping or Counting - INX, INY :: increment a register - DEX, DEY :: decrement a register - INC, DEC :: increment/decrement a value in memory * Jumping - JMP :: jump and don't return - JSR :: jump and return to this spot on RTS - RTS :: return to the location of the last JSR * Branch on conditions - CMP, CPX, CPY :: compare a register to another value - BEQ, BNE :: branch if equal or not-equal to zero - BCC, BCS :: branch if carry flag clear or set - BMI, BPL :: branch if minus or plus - BVC, BVS :: branch if overflow bit clear or set * Stack operations - PHA :: Push accumulator value onto stack - PLA :: Pull top stack value to accumulator - PHP :: Push status register to stack - PLP :: Pull top stack value to status register * Debugging - NOP :: No operation - BRK :: Break out of program * Other - SED, CLD :: Set or clear decimal mode - SEI, CLI :: Set or clear interrupt mode - CLV :: Clear overflow bit - RTI :: Return from interrupt routine - TSX, TXS :: copy between X register and stack pointer (SP)