Open main menu

CDOT Wiki β

Changes

Register

486 bytes added, 17:18, 13 September 2022
no edit summary
==== Index Register ====
A special designation of general-purpose register, used to hold an index (offset) into an array or memory space. The x86_64 Source Index (SI) and Destination Index (DI) registers are examples of this. Similarly, the [[6502#Registers|6502]] Y and X registers are Index registers.
=== Status Register ===
A ''status register'' (or ''Flag register'', or ''Condition code register'') contain contains [[Flags|flag ]] [[Word#Bit|bits]], which are set/cleared/tested either explicitly (by instructions) or implicitly (as the result of other operations). For example, the ARM aarch32 AArch32 "Z" flag is set ("1") if an operation has a non-zero result, and cleared ("0") if an operation has a non-zero result. This flag is one bit within the Application Processor Status Register (APSR).
=== Control Registers ===
''Control registers'' contain multiple bits control [[Flags|flags]] which alter some aspect of the operation of the processor, such as enabling binary coded decimal ([[BCD]]) math or toggling [[Endian|little-endian/big-endian]] mode.
=== Stack Pointer ===
=== Program Counter ===
The ''program counter'' or ''instruction pointer'' keeps track of the address of the currently-executing instruction.
A jump is performed by writing the destination address to the program counter.
A subroutine (function) call is performed by pushing the program counter onto the [[Stack|stack]] or saving it in a designated ''Link Register'' and then writing the subroutine address to the program counter. Upon completion of the subroutine, the return address is popped from the stack or retrieved from the Link Register and written to the program counter.
Relative [[Addressing Mode|addressing modes]] add a signed value to the program counter to calculate the effective address.
== Other Uses of the Term "Register" ==
The term ''register'' may also be used to refer to an IO port or a memory address within a memory-mapped input/output device, used to set/read device status and parametersor send/receive small amounts of data== References ==* [[6502#Registers|6502 Registers]]* [[AArch64 Register and Instruction Quick Start]]* [[x86_64 Register and Instruction Quick Start]]