If there are two op code/addressing mode bytes, then the second byte is of one of the following two forms:

or

The first of these forms is for single-operand instructions (or instructions involving two operands with one of them being implied by the op code), and the second is for double-operand instructions, in which case REG specifies a register that is the source operand or destination operand depending on the value of the D-bit.

Figure 2-14 Register addresses.

Register
Address
RegistersRegister
Address
Segment
Register
W = 1W = 0
000AXAL00ES
001CXCL01CS
010DXDL10SS
011BXBL11DS
100SPAH
101BPCH
110SIDH
111DIBH

To permit exceptions to the segment register usage given in Fig. 2-15. a special 1-byte instructions called a segment override prefix is available. A segment override prefix has the form

If an instruction is preceded by a segment override prefix, the segment registe REG is used for data reference during the execution of that instruction. For the addressing modes given in the figure, DS may be overriden by CS, SS, or ES; and when BP is used, SS may be overriden by DS, CS, or ES. Specific cases that cannot involve overrides are:

  1. The CS register is always used as the segment register when computing the address of the next instruction to be executed.
  2. When SP is used, SS is always the segment register. (Stack operations are discussed in Chap. 4.)
  3. For string operations the ES register is always used as the segment register for the destination operand. (String operations are discussed in Chap. 5.)

Figure 2-15 Address modes and default segment registers for various MOD and R/M field combinations.

MOD00011011
R/MW = 0W = 1
000
Segment reg.
(BX)+(SI)
DS
(BX)+(SI)+D8
DS
(BX)+(SI)+D16
DS
ALAX
001
Segment reg.
(BX)+(DI)
DS
(BX)+(DI)+D8
DS
(BX)+(DI)+D16
DS
CLCX
010
Segment reg.
(BP)+(SI)
SS
(BP)+(SI)+D8
SS
(BP)+(SI)+D16
SS
DLDX
011
Segment reg.
(BP)+(DI)
SS
(BP)+(DI)+D8
SS
(BP)+(DI)+D16
SS
BLBX
100
Segment reg.
(SI)
DS
(SI)+D8
DS
(SI)+D16
DS
AHSP
101
Segment reg.
(DI)
DS
(DI)+D8
DS
(DI)+D16
DS
CHBP
110
Segment reg.
D16
DS
(BP)+D8
SS
(BP)+D16
SS
DHSI
111
Segment reg.
(BX)
DS
(BX)+D8
DS
(BX)+D16
DS
BHDI

Table of Contents | Next page | Previous page

This is page 18.