6502

6502

(hardware)An eight-bit microprocessor designed by MOS Technologies around 1975 and made by Rockwell.

Unlike the Intel 8080 and its kind, the 6502 had very fewregisters. It was an 8-bit processor, with 16-bit address bus. Inside was one 8-bit data register (accumulator), two8-bit index registers and an 8-bit stack pointer (stackwas preset from address 256 to 511). It used these index andstack registers effectively, with more addressing modes,including a fast zero-page mode that accessed memory locationsfrom address 0 to 255 with an 8-bit address (it didn't have tofetch a second byte for the address).

Back when the 6502 was introduced, RAM was actually fasterthan CPUs, so it made sense to optimise for RAM accessrather than increase the number of registers on a chip.

The 6502 was used in the BBC Microcomputer, Apple II,Commodore, Apple Computer and Atari personal computers. Steve Wozniak described it as the first chipyou could get for less than a hundred dollars (actually aquarter of the 6800 price).

The 6502's indirect jump instruction, JMP (xxxx), wasbroken. If the address was hexadecimal xxFF, the processorwould not access the address stored in xxFF and xxFF + 1, butrather xxFF and xx00. The 6510 did not fix this bug, norwas it fixed in any of the other NMOS versions of the 6502such as the 8502. Bill Mensch at Western Design Centerwas probably the first to fix it, in the 65C02.

The 6502 also had undocumented instructions.

The 65816 is an expanded version of the 6502.

There is a 6502 assembler by Doug Jones which supports macros and conditional features and can beused for linkage editing of object files. It requiresPascal.

See also cross-assembler, RTI, Small-C.

6502

An 8-bit microprocessor from Rockwell International Corporation used in the Apple II and earlier Atari and Commodore computers.