diff --git a/InstructionSets/x86/Documentation/80386 opcode map.html b/InstructionSets/x86/Documentation/80386 opcode map.html new file mode 100644 index 000000000..3bd234a0e --- /dev/null +++ b/InstructionSets/x86/Documentation/80386 opcode map.html @@ -0,0 +1,951 @@ + + + + + 80386 Opcode Map + + + +

Codes for Addressing Method

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ADirect address; the instruction has no MODRM field; the address of the operand is encoded in the instruction; no base register, index register, or scaling factor can be applied; e.g., far JMP (EA).
CThe reg field of the MODRM field selects a control register; e.g., MOV (0F20, 0F22).
DThe reg field of the MODRM field selects a debug register; e.g., MOV (0F21, 0F23).
EA MODRM field follows the opcode and specifies the operand. The operand is either a general register or a memory address. If it is a memory address, the address is computed from a segment register and any of the following values: a base register, an index register, a scaling factor, a displacement.
FFlags register
GThe reg field of the MODRM field selects a general register; e.g,. ADD (00).
IImmediate data. The value of the operand is encoded in subsequent bytes of the instruction.
JThe instruction contains a relative offset to be added to the instruction-pointer register; e.g., JMP short, LOOP.
MThe MODRM field may refer only to memory; e.g., BOUND, LES, LDS, LSS, LFS, LGS.
OThe instruction has no MODRM field; the offset of the operand is coded as a word or dword (depending on address sie attribute) in the instruction. No base register, index register, or scaling factor can be applied; e.g., MOV (A0–A3).
RThe mod field of the MODRM field may refer only to a general register; e.g., MOV(0F20–0F24, 0F26).
SThe reg field of the MODRM field selects a segment register; e.g., MOV (8C, 8E).
TThe reg field of the MODRM field selects a test register; e.g., MOV (0F24, 0F26).
XMemory addressed by DS:SI; e.g., MOVS, COMPS, OUTS, LODS, SCAS.
YMemory addressed by ES:DI; e.g., MOVS, CMPS, INS, STOS.
+ +

Codes for Operand Type

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
aTwo one-word operands in memory or two dword operands in memory, depending on operand size attribute (used only by BOUND).
bByte (regardless of operand size attribute).
cByte or word, depending on operand size attribute.
dDword (regardless of operand size attribute).
p32-bit or 48-bit pointer, depending on operand size attribute.
sSix-byte pesudo-descriptor.
vWord or dword, depending on operand size attribute.
wWord (regardless of operand size attribute).
+ +

Register Codes

+ + When an operand is a specific register encoded in the opcode, the register is identifed by its name; e.g., AX, CL, or ESI. The name of the register indicates whether the register is 32, 16, or 8 bits wide. A register identifier of the form eXX is used when the width of the register depends on the operand size attribute. For example, eAX indicates that the AX register is used when the operand size attribute is 16, and the EAX register is used when the operand size attribute is 32. + +

