Open main menu

CDOT Wiki β

Changes

6502

1,212 bytes added, 13:06, 8 January 2020
no edit summary
** V - Overflow - Set when a math operation overflows a one-byte result
** S - Negative Sign - set when an operation produces a negative result
 
== Instruction Set ==
 
The 6502 instruction set consist of a number of single-byte [[OpCode|opcodes]], each of which is followed by 0, 1, or 2 bytes of arguments. Each opcode corresponded to an [[Instruction|instruction]], which consists of an [[Operation|operation]] and an [[Addressing Mode|addressing mode]]. 6502 [[Assembly Language]] uses 3-letter menomics to specify the operation, and argument syntax to specify the addressing mode. For example:
 
LDA #$05 ; load the accumulator with the number 5
LDA $05 ; load the accumulator with the contents of memory location 5 (in the zero page)
LDA $f005 ; load the accumulator with the contents of memory location $f005
 
See the references (below) for the full details of the 6502 instruction set.
 
== 6502 Emulator ==
 
Since 6502 systems are no longer very common, a web-based [[6502 Emulator]] is available for assembling, testing, and debugging 6502 Assembly code.
 
== References ==
 
* Resources
** [https://skilldrick.github.io/easy6502/ Easy 6502]
** [http://www.6502.org/tutorials/6502opcodes.html 6502 Opcodes with Register Definitions]
** [https://www.masswerk.at/6502/6502_instruction_set.html 6502 Opcodes with Detailed Operation Information]