![](http://datasheet.mmic.net.cn/300000/KU386_datasheet_16201615/KU386_96.png)
Intel386
TM
SX MICROPROCESSOR
9.2.2 32-Bit Extensions of the
Instruction Set
With the Intel386 SX CPU, the 8086/80186/80286
instruction set is extended in two orthogonal direc-
tions: 32-bit forms of all 16-bit instructions are added
to support the 32-bit data types, and 32-bit address-
ing modes are made available for all instructions ref-
erencing memory. This orthogonal instruction set ex-
tension is accomplished having a Default (D) bit in
the code segment descriptor, and by having 2 prefix-
es to the instruction set.
Whether the instruction defaults to operations of
16 bits or 32 bits depends on the setting of the D bit
in the code segment descriptor, which gives the de-
fault length (either 32 bits or 16 bits) for both oper-
ands and effective addresses when executing that
code segment. In the Real Address Mode or Virtual
8086 Mode, no code segment descriptors are used,
but a D value of 0 is assumed internally by the
Intel386 SX CPU when operating in those modes
(for 16-bit default sizes compatible with the 8086/
80186/80286).
Two prefixes, the Operand Size Prefix and the Effec-
tive Address Size Prefix, allow overriding individually
the Default selection of operand size and effective
address size. These prefixes may precede any op-
code bytes and affect only the instruction they pre-
cede. If necessary, one or both of the prefixes may
be placed before the opcode bytes. The presence of
the Operand Size Prefix and the Effective Address
Prefix will toggle the operand size or the effective
address size, respectively, to the value ‘‘opposite’’
from the Default setting. For example, if the default
operand size is for 32-bit data operations, then pres-
ence of the Operand Size Prefix toggles the instruc-
tion to 16-bit data operation. As another example, if
the default effective address size is 16 bits, pres-
ence of the Effective Address Size prefix toggles the
instruction to use 32-bit effective address computa-
tions.
These 32-bit extensions are available in all modes,
including the Real Address Mode or the Virtual 8086
Mode. In these modes the default is always 16 bits,
so prefixes are needed to specify 32-bit operands or
addresses. For instructions with more than one pre-
fix, the order of prefixes is unimportant.
Unless specified otherwise, instructions with 8-bit
and 16-bit operands do not affect the contents of
the high-order bits of the extended registers.
9.2.3 Encoding of Instruction Fields
Within the instruction are several fields indicating
register selection, addressing mode and so on. The
exact encodings of these fields are defined immedi-
ately ahead.
9.2.3.1 ENCODING OF OPERAND LENGTH (w)
FIELD
For any given instruction performing a data opera-
tion, the instruction is executing as a 32-bit operation
or a 16-bit operation. Within the constraints of the
operation size, the w field encodes the operand size
as either one byte or the full operation size, as
shown in the table below.
Operand Size
During 16-Bit
Data Operations
Operand Size
During 32-Bit
Data Operations
w Field
0
1
8 Bits
16 Bits
8 Bits
32 Bits
9.2.3.2 ENCODING OF THE GENERAL
REGISTER (reg) FIELD
The general register is specified by the reg field,
which may appear in the primary opcode bytes, or as
the reg field of the ‘‘mod r/m’’ byte, or as the r/m
field of the ‘‘mod r/m’’ byte.
Encoding of reg Field When w Field
is not Present in Instruction
Register Selected Register Selected
During 16-Bit
Data Operations
reg Field
During 32-Bit
Data Operations
000
001
010
011
100
101
101
101
AX
CX
DX
BX
SP
BP
SI
DI
EAX
ECX
EDX
EBX
ESP
EBP
ESI
EDI
Encoding of reg Field When w Field
is Present in Instruction
Register Specified by reg Field
During 16-Bit Data Operations:
reg
Function of w Field
(when w
e
0)
(when w
e
1)
000
001
010
011
100
101
110
111
AL
CL
DL
BL
AH
CH
DH
BH
AX
CX
DX
BX
SP
BP
SI
DI
96