300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 存储器间接寻址方式_8086中的数据存储器寻址模式

存储器间接寻址方式_8086中的数据存储器寻址模式

时间:2020-03-02 08:28:23

相关推荐

存储器间接寻址方式_8086中的数据存储器寻址模式

存储器间接寻址方式

In this type ofaddressing mode, first the offset address is calculated, then the memory address is calculated and then the operand form that memory location is fetched. There are following modes which lie under theData Addressing Mode:

在这种类型的寻址模式下,首先计算偏移地址,然后计算内存地址,然后获取内存位置的操作数形式。数据寻址模式下有以下几种模式:

Direct Addressing Mode

直接寻址模式

Base Addressing Mode

基本寻址模式

Base Relative Addressing Mode

基本相对寻址模式

Index Addressing Mode

索引寻址模式

Index relative addressing mode

索引相对寻址模式

Base plus Index Addressing Mode

基本加索引寻址模式

Base relative plus Index Addressing Mode

基本相对加索引寻址模式

1)直接寻址模式 (1) Direct Addressing Mode)

In this addressing mode, the offset is specified within the instructions. What this means is that the offset address is directly stored within square brackets and is not present inside any register.

在这种寻址模式下,偏移量在指令中指定。 这意味着偏移地址直接存储在方括号中,并且不存在于任何寄存器中。

Example:

例:

MOV AL, [4000H]MOV [1234H], BX

2)基本寻址模式 (2) Base Addressing Mode)

In this addressing mode, the offset address for any operand is stored in the base register BX.

在这种寻址模式下,任何操作数的偏移地址都存储在基址寄存器BX中。

Example:

例:

MOV AL, [BX]

3)基本相对寻址模式 (3) Base Relative Addressing Mode)

In this addressing mode also, the offset address is stored within the Base register but the difference is that there is some displacement present with it. This displacement can be either of 8 bits or 16 bits. Hence, the offset address will be equal to the contents of the base register + 8/16 bit displacement.

同样在这种寻址模式下,偏移地址存储在基址寄存器中,但不同之处在于偏移量存在。 此位移可以是8位或16位。 因此,偏移地址等于基址寄存器的内容+ 8/16位位移。

Example:

例:

MOV AL, [BX + 05H]{here, displacement is of 8 bits}MOV AL, [BX+1243H] {here, displacement is of 16 bits}

4)索引寻址模式 (4) Index Addressing Mode)

In this addressing mode, the offset address is defined in the Index Register. (It should be noted here that the Index registers act as an offset for Data Segment as well.) So, the memory location of the operand is calculated with the help of DS and SI.

在这种寻址模式下,偏移地址在索引寄存器中定义。 (此处应注意,索引寄存器也充当数据段的偏移量。)因此,操作数的存储位置是借助DS和SI来计算的。

Example:

例:

MOV BL, [SI]MOV [SI], DH

5)索引相对寻址方式 (5) Index relative addressing mode)

In this addressing mode, the offset address is equal to the content of index register plus the 8 or 16-bit displacement. It is important to note here that the displacement in all relative addressing modes is a signed number, i.e. the displacement value can either be a positive or a negative hexadecimal number.

在这种寻址模式下,偏移地址等于索引寄存器的内容加上8位或16位位移。 在此重要的是要注意,在所有相对寻址模式下的位移都是有符号数,即位移值可以是正十六进制数或负十六进制数。

Example:

例:

MOV BL, [SI + 07H]{Here, the displacement is of 8 bits}MOV BL, [SI – 3034H] {Here, the displacement is of 16 bits}

6)基本加索引寻址模式 (6) Base plus Index Addressing Mode)

In this addressing Mode, the offset address is calculated by both the base register and the index register. Hence, the offset address will be equal to the content of the base register plus the content of the Index register.

在该寻址模式下,偏移地址由基址寄存器和索引寄存器共同计算。 因此,偏移地址将等于基址寄存器的内容加上索引寄存器的内容。

Example:

例:

MOV AL, [BX + SI]MOV [BX + SI], CL

7)基本相对加索引寻址模式 (7) Base relative plus Index Addressing Mode)

This addressing mode is almost same to the Base plus Index Addressing mode, but like the other relative addressing modes, the difference is only that this mode has a displacement of 8 or 16 bits.

该寻址模式与“基本加索引寻址”模式几乎相同,但是与其他相对寻址模式一样,不同之处仅在于该模式的位移为8位或16位。

Example:

例:

MOV CL, [BX + SI + 0AH]{here, the displacement is of 8 bits} MOV AL, [BX + SI + AE07H] {here, the displacement is of 16 bits}

翻译自: /embedded-system/data-memory-addressing-mode-in-8086.aspx

存储器间接寻址方式

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。