Index register
Encyclopedia
An index registerCommonly known as a B-line in early British computers. in a computer's CPU
Central processing unit
The central processing unit is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in...

 is a processor register
Processor register
In computer architecture, a processor register is a small amount of storage available as part of a CPU or other digital processor. Such registers are addressed by mechanisms other than main memory and can be accessed more quickly...

 used for modifying operand
Operand
In mathematics, an operand is the object of a mathematical operation, a quantity on which an operation is performed.-Example :The following arithmetic expression shows an example of operators and operands:3 + 6 = 9\;...

 addresses during the run of a program, typically for doing vector/array operations. Index registers were first used in the British
United Kingdom
The United Kingdom of Great Britain and Northern IrelandIn the United Kingdom and Dependencies, other languages have been officially recognised as legitimate autochthonous languages under the European Charter for Regional or Minority Languages...

 Manchester Mark 1
Manchester Mark 1
The Manchester Mark 1 was one of the earliest stored-program computers, developed at the Victoria University of Manchester from the Small-Scale Experimental Machine or "Baby" . It was also called the Manchester Automatic Digital Machine, or MADM...

 computer, in 1949.

Index registers are used for a special kind of indirect addressing where an immediate constant (one that is part of the instruction itself) is added to the contents of a register to form the address to the actual operand or data. Some instruction set
Instruction set
An instruction set, or instruction set architecture , is the part of the computer architecture related to programming, including the native data types, instructions, registers, addressing modes, memory architecture, interrupt and exception handling, and external I/O...

s allow more than one index register to be used; in that case an additioanl instruction field specifies the second index register to use.

In early computers without any form of indirect addressing, array operations had to be performed either by linearly repeating program code for each array element (i.e. over all address locations), or by using rather "dirty" self-modifying code
Self-modifying code
In computer science, self-modifying code is code that alters its own instructions while it is executing - usually to reduce the instruction path length and improve performance or simply to reduce otherwise repetitively similar code, thus simplifying maintenance...

 techniques – both alternatives leading to quite significant disadvantages in program flexibility and maintenance, as well as being wasteful of computer memory; the latter a very scarce resource in computer installations of the early era (as well as in early microcomputers several decades later).

In general, index registers became a standard part of computers during the technology's second generation (roughly 1955–1964). See, for example, the IBM 700/7000
IBM 700/7000 series
The IBM 700/7000 series was a series of large-scale computer systems made by IBM through the 1950s and early 1960s. The series included several different, incompatible processor architectures. The 700s used vacuum tube logic and were made obsolete by the introduction of the transistorized 7000s...

 mainframe
Mainframe computer
Mainframes are powerful computers used primarily by corporate and governmental organizations for critical applications, bulk data processing such as census, industry and consumer statistics, enterprise resource planning, and financial transaction processing.The term originally referred to the...

s. Early "small machines" with index registers include the AN/USQ-17
AN/USQ-17
The AN/USQ-17 or Naval Tactical Data System computer referred to in Sperry Rand documents as the Univac M-460, was Seymour Cray's last design for UNIVAC...

, around 1960, and the real-time computers from Scientific Data Systems
Scientific Data Systems
Scientific Data Systems, or SDS, was an American computer company founded in September 1961 by Max Palevsky, a veteran of Packard Bell and Bendix, along with eleven other computer scientists. SDS was an early adopter of integrated circuits in computer design and the first to employ silicon...

. The first microprocessor
Microprocessor
A microprocessor incorporates the functions of a computer's central processing unit on a single integrated circuit, or at most a few integrated circuits. It is a multipurpose, programmable device that accepts digital data as input, processes it according to instructions stored in its memory, and...

 with an index register appears to have been the Motorola 6800
Motorola 6800
The 6800 was an 8-bit microprocessor designed and first manufactured by Motorola in 1974. The MC6800 microprocessor was part of the M6800 Microcomputer System that also included serial and parallel interface ICs, RAM, ROM and other support chips...

, whose upgraded clone MOS Technology 6502
MOS Technology 6502
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...

 made good use of two such registers.

RISC computer designs such as the MIPS architecture
MIPS architecture
MIPS is a reduced instruction set computer instruction set architecture developed by MIPS Technologies . The early MIPS architectures were 32-bit, and later versions were 64-bit...

 generally do not have dedicated index registers; neither do some CISC
CISC
CISC may refer to:*Caribbean Island Swimming Championships*Centre for Innovation and Structural Change*Chongqing Iron and Steel Company* Clean intermittent self-catheterisation, a form of urinary catheterization*Complex instruction set computing...

 architectures, such as the IBM System/360 and its successors and the IA-32
IA-32
IA-32 , also known as x86-32, i386 or x86, is the CISC instruction-set architecture of Intel's most commercially successful microprocessors, and was first implemented in the Intel 80386 as a 32-bit extension of x86 architecture...

 and x86-64
X86-64
x86-64 is an extension of the x86 instruction set. It supports vastly larger virtual and physical address spaces than are possible on x86, thereby allowing programmers to conveniently work with much larger data sets. x86-64 also provides 64-bit general purpose registers and numerous other...

architectures. Instead they allow any general purpose register to contain an address, and a constant value or the contents of another register to be added to it as an offset.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK