Revision 1.2
209
www.national.com
Instruction Set (
Continued
)
G
7.1.2.3
When used, the 1-bit s field determines the size of the
immediate data field. If the s bit is set, the immediate field
of the opcode is 8 bits wide and is sign-extended to match
the operand size of the opcode. See Table 7-6.
s Field (Immediate Data Field Size)
7.1.2.4
eee Field (MOV-Instruction Register
Selection)
The eee field (bits [5:3]) is used to select the control,
debug and test registers in the MOV instructions. The type
of register and base registers selected by the eee field are
listed in Table 7-7. The values shown in Table 7-7 are the
only valid encodings for the eee bits.
7.1.3
The mod and r/m fields within the mod r/m byte, select the
type of memory addressing to be used. Some instructions
use a fixed addressing mode (e.g., PUSH or POP) and
therefore, these fields are not present. Table 7-8 lists the
addressing method when 16-bit addressing is used and a
mod r/m byte is present. Some mod r/m field encodings
are dependent on the w field and are shown in Table 7-9.
mod and r/m Byte (Memory Addressing)
Table 7-6. s Field Encoding
s
Field
Immediate Field Size
8-Bit
Operand Size
16-Bit
Operand Size
32-Bit
Operand Size
0 (or not
present)
1
8 bits
16 bits
32 bits
8 bits
8 bits
(sign-extended)
8 bits
(sign-extended)
Table 7-7. eee Field Encoding
eee Field
Register Type
Base Register
000
010
011
100
000
001
010
011
110
111
011
100
101
110
111
Control Register
Control Register
Control Register
Control Register
Debug Register
Debug Register
Debug Register
Debug Register
Debug Register
Debug Register
Test Register
Test Register
Test Register
Test Register
Test Register
CR0
CR2
CR3
CR4
DR0
DR1
DR2
DR3
DR6
DR7
TR3
TR4
TR5
TR6
TR7
Table 7-8. mod r/m Field Encoding
mod
Field
r/m
Field
16-Bit Address
Mode with
mod r/m Byte
32-Bit Address
Mode with mod r/m
Byte and No s-i-b
Byte Present
00
00
00
00
00
000
001
010
011
100
DS:[BX+SI]
DS:[BX+DI]
SS:[BP+SI]
SS:[BP+DI]
DS:[SI]
DS:[EAX]
DS:[ECX]
DS:[EDX]
DS:[EBX]
s-i-b is present
(See Table 7-15)
DS:[d32]
DS:[ESI]
DS:[EDI]
00
00
00
101
110
111
DS:[DI]
DS:[d16]
DS:[BX]
01
01
01
01
01
000
001
010
011
100
DS:[BX+SI+d8]
DS:[BX+DI+d8]
SS:[BP+SI+d8]
SS:[BP+DI+d8]
DS:[SI+d8]
DS:[EAX+d8]
DS:[ECX+d8]
DS:[EDX+d8]
DS:[EBX+d8]
s-i-b is present
(See Table 7-15)
SS:[EBP+d8]
DS:[ESI+d8]
DS:[EDI+d8]
01
01
01
101
110
111
DS:[DI+d8]
SS:[BP+d8]
DS:[BX+d8]
10
10
10
10
10
000
001
010
011
100
DS:[BX+SI+d16]
DS:[BX+DI+d16]
SS:[BP+SI+d16]
SS:[BP+DI+d16]
DS:[SI+d16]
DS:[EAX+d32]
DS:[ECX+d32]
DS:[EDX+d32]
DS:[EBX+d32]
s-i-b is present
(See Table 7-15)
SS:[EBP+d32]
DS:[ESI+d32]
DS:[EDI+d32]
10
10
10
101
110
111
DS:[DI+d16]
SS:[BP+d16]
DS:[BX+d16]
11
xxx
See Table 7-9.
See Table 7-9
Note:
d8 refers to 8-bit displacement, d16 refers to 16-bit dis-
placement., and d32 refers to a 32-bit displacement.