General purpose registers in 8086 microprocessor (original) (raw)

Last Updated : 21 Aug, 2025

It is one of the most important chips ever created due to its part in the development of x86-based architecture. One significant aspect of this microprocessor is that it contains general registers. Efficiency and speed of computations in the processor are influenced by these registers since they determine arithmetic operations execution and data manipulations. Understanding such registers is important for code optimization as well as assembly language programming and system design.

The 8086 microprocessor contains a set of 16-bit general-purpose registers which are used for performing various arithmetic, logical, and data movement operations. Since these registers are flexible and can assume different combinations to perform various functions, they form the basic operation units of the processor itself.

General-purpose registers are used to store temporary data within the microprocessor

There are 8 general-purpose registers in the 8086 microprocessor.

1. AX

This is the accumulator. It is of 16 bits and is divided into two 8-bit registers AH and AL to also perform 8-bit instructions. It is generally used for arithmetical and logical instructions but in 8086 microprocessor it is not mandatory to have an accumulator as the destination operand.

MOV AX, 2000H ; Load 2000H into AX
ADD AX, AX ; AX = AX + AX (4000H)

**Explanation: The accumulator can store temporary results of calculations and is optimized for arithmetic instructions.

2. BX

This is the base register. It is of 16 bits and is divided into two 8-bit registers BH and BL to also perform 8-bit instructions. It is used to store the value of the offset.

MOV BX, 500H ; Load 500H into BX
MOV AL, [BX] ; Move the byte at memory offset 500H into AL

**Explanation: BX can point to memory locations, making it useful for accessing data arrays and tables.

3. CX

This is the counter register. It is of 16 bits and is divided into two 8-bit registers CH and CL to also perform 8-bit instructions. It is used in looping and rotation.

MOV CX, 5
LOOP_START:
; Some operation
LOOP LOOP_START ; Decrements CX and jumps if CX ≠ 0

**Explanation: CX automatically decrements in loop instructions, making it ideal for controlling repetitive operations.

4. DX

This is the data register. It is of 16 bits and is divided into two 8-bit registers DH and DL to also perform 8-bit instructions. It is used in the multiplication and input/output port addressing.

MOV AX, 10
MOV BX, 20
MUL BX ; AX * BX -> DX:AX

**Explanation: DX stores the high-order part of the result in multiplication or division, and it can address I/O ports for input/output instructions.

5. SP

This is the stack pointer. It is of 16 bits. It points to the topmost item of the stack. If the stack is empty the stack pointer will be (FFFE)H. Its offset address is relative to the stack segment. It is AB and manage the present position of the top of the stack.

PUSH AX ; Decrement SP and store AX
POP BX ; Retrieve value from stack into BX

**Explanation: SP automatically changes during stack operations to keep track of the stack’s top, allowing efficient function calls and local storage.

6. BP

This is the base pointer. It is of 16 bits. It is primarily used in accessing parameters passed by the stack. Its offset address is relative to the stack segment.

MOV AX, [BP+4] ; Access parameter passed to function

**Explanation: BP is used to reference function parameters or local variables stored on the stack, making it essential for structured programming in assembly.

7. SI

This is the source index register. It is of 16 bits. It is used in the pointer addressing of data and as a source in some string-related operations. Its offset is relative to the data segment.

MOV SI, 2000H
MOV AL, [SI] ; Load value from source address pointed by SI into AL

**Explanation: SI is commonly used in string manipulation instructions, such as MOVSB or LODSB, to point to the source.

8.DI

This is the destination index register. It is of 16 bits. It is used in the pointer addressing of data and as a destination in some string-related operations. Its offset is relative to the extra segment.

MOV DI, 3000H
MOV [DI], AL ; Store value of AL into memory at DI

**Explanation: DI works with string instructions to store data at destination memory locations efficiently.

Advantages

Disadvantages

Conclusion

The modes of 8086 microprocessor are of great importance as it gives them ability to work hence creating the ability to handle different tasks in a friendly and efficient way. Each of the registers has its uses and roles but this doesn’t mean that it cannot be used in other areas. Thus if programmers know what these registers and the tasks that they are used for, then they have the ability to develop better assembly code that will programs well optimized for 8086 based systems. This enables data stored in these registers to be readily accessible and get modified as it is one of the principles in system design commonly in low level programming.