MOS Technology 6502

From Computer History Wiki
Revision as of 16:03, 18 January 2013 by Tor (talk | contribs) (Added missing parenthesis)
Jump to: navigation, search

The MOS Technology 6502 is an 8-bit microprocessor that was designed by Chuck Peddle for MOS Technology in 1975. When it was introduced, it was the least expensive full-featured CPU on the market by a considerable margin, costing less than one-sixth the price of competing designs from larger companies such as Motorola and Intel. It was nevertheless faster than most of them, and, along with the Zilog Z80, sparked a series of computer projects that would eventually result in the home computer revolution of the 1980s.

It was widely used in Apple, Atari and BBC computers, plus of course Commodore, the company which eventually bought out MOS Technology.

MOS 6502AD 4585 top.jpg

The original NMOS 6502 turned out to have unusually few bugs during the development cycle, unlike some competitors, but there were still a small number of quirks that occasionally created trouble. The most well-known one was probably the 'JMP ($xxFF)' bug. This is a jump to an indirect address, where the LSB of the destination address is in location $xxFF ('xx' can be whatever), and the MSB of the destination address is in location $xy00, where xy = xx+1. The bug is that in the case where the LSB byte is in the last address of a page (as indicated by the FF) the MSB is not read from the first byte of the next page but instead it's read from the first byte of the current page. So, if we have JMP ($05FF) the address should be composed of an LSB from $05FF and an MSB from $0600. Instead the MSB is read from $0500. This bug would be rare enough that a user may never be hit by it, particularly when using an assembler which knew about the bug and could detect a problematic address.

The CMOS version

This bug, and a couple of others, were removed when the processor was redesigned using CMOS instead of NMOS. The CMOS version was manufactured and even designed by more than one company (and leased for production to even more companies), the two most well-known versions are the Rockwell 65C02 and Western Design Center (WDC) 65C02. WDC also designed other variants, including 65SC02.

Current status of the 6502

WDC continues production and licensing of the 65C02 to this day, in 44-pin PLCC packages as well as the good old 40-pin DIP variant, but now it runs at up to 14MHz (conservatively. 20MHz is often achieavable). WDC also licenses 65C02 cores that run up to 200MHz. It's hard to believe, but the 65C02 (including cores) still sells in hundreds of million units per year as of 2012. There's probably one or more in your car, unless it's as old as my car. If you have an implanted heart defibrillator or a pacemaker then you probably (and certainly if it's a defibrillator) have a 65C02 inside your body, the only (AFAIK) processor so far approved for human body implants.