Index register
The index registers are special registers of a processor . In them are offsets stored to addresses for memory access, jumping and bouncing and running counter. In the theoretical design of the Von Neumann computer , they are classified as data storage in the computer system , despite their function, and provide the control system with the possibility of dynamically managing memory.
By means of index register modification , it is possible to break away from static addressing and to address memory cells dynamically. An index register makes it possible to access a memory address whose address was previously determined by means of other arithmetic operations during the runtime of the program. This means that high-level programming languages can use fields and pointers .
Many modern computer architectures can use any general register as an index register, which has often made the designation obsolete.
example
A value to be stored in the memory is in the 123rd position of a specific memory block. In this case the index register would have the value 123 (or 122 if counting from 0, as is usual in computer science). The start address of the memory block is irrelevant because it is in a different register. The addressing of this value stored in the memory is thus somewhat decoupled from the actual position in the memory, since this is no longer specified directly, but relatively (relative to the start of the memory block).
literature
- IA-32 - Intel Architecture Software Developers Manual . Volume 1: Basic Architecture.
- Peter Wollschlaeger: Assembler: start successfully - use safely . Markt & Technik, 1991, ISBN 3-87791-156-0 .