If there are two op code/addressing mode bytes, then the second byte is of one of the following two forms:
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 | Registers | Register Address | Segment Register | ||
---|---|---|---|---|---|
W = 1 | W = 0 | ||||
000 | AX | AL | 00 | ES | |
001 | CX | CL | 01 | CS | |
010 | DX | DL | 10 | SS | |
011 | BX | BL | 11 | DS | |
100 | SP | AH | |||
101 | BP | CH | |||
110 | SI | DH | |||
111 | DI | BH |
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:
Figure 2-15 Address modes and default segment registers for various MOD and R/M field combinations.
MOD | 00 | 01 | 10 | 11 | ||
---|---|---|---|---|---|---|
R/M | W = 0 | W = 1 | ||||
000 Segment reg. | (BX)+(SI) DS | (BX)+(SI)+D8 DS | (BX)+(SI)+D16 DS | AL | AX | |
001 Segment reg. | (BX)+(DI) DS | (BX)+(DI)+D8 DS | (BX)+(DI)+D16 DS | CL | CX | |
010 Segment reg. | (BP)+(SI) SS | (BP)+(SI)+D8 SS | (BP)+(SI)+D16 SS | DL | DX | |
011 Segment reg. | (BP)+(DI) SS | (BP)+(DI)+D8 SS | (BP)+(DI)+D16 SS | BL | BX | |
100 Segment reg. | (SI) DS | (SI)+D8 DS | (SI)+D16 DS | AH | SP | |
101 Segment reg. | (DI) DS | (DI)+D8 DS | (DI)+D16 DS | CH | BP | |
110 Segment reg. | D16 DS | (BP)+D8 SS | (BP)+D16 SS | DH | SI | |
111 Segment reg. | (BX) DS | (BX)+D8 DS | (BX)+D16 DS | BH | DI |
This is page 18.