Open main menu

CDOT Wiki β

Changes

6502

130 bytes added, 01:33, 11 September 2023
Resources
[[Category:SPO600]][[Category:Computer Architecture]][[Category:6502]][[Image:MOS_6502_1.jpg|thumb|400px|right|The MOS 6502 processor. Image credit: Christian Bassow - [https://creativecommons.org/licenses/by-sa/4.0 CC-BY-SA 4.0] ]]The MOS Technologies 6502 processor was introduced in the mid-1970s to fill the need for a affordable general-purpose CPU. Its low cost (US$25 at introduction, less than C$0.89 now) was less than one-sixth of competing CPUs, and it had very simple circuitry requirements which made it simple and inexpensive to incorporate it into products. The 6502 (or a slight variation) was therefore used in many home and personal computers, such as the Apple II; the Commodore PET, Vic-20, and C64; the Atari 400 and 800; the BBC Micro; and games such as the Nintendo Entertainment System (NES), Atari 5200, and Atari 6200. A number of variations of this processor have been produced, using different semiconductor processes, integrated peripherals, instruction and data-width extensions, and pinouts. Several different versions are still in production for various embedded applications, and it remains a popular chip for homebrew system builders.
{{Admon/tip|Hex notation - $XX|In most 6502 documentation, including this page, the <code>$</code> character prefix indicates hexadecimal notation. On other systems, this is may be designated by a <code>0x</code> prefix.}}
== Memory ==
== 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 [[6502 Addressing ModeModes|addressing mode]]. 6502 [[Assembly Language]] uses 3-letter menomics mnemonics 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 ($05 in the zero page($0005)
LDA $f005 ; load the accumulator with the contents of memory location $f005
* [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]
* [https://www.pagetable.com/c64ref/6502/?tab=2 6502 instructions via the "Ultimate Commodore 64 Reference" site]
* [https://monster6502.com/ MOnSter 6502] - a large-scale, transistor-level implementation of the 6502, with lots of LEDs!