Sponsored
Microprocessor and Computer Architecture

What are the Purposes of Segment Registers in Intel 8086 Microprocessor

Sponsored

Purposed of Segment Registers

CS (Code Segment)

Code segment (CS) is a 16-bit register containing address of 64 KB segment with processor instructions. The processor uses CS segment for all accesses to instructions referenced by instruction pointer (IP) register. CS register cannot be changed directly. The CS register is automatically updated during far jump, far call and far return instructions.

Stack segment (SS)

Stack segment is a 16-bit register containing address of 64KB segment with program stack. By default, the processor assumes that all data referenced by the stack pointer (SP) and base pointer (BP) registers is located in the stack segment. SS register can be changed directly using POP instruction.

Data segment (DS)

Data segment is a 16-bit register containing address of 64KB segment with program data. By default, the processor assumes that all data referenced by general registers (AX, BX, CX, DX) and index register (SI, DI) is located in the data segment. DS register can be changed directly using POP and LDS instructions.

Extra segment (ES)

Extra segment is a 16-bit register containing address of 64KB segment, usually with program data. By default, the processor assumes that the DI register references the ES segment in string manipulation instructions. ES register can be changed directly using POP and LES instructions.

It is possible to change default segments used by general and index registers by prefixing instructions with a CS, SS, DS or ES prefix.

IP (Instruction Pointer)

To access instructions the 8086 uses the registers CS and IP. The CS register contains the segment number of the next instruction and the IP contains the offset. IP is updated each time an instruction is executed so that it will point to the next instruction. Unlike other registers the IP can’t be directly manipulated by an instruction, that is, an instruction may not contain IP as its operand.

Next Read:

Sponsored
Share
Tanmay Chakrabarty

Tanmay Chakrabarty is a professional web application developer working professionally for 12+ years with experience in project management, system design, database design, project execution, development in PHP and other related technologies.

Recent Posts

What are the primary components of computer system?

A computer system is composed of several key components that work together to process and…

2 days ago

Discuss the role of instruction-level parallelism (ILP) in CPU design. What techniques are used to exploit ILP, and what are their limitations?

Instruction-Level Parallelism (ILP) is a crucial concept in CPU design aimed at improving performance by…

3 days ago

Explain the purpose and function of CPU caches. What are the different levels of cache memory, and how do they impact CPU performance?

CPU caches serve as high-speed storage units that store frequently accessed data and instructions to…

6 days ago

Explain the function and importance of the CPU in computer system. How does it interact with other components?

The CPU (Central Processing Unit) acts as the computer's brain, managing instruction execution and conducting…

1 week ago
Sponsored