One-byte 80386 Opcode Map

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
0123456789ABCDEF
0ADDPUSH ESPOP ESORPUSH CS2-byte escape codes
Eb, GbEv, GvGb, EbGv, EvAL, IbeAX, IvEb, GbEv, GvGb, EbGv, EvAL, IbeAX, Iv
1ADCPUSH SSPOP SSSBBPUSH DSPOP DS
Eb, GbEv, GvGb, EbGv, EvAL, IbeAX, IvEb, GbEv, GvGb, EbGv, EvAL, IbeAX, Iv
2ANDSEG =ESPOP ESSUBSEG =CSDAS
Eb, GbEv, GvGb, EbGv, EvAL, IbeAX, IvEb, GbEv, GvGb, EbGv, EvAL, IbeAX, Iv
3XORSEG =SSAAACMPSEG =DSAAS
Eb, GbEv, GvGb, EbGv, EvAL, IbeAX, IvEb, GbEv, GvGb, EbGv, EvAL, IbeAX, Iv
4INC general registerDEC general register
eAXeCXeDXeBXeSPeBPeSIeDIeAXeCXeDXeBXeSPeBPeSIeDI
5PUSH general registerPOP general register
eAXeCXeDXeBXeSPeBPeSIeDIeAXeCXeDXeBXeSPeBPeSIeDI
6PUSHAPOPABOUND Gv, MaARPL Gv, MaSEG =FSSEG =GSOperand SizeAddress SizePUSH IvIMUL GvEvIvPUSH IbIMUL GvEvIbINSB Yb, DxINSW/D Yv, DxOUTSB Dx, XbOUTSW/D Dx, Xb
7Short-displacement jump on condition (Jb)
JOJNOJBJNBJZJNZJBEJNBEJSJNSJPJNPJPJNLJLEJNLE
8Immediate Grp1Grp1 Ev, IbTESTXCHGMOVMOV Ew, SwLEA Gv, MMOV Sw, EwPOP Ev
Eb, IbEv, IvEb, GbEv, GvEb, GbEv, GvEb, GbEv, GvGb, EbGv, Ev
9NOPXCHG word or double-word register with eAXCBWCWDCALL ApWAITPUSHF FvPOPF FvSAHFLAHF
eCXeDXeBXeSPeBPeSIeDI
AMOVMOVSB Xb, YvMOVSW/D Xv, YvCMPSB Xb, YbCMPSW/D Xv, YvTESTSTOSB Yb, ALSTOSW/D Yv, eAXLDSB AL, XbLDSW/D eAX, YvSCASB AL, XbSCASW/D eAX, Xv
AL, ObeAX, OvOb, ALOv, eAXAL, IbeAX, Iv
BMOV immediate byte into byte registerMOV immediate word or double into word or double register
ALCLDLBLAHCHDHBHeAXeCXeDXeBXeSPeBPeSIeDI
CShift Grp2RET nearLES Gv, MpLDS Gv, MpMOVENTERLEAVERET farINT 3INT IbINTOIRET
Eb, IbEv, IvIwEb, IbEv, IvIw
DShift Grp2AAMAADXLATESC (Escape to coprocessor instruction set)
Eb, 1Ev, 1Eb, CLEv, CL
ELOOPNE JbLOOPE JbLOOP JbJCXZ JbINOUTCALL AvJMPINOUT
AL, IbeAX, IbIb, ALIb, eAXJvApJbAL, DXeAX, DXDX, ALDX, eAX
FLOCKREPNEREP / REPEHLTCMCUnary Grp3CLCSTCCLISTICLDSTDINC/DEC Grp4Indirect Grp5
EbEv
+ +

Two-Byte 80386 Opcode Map (First byte is 0FH)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
0123456789ABCDEF
0Grp6Grp7LAR Gv, EwLSL Gv, EwCLTS
1
2MOV Cr, RdMOV Dd, RdMOV Rd, CdMOV Rd, DdMOV Td, RdMOV Rd, Td
8Long-displacement jump on condition (Jv)
JOJNOJBJNBJZJNZJBEJNBEJSJNSJPJNPJPJNLJLEJNLE
9Byte set on condition (Eb)SETSSETNSSETPSETNPSETLSETNLSETLESETNLE
SETOSETNOSETBSETNBSETZSETNZSETBESETNBE
APUSH FSPOP FSBT Ev, GvSHLD EvGvIbSHLD EvGcCLPUSH GSPOP GSBTS Ev, GvSHRD EvGvIbSHRD EvGvCLIMUL Gv, Ev
BLSS MpBTR Ev, GvLFS MpLGS MpMOVZXGrp8 Ev, IbBTC Ev, GvBSF Gv, EvBSR Gv, EvMOVSX
Gv, EbGv, EwGv, EbGv, Ew
F
+

Opcodes Determined by Bits 5, 4, 3 of MODRM Field

+ + + + + + +
modnnnR/M
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
000001010011100101110111
Group 1ADDORADCSBBANDSUBXORCMP
Group 2ROLRORRCLRCRSHLSHRSAR
Group 3TEST Ib/IvNOTNEGMUL AL/eAXIMUL AL/EAXDIV AL/eAXIDIV AL/eAX
Group 4INC EbDEC Eb
Group 5INC EvDEC EvCALL EvCALL EpJMP EvJMP EpPUSH Ev
Group 6SLDT EwSTR EwLLDT EwLTR EwVERR EwVERW Ew
Group 7SGDT MsSIDT MsLGDT MsLIDT MsLMSW Ew
Group 6BTBTSBTRBTC
+ + \ No newline at end of file