Registers are high-speed storage locations inside the CPU, designed to hold data
temporarily while instructions are executed. Compared to main memory, registers offer faster
access, enabling the processor to perform arithmetic, logical, control, and data manipulation
operations rapidly. As highlighted in computer architecture literature (e.g., Mano), registers are
essential for maintaining the internal operation and state of the processor. Their limited size
(often 8, 16, 32, or 64 bits depending on architecture) makes them ideal for immediate
operational data, such as intermediate results, addresses, counters, and flags.
2. Categories of Registers
The Intel 8086 microprocessor contains a total of 14 registers, each serving a specific
function in program execution, data handling, memory management, and control operations.
These registers can be grouped into four main categories:
● General-Purpose Registers (4 main registers + 8 sub-registers)
○ AX, BX, CX, DX (each split into AH/AL, BH/BL, CH/CL, DH/DL)
● Special-Purpose Registers (4 registers)
○ SP, BP, SI, DI
● Segment Registers (4 registers)
○ CS, DS, SS, ES
● Instruction and Flag Registers (2 registers)
○ IP, FLAGS
2.1 General-Purpose Registers (GPRs) (4 main registers +
8 sub-registers)
General-purpose registers are used for holding operands, addresses, and intermediate
results during instruction execution. In Intel 8086/8088 architecture (Brey; Irvine), these include
AX, BX, CX, DX, each of which can also be accessed as 8-bit halves (e.g., AL, AH).
➢ AX, BX, CX, DX (each split into AH/AL, BH/BL, CH/CL, DH/DL)
2.1.1 Accumulator Register (AX)
, The accumulator is used heavily in arithmetic and I/O operations. Many instructions are
optimized for AX, reducing execution time.
Example:
ADD AX, BX
Here, AX receives the sum, reflecting its efficient use in arithmetic operations.
2.1.2 Base Register (BX)
BX commonly stores base addresses for memory operations involving base-index addressing
modes.
Example:
MOV AL, [BX]
This instruction retrieves a byte from the memory address contained in BX.
2.1.3 Count Register (CX)
CX is used for loop counters, especially with the LOOP instruction.
Example:
MOV CX, 10
LOOP_LABEL:
; repeat operations
LOOP LOOP_LABEL
CX automatically decrements until it reaches zero.
2.1.4 Data Register (DX)
DX holds high-order words in multiplication/division operations and is used for port-based I/O.
Example:
OUT DX, AL
Sends content of AL to the port number stored in DX.