Применение искинов - шоссе империализма (Стенгазета русификаторов ИТ)

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.



Байт доступа (SIB)

Сообщений 1 страница 2 из 2

1

Vol. 2A 2-3 (Страница 507):

2.1.3 ModR/M and SIB Bytes
Many instructions that refer to an operand in memory have an addressing-form specifier byte (called the ModR/M
byte) following the primary opcode. The ModR/M byte contains three fields of information:
•  The mod field combines with the r/m field to form 32 possible values: eight registers and 24 addressing modes.
•  The r/m field can specify a register as an operand or it can be combined with the mod field to encode an
addressing mode. Sometimes, certain combinations of the mod field and the r/m field are used to express
opcode information for some instructions.
•  The reg/opcode field specifies either a register number or three more bits of opcode information. The purpose
of the reg/opcode field is specified in the primary opcode.

Certain encodings of the ModR/M byte require a second addressing byte (the SIB byte). The base-plus-index and
scale-plus-index forms of 32-bit addressing require the SIB byte. The SIB byte includes the following fields:
• The scale field specifies the scale factor.
• The index field specifies the register number of the index register.
• The base field specifies the register number of the base register.

See Section 2.1.5 for the encodings of the ModR/M and SIB bytes.

0

2

2.1.5 Addressing-Mode Encoding of ModR/M and SIB Bytes

Vol. 2A 2-7 (Страница 511)

NOTES:
1. The [*] nomenclature means a disp32 with no base if the MOD is 00B.
Otherwise, [*] means disp8 or disp32 + [EBP].
This provides the following address modes:

MOD bits

Effective Address

00

[scaled index] + disp32

01

[scaled index] + disp8 + [EBP]

10

[scaled index] + disp32 + [EBP]

0