MOS Technology 6502
MOS Technology 6502 is a Microprocesseur 8 bits designed by MOS Technology in 1975. When it was presented, it was the most economic processor by far on the market, to approximately 1/6 of the price, competing with larger companies such as Motorola or Intel. It was nevertheless faster than the majority of them, and with the Zilog Z80, shone in a series of projects of computers which were thereafter the source of the revolution of personal computers of the Eighties. The design of the 6502 was in the beginning sub-contracted by Rockwell and Synertek and later was authorized with a certain number of companies, it is still manufactured for embarked systems.
History and use
The 6502 was conceived mainly by the team which had developed the Motorola 6800. After having left Motorola in block, its engineers quickly left the 6501, of a completely new design but whose stitching remained nevertheless compatible with the 6800. Motorola started legal proceedings immediately, and although today the business would have been déboutée, the damage that MOS incurred was sufficient so that the company agrees to cease producing the 6501.
The result was the 6502, a “juridically unattackable” model. It differed from the precedent by a simple reorganization of stitching, which made it unusable on a mother chart 6800. Motorola gave up its continuations then. However, this change handicapped MOS to obtain new developers, until the engineer Chuck Peddle conceives KIM-1, a computer single-card. With the great surprise of its originators, the KIM-1 was enormously sold to amateurs and handymen as well as on the market initially envisaged of the engineers.
The 6502 left on the market in September 1975 to 25 $, whereas the 6800 and Intel 8008 were sold for 179 $. First of all, much of people thought that it was about a joke, but Motorola and Intel suddenly lowered their prices with 79 $. Instead of the discounted effect, that legitimated the 6502 whose sales took off.
The 6502 had a characteristic which returned particularly it adapted to the use in a personal computer: internal architecture guaranteed that the processor would not reach the bus for one period of its cycle of execution. The video system made profitable this latency to reach the memory screen, without having to resort to an external arbitror. The system effectiveness was thus increased up to 25%. On the other hand, the 6502 did not lay out of meter 8 bit of cooling DRAM like its competitor the Z80.
One of the first “public” use was the Console of video game Atari 2600. The 2600 used a derivative of the 6502 called 6507, which had less pins and could address only 8 KB of memory. Million specimens was sold in this form. The 6502 were used then in the family of the APPLE II, then in the various personal computers of Commodore (series FART and CBM), ACORN (model ATOM), Atari, Micro BBC, the Oric, and an enormous number of other systems which the history from now on forgot. A descendant of the 6502, the 6510, equipped the Commodore 64.
In the BORN, the 6502 used had been modified. This series, which was produced only for Nintendo, taken the name of “2A03/2A07”. The 2A03/2A07 did not have mode BCD of the 6502 but 23 additional registers memory-mapped for the generation of the sound, the posting of the sprites and the management of the levers.
The optimized design of the 6502 also inspired the principal originators of the processor ARM RISC, and one can thus say that they are the successors of this (family) of processors since its spirit still lives in the design of the ARM, used in several desktop machines as well as in a quantity of portable systems and embarked systems, and sold like a block box for completely integrated systems.
Description
The 6502 is a processor 8 bits with a bus of addressing to 16 bits. Internal logic functions at the same speed as the external frequency. This frequency of apparently slow clock, typically 1 MHz, however gave performances comparable with those of other processors to the clock four times swifter. The 6502 is equipped with a cabled internal logic and pipelinée , whereas the other CPU of this time were microprogramed and had internal speeds finally comparable with the 6502 (the internal clock of Z80 for example, was divided by four). Although this can resemble a “easy way”, the peripherals could turn less quickly, which lowered the overall costs of the system, a crucial factor on the very competing market of the game consoles and the personal computers.
With the difference of the Intel 8080 and similar microprocessors, the 6502 has very few registers. At that time the memory was faster than the processors, it was more judicious to want to optimize the access report rather than to increase the number of registers. Inside one finds an accumulator of 8 bits (A), two index registers of 8 bits (X and Y), a register statute of 8 bits (SR), a pointer of pile of 8 bits (SP) and a meter of program of 16 bits (PC). The software access to the pile is made via four instructions in mode of implied addressing standard push or pop of the accumulator or the register of statute of the processor.
The chip uses the pile and index register effectively in several modes of addressing, including a mode shortened or on page zero which reaches the addresses going from 0 to 255 with only one byte of extension (not need to charge with it a second as for a long address) - the specific code 6502 resorts much to addressing in page zero to replace the non-existent registers. For obvious reasons, in the majority of the microcomputers organized around the 6502 with an operating system, OS itself called upon page zero massively, leaving a handle of unutilised bytes as well as possible.
The modes of addressing also include an implicit mode (instructions of 1 byte), absolute (3 bytes), relative (2 bytes), accumulator (1), indirect X and Y (2) and immediate (2):
-
the absolute mode constitutes a general mode of use;
- the relative mode is used for the conditional branch instructions which can move the PC up to 128 bytes forwards or backwards;
- the accumulating mode uses the accumulator as addresses real, and does not need any operand;
- the immediate mode exploits a literal operand of a byte;
- the indirect modes facilitate the matric treatment and the loops. With the indirect mode Y, the register of 8 bits Y is added to a base of 16 bits located in the memory on page zero (whose byte of the instrcution gives the address). Registers X and Y of 8 bits function like pointers rather than in so much of normal indices. The incrementing of X or Y, necessary to traverse the table sequentially takes of two cycles, the table which can be located anywhere in the space of addressing of 16 bits. It is one of the points where the 6502 innovates more compared to the Motorola 6800. A too fast glance on the specifications of the 6502, letting believe that there are only two index registers of 8 bits, does not reflect all the power of the processor.
See the article Hello world (in English) for an example simple but characteristic of the assembly language of the 6502
Fuzzy characteristics
The 6502s are known to conceal a quantity of not documented instructions which change a version to another of the processor. The decoder of instruction of the 6502 is produced in a cabled logic whose operation is guaranteed only for the valid opcodes. The 32 opcodes not documented start several instructions simultaneously, leading to unexpected results.
The indirect branch instruction of the 6502, JMP (xxxx), is boguée. If the address, into hexadecimal, is xxFF, the processor jumps not to the stored address to (xxFF) and (xxFF+1), but rather with (xxFF) and (xx00). Neither the 6510 nor the versions posterior NMOS of the 6502 such as the 8502 and the 2A03 corrected this bug. Bill Mensch, of the Western Design Center, was the first to rectify it in the derivative CMOS 65C02; the 65C816, a successor 16 bits of the 65C02, in is also free.
Remarks on the 6502
-
In 1984 in science fiction film Terminator with Arnold Schwarzenegger, the public has one moment sees a scene through the eye/camera of the robot T-800 Model-101, where a fragment of program in code assembler of the 6502 ravels in bottom of the screen. The shown absolute code is the exit screen of a program of Checksum for APPLE II published in stores “Nibble”.
- In the animated series of television Futurama , It was indicated in the episode “Fry & the Slurm Factory” that Bender, a “industrial robot” androïde of fiction, built into 2998, had of the 6502 as “a brain”.
References
- Mansfield, Richard (1983). Machine Language For Beginners. Personal Computer Machine Language Programming For The Atari, VIC, Apple, Commodore 64, And PET/CBM Computers (but, Machine Language Programming For BASIC Language Programmers ). Greensboro, North Carolina: Compute! Publications, Inc. Copyright © 1983, Small System Services, Inc. ISBN 0-942386-11-6. to see the external bonds in lower part.
External bonds (in French)
- '' instruction set of the 6502/6510 '' - on the site " idoc64.free.fr"
External bonds (in English)
- '' Language Machine for beginners '' (complete text) - of atariarchives.org
- www.6502.org
| Random links: | Etienne (first martyr) | Evaluación perezosa | Chicken with plums | Patrick Renna | Battle of the course Celidonio | Cell with diamond anvils | Hémi-acétal |