Category:6502 Assembly

From Rosetta Code
Revision as of 10:19, 25 August 2021 by Puppydrum64 (talk | contribs)


This page is a stub. It needs more information! You can help Rosetta Code by filling it in!
Language
6502 Assembly
This programming language may be used to instruct a computer to perform a task.
Official website
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using 6502 Assembly.

The MOS Technology 6502 is an 8-bit microprocessor that was designed by Chuck Peddle and Bill Mensch for MOS Technology in 1975. When it was introduced, it was the least expensive full-featured microprocessor 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 fully comparable with 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. The 6502 design, with about 4,000 transistors, was originally second-sourced by Rockwell and Synertek and later licensed to a number of companies. It is still made for embedded systems.

One of the first "public" uses for the design was the Apple I computer, introduced in 1976. The 6502 was next used in the Commodore PET and the Apple II. It was later used in the Atari home computers, the BBC Micro family, the Commodore VIC-20 and a large number of other designs both for home computers and business, such as Ohio Scientific and Oric.

The Ricoh 2A03/2A07 was created from a second source 6502 and used in the Nintendo Entertainment System in the US. The Ricoh 2A07 was used in the European model. Both use the same instructions as the 6502 but the Binary Coded Decimal mode does not function on either. The Decimal flag can still be set and cleared, but it will have no effect on any calculations. The functionality was replicated in software, as most NES games keep track of score and display it as decimal digits.

Registers

The 6502 has three main data registers: A (the accumulator), X, and Y. Most mathematical operations can only be done with the accumulator. X and Y are often limited to loop counters and offsets for indirect addressing. It also has the system flags, the stack pointer, and the program counter.

RAM

The first 256 bytes of the 6502's address space is known as "zero page RAM" and can be accessed more quickly than other sections of RAM. If a 8 bit address is used as an instruction parameter, it is actually referring to the zero page. (The high byte equals $00 and is thus omitted). This saves space, as the $00 high byte is not actually included in the bytecode, so a load/store to/from zero page takes one less byte than a load/store to/from anywhere else.

A True 8-Bit Computer

The 6502 is an 8-bit computer in the purest sense. Unlike the Z80, the 6502 is not capable of 16 bit operations within a single register. To work with a 16 bit number you will need to split it in two and work with each half individually.

Citations

  1. Wikipedia: MOS Technology 6502
  2. Wikipedia: Ricoh 2A03
  3. [assembler and debugger in JavaScript

See Also

Subcategories

This category has the following 3 subcategories, out of 3 total.

Pages in category "6502 Assembly"

The following 129 pages are in this category, out of 129 total.