DOS-debug
1# This is "instr.set", the main instruction set description file.
2
3# The format of this file is as follows. First of all, blank lines
4# and lines whose first character is a '#' are comment lines.
5
6# Otherwise, each line consists of one or more fields, separated by
7# spaces (but not tabs).
8
9# The first field is the opcode field. It looks like the following:
10# _^nxxx
11# or _^nxxx/xxx
12# or _^nxxx#xxx
13# or _^nxxx*xxx
14# Here:
15# _ (if present) signifies that the line applies only to the
16# assembler.
17# ^n (if present) is ^0 for AAD or AAM, ^1 for DB, ^2 for DW,
18# ^3 for DD, ^4 for ORG, and ^5 for 32 bit operand prefix.
19# xxx is an op code mnemonic.
20# '/' mean that the following opcode is the 32-bit variant of the
21# first one, and a 66h prefix will switch.
22# '#' mean that the following opcode is the 32-bit variant of the
23# first one, and a 67h prefix will switch.
24# '*' mean that the preceding opcode occurs with a WAIT instruction;
25# the following, without.
26
27# The remaining fields describe the possible variants of the instruction.
28# They have the following formats:
29# _Lxx/r.;n
30# _Lxx/r*;n
31# _Lxx/r&;n
32# _DLxx/r:kk;n
33# Here:
34# _ (if present) means that this variant is to be used only by
35# the assember.
36# D (if present) means that this variant is to be used only by
37# the disassembler.
38# L (if present) means that this is a lockable instruction.
39# xx are one or two bytes of the instruction field.
40# /r (if present) specifies the "r" part in a MOD MEM/REG byte.
41# . indicates that the instruction has no operands.
42# * indicates that the byte is a prefix (LOCK or REP...).
43# & indicates that the byte is a segment prefix.
44# :kk gives an index into the file "instr.key". That file gives
45# the operand list associated to the key. The key consists of
46# two hex digits.
47# ;n (if present) indicates the processor on which this
48# instruction first appeared. Here n may be 1 through 6.
49#
50# The order of the variants is important, because the assembler will take
51# the first one that fits the input line.
52
53# References:
54#
55# Instruction set from the Intel Pentium Family User's Manual, Vol. 3:
56# Architecture and Programming Manual. Information on earlier processors
57# from various Intel and third party documentation. Information on new
58# Pentium Pro <TM> instructions from http://x86.metronet.com
59# (http://198.215.126.12).
60
61# History:
62# v1.09: - "loop" opcode has no "ecx" operand anymore in 32bit.
63# - changed order 1 3 to 3 1 for arith opcodes.
64# v1.10: - "loopw", "loopzw" and "loopnzw" variants added.
65# v1.18: - "fldenvw", "fldenvd", "fstenvw", "fstenvd" variants added.
66# - "fsavew", "fsaved", "frstorw", "frstord" variants added.
67# - "movd" and "movq" added.
68
69aaa 37.
70^0aad d5:27
71^0aam d4:27
72aas 3f.
73adc L83/2:03 14:01 L80/2:02 L10:04 12:05
74add L83/0:03 04:01 L80/0:02 L00:04 02:05
75and L83/4:03 24:01 L80/4:02 L20:04 22:05
76arpl 63:06;2
77bound 62:07;1
78bsf 0fbc:08;3
79bsr 0fbd:08;3
80^5bswap 0fc8:09;4
81bt 0fa3:0A;3 0fba/4:0B;3
82btc L0fbb:0A;3 L0fba/7:0B;3
83btr L0fb3:0A;3 L0fba/6:0B;3
84bts L0fab:0A;3 L0fba/5:0B;3
85call e8:0C ff/2:29 ff/3:0E 9a:0D
86cbw/cwde 98.
87clc f8.
88cld fc.
89cli fa.
90clts 0f06.;2
91cmc f5.
92cmova 0f47:08;6
93cmovae 0f43:08;6
94cmovb 0f42:08;6
95cmovbe 0f46:08;6
96_cmovc 0f42:08;6
97_cmove 0f44:08;6
98cmovg 0f4f:08;6
99cmovge 0f4d:08;6
100cmovl 0f4c:08;6
101cmovle 0f4e:08;6
102_cmovna 0f46:08;6
103_cmovnae 0f42:08;6
104_cmovnb 0f43:08;6
105_cmovnbe 0f47:08;6
106_cmovnc 0f43:08;6
107_cmovne 0f45:08;6
108_cmovng 0f4e:08;6
109_cmovnge 0f4c:08;6
110_cmovnl 0f4d:08;6
111_cmovnle 0f4f:08;6
112cmovno 0f41:08;6
113_cmovnp 0f4b:08;6
114cmovns 0f49:08;6
115cmovnz 0f45:08;6
116cmovo 0f40:08;6
117_cmovp 0f4a:08;6
118cmovpe 0f4a:08;6
119cmovpo 0f4b:08;6
120cmovs 0f48:08;6
121cmovz 0f44:08;6
122cmp 83/7:03 3c:01 80/7:02 38:04 3a:05
123cmpsb a6.
124cmpsw/cmpsd a7.
125cmpxchg L0fb0:04;4
126cmpxchg8b 0fc7/1:0F;5
127cpuid 0fa2.;5
128cwd/cdq 99.
129daa 27.
130das 2f.
131_^1db
132_^3dd
133dec 48:11 Lfe/1:10 DLff/1:10
134div f6/6:10
135_^2dw
136emms 0f77.;5
137enter c8:12;1
138f2xm1 d9f0.
139fabs d9e1.
140fadd d8/0:13 dc/0:14 d8c0:15 dcc0:16
141faddp dec0:17 _dec1.
142fiadd da/0:18 de/0:19
143fbld df/4:1A
144fbstp df/6:1A
145fchs d9e0.
146fclex*fnclex dbe2.
147_fcmova dbd0:15;6
148_fcmovae dbc0:15;6
149fcmovb dac0:15;6
150fcmovbe dad0:15;6
151fcmove dac8:15;6
152_fcmovna dad0:15;6
153_fcmovnae dac0:15;6
154fcmovnb dbc0:15;6
155fcmovnbe dbd0:15;6
156fcmovne dbc8:15;6
157fcmovnu dbd8:15;6
158_fcmovnz dbc8:15;6
159fcmovu dad8:15;6
160_fcmovz dac8:15;6
161fcom d8/2:13 dc/2:14 d8d0:1C _d8d1.
162fcomi dbf0:1C;6 _dbf1.;6
163fcomip dff0:1C;6 _dff1.;6
164fcomp d8/3:13 dc/3:14 d8d8:1C _d8d9.
165fcompp ded9.
166fcos d9ff.;3
167fdecstp d9f6.
168fdisi*fndisi dbe1.
169fdiv d8/6:13 dc/6:14 d8f0:15 dcf8:16
170fdivp def8:17 _def9.
171fidiv da/6:18 de/6:19
172fdivr d8/7:13 dc/7:14 d8f8:15 dcf0:16
173fdivrp def0:17 _def1.
174fidivr da/7:18 de/7:19
175feni*fneni dbe0.
176ffree ddc0:1B
177ficom da/2:18 de/2:19
178ficomp da/3:18 de/3:19
179fild db/0:18 df/0:19 df/5:0F
180fincstp d9f7.
181finit*fninit dbe3.
182fist db/2:18 df/2:19
183fistp db/3:18 df/3:19 df/7:0F
184fld d9/0:13 dd/0:14 db/5:1D d9c0:1B
185fld1 d9e8.
186fldl2t d9e9.
187fldl2e d9ea.
188fldpi d9eb.
189fldlg2 d9ec.
190fldln2 d9ed.
191fldz d9ee.
192fldcw*fnldcw d9/5:19
193fldenv d9/4:1E
194_fldenvw/fldenvd d9/4:1E
195fmul d8/1:13 dc/1:14 d8c8:15 dcc8:16
196fmulp dec8:17 _dec9.
197fimul da/1:18 de/1:19
198fnop d9d0.
199fpatan d9f3.
200fprem d9f8.
201fprem1 d9f5.;3
202fptan d9f2.
203frndint d9fc.
204frstor dd/4:1E
205_frstorw/frstord dd/4:1E
206fsave*fnsave dd/6:1E
207_fsavew/fsaved dd/6:1E
208fscale d9fd.
209fsetpm*fnsetpm dbe4.;2
210fsin d9fe.;3
211fsincos d9fb.;3
212fsqrt d9fa.
213fst d9/2:13 dd/2:14 ddd0:1B
214fstp d9/3:13 dd/3:14 db/7:1D ddd8:1B
215fstcw*fnstcw d9/7:19
216fstenv*fnstenv d9/6:1E
217_fstenvw/fstenvd d9/6:1E
218fstsw*fnstsw dfe0:1F dd/7:19
219fsub d8/4:13 dc/4:14 d8e0:15 dce8:16
220fsubp dee8:17 _dee9.
221fisub da/4:18 de/4:19
222fsubr d8/5:13 dc/5:14 d8e8:15 dce0:16
223fsubrp dee0:17 _dee1.
224fisubr da/5:18 de/5:19
225ftst d9e4.
226fucom dde0:1C;3 _dde1.;3
227fucomi dbe8:1C;6 _dbe9.;6
228fucomip dfe8:1C;6 _dfe9.;6
229fucomp dde8:1C;3 _dde9.;3
230fucompp dae9.;3
231_fwait 9b.
232fxam d9e5.
233fxch d9c8:1C _d9c9.
234fxtract d9f4.
235fyl2x d9f1.
236fyl2xp1 d9f9.
237hlt f4.
238idiv f6/7:10
239imul f6/5:10 0faf:08;3 6b:20;1 _6b:21;1 69:22;1 _69:23;1
240in e4:24 ec:25
241inc 40:11 Lfe/0:10 DLff/0:10
242insb 6c.;1
243insw/insd 6d.;1
244int cc:26 cd:27
245into ce.
246invd 0f08.;4
247invlpg 0f01/7:1E;4
248iret/iretd cf.
249ja 77:28 0f87:0C;3
250jae 73:28 0f83:0C;3
251jb 72:28 0f82:0C;3
252jbe 76:28 0f86:0C;3
253_jc 72:28 0f82:0C;3
254jcxz#jecxz e3:28
255_je 74:28 0f84:0C;3
256jg 7f:28 0f8f:0C;3
257jge 7d:28 0f8d:0C;3
258jl 7c:28 0f8c:0C;3
259jle 7e:28 0f8e:0C;3
260_jna 76:28 0f86:0C;3
261_jnae 72:28 0f82:0C;3
262_jnb 73:28 0f83:0C;3
263_jnbe 77:28 0f87:0C;3
264_jnc 73:28 0f83:0C;3
265_jne 75:28 0f85:0C;3
266_jng 7e:28 0f8e:0C;3
267_jnge 7c:28 0f8c:0C;3
268_jnl 7d:28 0f8d:0C;3
269_jnle 7f:28 0f8f:0C;3
270jno 71:28 0f81:0C;3
271_jnp 7b:28 0f8b:0C;3
272jns 79:28 0f89:0C;3
273jnz 75:28 0f85:0C;3
274jo 70:28 0f80:0C;3
275_jp 7a:28 0f8a:0C;3
276jpe 7a:28 0f8a:0C;3
277jpo 7b:28 0f8b:0C;3
278js 78:28 0f88:0C;3
279jz 74:28 0f84:0C;3
280jmp eb:28 e9:0C ff/4:29 ff/5:0E ea:0D
281lahf 9f.
282lar 0f02:08;2
283lds c5:07
284lss 0fb2:07;3
285les c4:07
286lfs 0fb4:07;3
287lgs 0fb5:07;3
288lea 8d:07
289leave c9.;1
290lgdt 0f01/2:1E;2
291lidt 0f01/3:1E;2
292lldt 0f00/2:2A;2
293lmsw 0f01/6:2A;2
294lock f0*
295lodsb ac.
296lodsw/lodsd ad.
297_loop e2:28
298loopw#loopd e2:28
299_loopz e1:28
300_loope e1:28
301_loopew#looped e1:28
302loopzw#loopzd e1:28
303_loopnz e0:28
304_loopne e0:28
305_loopnew#loopned e0:28
306loopnzw#loopnzd e0:28
307lsl 0f03:08;2
308ltr 0f00/3:2A;2
309# F=mov a,[mem], G=mov [mem],a 4=mov a,r
310mov a0:2D a2:2E 88:04 8a:05 8c:2B 8e:2C b0:2F b8:30 c6/0:02 0f20:47;3 0f22:48;3 0f21:49;3 0f23:4A;3 0f24:4B;3 0f26:4C;3
311movd 0f6e:4D;5 0f7e:4E;5
312movq 0f6f:4F;5 0f7f:50;5
313movsb a4.
314movsw/movsd a5.
315movsx 0fbe:31;3 0fbf:32;3
316movzx 0fb6:31;3 0fb7:32;3
317mul f6/4:10
318neg Lf6/3:10
319nop 90.
320not Lf6/2:10
321or L83/1:03 0c:01 L80/1:02 L08:04 0a:05
322_^4org
323out e6:33 ee:34
324outsb 6e.;1
325outsw/outsd 6f.;1
326pop 8f/0:35 58:11 1f:44 07:41 17:43 0fa1:45;3 0fa9:46;3
327popa/popad 61.;1
328popf/popfd 9d.
329push 50:11 ff/6:29 6a:37;1 68:36;1 0e:42 16:43 1e:44 06:41 0fa0:45;3 0fa8:46;3
330pusha/pushad 60.;1
331pushf/pushfd 9c.
332rcl d0/2:38 d2/2:39 c0/2:3A;1
333rcr d0/3:38 d2/3:39 c0/3:3A;1
334rol d0/0:38 d2/0:39 c0/0:3A;1
335ror d0/1:38 d2/1:39 c0/1:3A;1
336rdmsr 0f32.;5
337rdtsc 0f31.;5
338rep f3*
339repe f3*
340repne f2*
341ret c3. c2:3B
342retf/retfd cb. ca:3B
343rsm 0faa.;5
344sahf 9e.
345_sal d0/4:38 d2/4:39 c0/4:3A;1
346sar d0/7:38 d2/7:39 c0/7:3A;1
347seg _26:41 _2e:42 _36:43 _3e:44 _64:45 _65:46
348es _26&
349cs _2e&
350ss _36&
351ds _3e&
352fs _64&
353gs _65&
354shl d0/4:38 d2/4:39 c0/4:3A;1
355shr d0/5:38 d2/5:39 c0/5:3A;1
356sbb L83/3:03 1c:01 L80/3:02 L18:04 1a:05
357scasb ae.
358scasw/scasd af.
359seta 0f97:3C;3
360setae 0f93:3C;3
361setb 0f92:3C;3
362setbe 0f96:3C;3
363_setc 0f92:3C;3
364_sete 0f94:3C;3
365setg 0f9f:3C;3
366setge 0f9d:3C;3
367setl 0f9c:3C;3
368setle 0f9e:3C;3
369_setna 0f96:3C;3
370_setnae 0f92:3C;3
371_setnb 0f93:3C;3
372_setnbe 0f97:3C;3
373_setnc 0f93:3C;3
374_setne 0f95:3C;3
375_setng 0f9e:3C;3
376_setnge 0f9c:3C;3
377_setnl 0f9d:3C;3
378_setnle 0f9f:3C;3
379setno 0f91:3C;3
380_setnp 0f9b:3C;3
381setns 0f99:3C;3
382setnz 0f95:3C;3
383seto 0f90:3C;3
384_setp 0f9a:3C;3
385setpe 0f9a:3C;3
386setpo 0f9b:3C;3
387sets 0f98:3C;3
388setz 0f94:3C;3
389sgdt 0f01/0:1E;2
390sidt 0f01/1:1E;2
391shld 0fa4:3D;3 0fa5:3E;3
392shrd 0fac:3D;3 0fad:3E;3
393sldt 0f00/0:29;2
394smsw 0f01/4:29;2
395stc f9.
396std fd.
397sti fb.
398stosb aa.
399stosw/stosd ab.
400str 0f00/1:2A;2
401sub L83/5:03 2c:01 L80/5:02 L28:04 2a:05
402test a8:01 f6/0:02 84:04 _84:05
403verr 0f00/4:2A;2
404verw 0f00/5:2A;2
405wait 9b.
406wbinvd 0f09.;4
407wrmsr 0f30.;5
408xadd L0fc0:04;4
409xchg 90:3F _90:40 _L86:04 L86:05
410xlat _d7.
411xlatb d7.
412xor L83/6:03 34:01 L80/6:02 L30:04 32:05
413