微擎pc 导入前缀_段覆盖前缀| 8086微处理器
微擎pc 導入前綴
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.
通過段覆蓋前綴的概念在8086微處理器中為我們提供了這種自由。
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.
段覆蓋前綴說,如果我們要為特定代碼使用默認段以外的其他段寄存器,則可以。 只需提及要在地址位置或包含該地址的偏移寄存器之前使用的段,就可以成為一個。 這樣,機器(即8086微處理器)在計算有效地址時將考慮上述段,以計算有效地址,而不是選擇默認地址。
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
堆棧段寄存器-SS
Data Segment Register - DS
數據段寄存器-DS
Code Segment Register - CS
代碼段寄存器-CS
Extra Segment Register - ES
額外的段寄存器-ES
Let us take the following examples to further understand this concept:
讓我們通過以下示例進一步了解這個概念:
MOV AX , [BX]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
有效地址= DS X 10H + BX寄存器的內容
MOV AX, SS : [BX]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:
在這種情況下,堆棧段寄存器用作偏移量BX的前綴。 因此,將使用SS代替BX的默認段寄存器DS來查找有效地址位置。 因此,上述公式中的有效地址為:
Effective address = SS X 10H + content of BX register
有效地址= SS X 10H + BX寄存器的內容
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:
在這種情況下,在指令中直接提到要從中提取數據的地址。 默認情況下,此類情況將數據段( DS )作為其偏移量。 但是由于SS是給定指令中提到的寄存器,因此將在此處使用它。 因此,給定指令的有效地址為:
Effective Address = SS X 10H + 1002H翻譯自: https://www.includehelp.com/embedded-system/segment-override-prefix-8086-microprocessor.aspx
微擎pc 導入前綴
總結
以上是生活随笔為你收集整理的微擎pc 导入前缀_段覆盖前缀| 8086微处理器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c# 2维数组 取一维_C#| 不同类型
- 下一篇: sap中泰国有预扣税设置吗_泰国的绘图标