Bank switching


Bank switching

Bank switching (also known as "paging", but only loosely related to the ordinary meaning of "paging" in computing) was a technique common in 8-bit microcomputer systems, to increase the amount of addressable RAM and ROM without extending the address bus. Bank switching was also used to configure a system differently at different times, for example, a ROM required to start a system from diskette could be switched out when no longer needed. Certain modern microcontrollers use bank switching to manage read-write memory, non-volatile memory, input-output devices and system management registers.

Since 8-bit CPUs such as the Zilog Z80 and the MOS Technology 6502 series, with their 16-bit address registers, could only address a maximum of 64 KB of memory (in case of a single address being an 8-bit element, see address bus), 8-bit systems containing more than 64 KB of memory addressed memory in banks (or "pages"). Typically there was some memory that was always mapped into the processors address space and other parts that could be switched in and out through use of a bank select register. Caution was required when breaking memory into banks so that the processor could always correctly handle interrupts and the processor stack, if any. Unlike other memory management techniques, bank switching was nearly always initiated by the application program explicitly, although some operating systems such as CP/M version 3.0 took detailed control of the bank switching operation out of the application programmer's hands. The contents of memory temporarily bank-switched out of the processors address space was inaccessible to the processor, but may have been used by, for example, video display hardware or disk controllers.

While bank switching was less efficient than switching to a processor with a wider address bus would have been, it was an inexpensive way to increase the shelf life of several computer lines of the 1980s and it provided a high degree of backward compatibility with earlier systems: for example, the Apple IIe, IIc (see Apple II series), and Apple III could run software written for the Apple II+, and the Commodore 128 could run practically all of the software written for its much more prevalent predecessor, the C64 (which had already employed bank switching to allow for a full 64KB of RAM and still provide for ROM and memory-mapped I/O as well). Running code in the lower 64 KB part of memory on a C128 is as simple as addressing the first (lowest) bank. To access data or execute code in the upper 64 KB, it's perhaps easiest to just use the KERNAL ROM routines provided for this purpose. Alternatively, the programmer can use the MMU to establish a shared block of memory, set up a few control-transfer routines there, and then use those routines as needed. Furthermore, the 40-column VIC-IIe display chip can be configured to read from either bank of RAM. Similarly, the Atari 130XE could allow its two processors (the 6502 and the ANTIC) to access separate RAM banks, allowing programmers on both machines to make large playfields and other graphic objects without using up the memory visible to the CPU.

Bank switching in the IBM PC

In 1988 the companies Lotus, Intel and Microsoft agreed on a specification called Expanded Memory System (EMS, also stated as LIM-EMS) for use in IBM PC compatible computers running MS-DOS. It was a form of bank switching technique that allowed more than the 640 KB of RAM foreseen by the original IBM PC architecture, by letting it appear piecewise in a 64KB "window" located in the Upper Memory Area. Some computer games made use of this, and the feature is nowadays emulated by later Microsoft Windows operating systems to provide backwards compatibility with those programs.

Video game consoles

Bank switching was also utilized in some video game consoles. The Atari 2600, for instance, could only address 4 KB of ROM, so later 2600 game cartridges contained their own bank switching hardware in order to permit the use of more ROM and thus allow for more sophisticated games (via more program code and, equally important, larger amounts of gameworld data such as graphics and sound). The Nintendo Entertainment System contained a modified 6502 but its cartridges sometimes contained a megabit or more of ROM, addressed via bank switching called a Multi-Memory Controller. Game Boy cartridges used a chip called MBC (Memory Bank Controller), which not only offered ROM bank switching, but also cartridge SRAM bank switching, and even access to such features as infrared links or rumble motors. Bank switching was still being used on later games systems. Several Sega Mega Drive cartridges were over 4MB in size and required the use of this technique (4MB being the maximum address size).The GP2X handheld from Gamepark Holdings uses bank switching in order to control the start address (or memory offset) for the second processor.

ee also

Sideways address space, an example of bank switching on the BBC Micro

Computers using bank switching

* Amstrad CPC
* Amstrad PCW
* Apple II series
* Apple III
* Commodore 128
* MSX
* PIC microcontroller
* ZX Spectrum 128 models
* Super TV-Boy

External links

* [http://folklore.org/StoryView.py?project=Macintosh&story=Well_See_About_That.txt&sortOrder=Sort%20by%20Date&detail=medium Story about bank switching in the Apple II.]


Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Bank Switching — und Adressspeicherumschaltung (ASU) sind synonyme Begriffe für die Erweiterung des Computerspeichers eines Computers (RAM oder ROM) über seine natürlichen Adressierungsräume hinaus durch das durch Software gesteuerte, aber in Hardware umgesetzte… …   Deutsch Wikipedia

  • bank switching — noun (computing) The process of switching between one bank of memory and another to increase available memory • • • Main Entry: ↑bank …   Useful english dictionary

  • Bank Switching —   [engl.], Bankumschaltung …   Universal-Lexikon

  • switching cost — UK US noun [C] COMMERCE ► the cost of moving your bank account to another bank, changing to a different phone service, etc: »People put up with bad service because the switching costs are high …   Financial and business terms

  • Bank of Queensland — Infobox Company company name = Bank of Queensland Limited company company type = Public (asx|BOQ company slogan = foundation = 1874 location = Head Office Brisbane, Australia key people = Neil Roberts, Chairman David Liddy, CEO num employees =… …   Wikipedia

  • Memory bank — A memory bank is a logical unit of storage in electronics, which is hardware dependent. In computer the memory bank may be determined by the memory access controller and the CPU along with physical organization of the hardware memory slots. Some… …   Wikipedia

  • National Bank of Ukraine — Національний банк України National Bank of Ukraine building …   Wikipedia

  • Dutch Bangla Bank — Limited Type Private (Non Government), (DSE DUTCHBANGL) Industry Banking Founded …   Wikipedia

  • Halifax (Irish bank) — Infobox Company company name = Bank of Scotland (Ireland) Limited (trading as Halifax) company company type = Private company slogan = Always giving you extra (Halifax brand) foundation = (1933, as ICC Bank) location = flagicon|IRE Dublin,… …   Wikipedia

  • Bankswitching — Bank Switching und Adressspeicherumschaltung (ASU) sind synonyme Begriffe für die Erweiterung des Computerspeichers eines Computers (RAM oder ROM) über seine natürlichen Adressierungsräume hinaus durch das durch Software gesteuerte, aber in… …   Deutsch Wikipedia