Segment Override Prefix | 8086 Microprocessor

In this tutorial, we will learn about a very interesting feature of the 8086 microprocessor- the Segment override prefix, and the different ways in which the effective address inside the microprocessor is calculated. By Monika Sharma Last updated : May 15, 2023

Segment Override Prefix in 8086 Microprocessor

As we already know that the effective address is calculated by appending the segment registers value and adding up the value of the respective offset. But what if we want to choose some other offset than the assigned one.

This freedom is provided to us in 8086 microprocessor through the concept of Segment override prefix.

The Segment Override Prefix says that if we want to use some other segment register than the default segment for a particular code, then it is possible. It can simply be one by mentioning the segment that is to be used before the address location or the offset register containing that address. By doing so, the machine, i.e. the 8086 microprocessor, while calculating the effective address will consider the mentioned segment for calculating the effective address rather than opting for the default one.

The syntax of doing so, as mentioned earlier is by mentioning the segment just before the address location and proceeded by a colon. The following abbreviations for each segment register are used for this purpose:

  • Stack Segment Register - SS
  • Data Segment Register - DS
  • Code Segment Register - CS
  • Extra Segment Register - ES

Let us take the following examples to further understand this concept:


This is a normal instruction without any segment overriding. Hence the effective address will be calculated by using the default segment itself. Therefore, the effective address for the above-mentioned instruction:

Effective address = DS X 10H + content of BX register


Here, in this case, the Stack segment register is used as a prefix for the offset BX. So, instead of DS, which is the default segment register for BX, the SS will be used for finding the effective address location. Therefore, the effective address in the above-mentioned equation will be:

Effective address = SS X 10H + content of BX register

MOV BX, SS:[1002H]

Here, in this case, the address from where the data is to be fetched is directly mentioned in the instruction. By default, such cases take the Data Segment (DS) as its offset. But as the SS is the mentioned register in the given instruction, then it will be used here. Therefore, the effective address for the given instruction is:

Effective Address = SS X 10H + 1002H

Comments and Discussions!

Load comments ↻

Copyright © 2024 All rights reserved.