8086bin.txt Instruction set of the 8086/8088 in binary order source: mcs-86 product description, intel corporation, june 1978 19880607/wjvg 000000dw modregrm add reg/mem with reg to either 0000010w datadata dataifw1 add imm to acc 000010dw modregrm or reg/mem and reg to either 000010dw modregrm test reg/mem and reg to either 0000110w datadata dataifw1 or imm to acc 000100dw modregrm adc reg/mem with reg to either 0001010w datadata dataifw1 adc imm to acc 000110dw modregrm sbc reg/mem with reg to either 0001110w datadata dataifw1 sbc imm from acc 000sr110 push seg reg 000sr111 pop seg reg 001000dw modregrm and reg/mem and reg to either 0010010w datadata dataifw1 and imm to acc 00100111 daa 001010dw modregrm sub reg/mem with reg to either 0010110w datadata dataifw1 sub imm from acc 00101111 das 001100dw modregrm xor reg/mem and reg to either 0011010w datadata dataifw1 xor imm to acc 00110111 aaa 001110dw modregrm cmp reg/mem and reg 0011110w datadata dataifw1 cmp imm with acc 00111111 aas 001sr110 segment override prefix 01000reg inc reg 01001reg dec reg 01010reg push reg 01011reg pop reg 01110000 dispdisp jo 01110001 dispdisp jno 01110010 dispdisp jb/jnae 01110011 dispdisp jnb/jae 01110100 dispdisp je/jz 01110101 dispdisp jne/jnz 01110110 dispdisp jbe/jna 01110111 dispdisp jnbe/ja 01111000 dispdisp js 01111001 dispdisp jns 01111010 dispdisp jp/jpe 01111011 dispdisp jnp/jpo 01111100 dispdisp jl/jnge 01111101 dispdisp jnl/jge 01111110 dispdisp jle/jng 01111111 dispdisp jnle/jg 100000sw mod000rm datadata dataif01 add imm to reg/mem 100000sw mod000rm datadata dataif01 test imm and reg/mem 100000sw mod001rm datadata dataif01 or imm to reg/mem 100000sw mod010rm datadata dataif01 adc imm to reg/mem 100000sw mod011rm datadata dataif01 sbc imm from reg/mem 100000sw mod100rm datadata dataif01 and imm to reg/mem 100000sw mod101rm datadata dataif01 sub imm from reg/mem 100000sw mod110rm datadata dataif01 xor imm to reg/mem 100000sw mod111rm datadata dataif01 cmp imm with reg/mem 1000010w modregrm test reg with reg/mem 1000011w modregrm xchg reg/mem with reg 100010dw modregrm mov reg/mem to/from reg 10001100 modregrm mov seg reg to reg/mem 10001101 modregrm lea 10001110 modregrm mov reg/mem to seg reg 10001111 mod110rm pop reg/mem 10010reg xchg reg with acc 10011000 cbw 10011001 cwd 10011010 offslo offshi seglo seghi call direct intersegment 10011011 wait 10011100 pushf 10011101 popf 10011110 sahf 10011111 lahf 1010000w addr-low addrhigh mov mem to acc 1010001w addr-low addrhigh mov acc to mem 1010010w movb/movw 1010011w cmpb/cmpw 1010100w datadata dataifw1 test imm and acc 1010101w stob/stow 1010110w lodb/lodw 1010111w scab/scaw 1011wreg datadata dataifw1 mov imm to reg 11000010 data-low datahigh ret within segment adding imm to sp 11000011 ret within segment 11000100 modregrm les 11000101 modregrm lds 1100011w mod000rm mov imm to reg/mem 11001010 data-low datahigh ret intersegment adding imm to sp 11001011 ret intersegment 11001100 int with type 3 11001101 typetype int with type specified 11001110 into 11001111 iret 110100vw mod000rm rol 110100vw mod001rm ror 110100vw mod010rm rcl 110100vw mod011rm rcr 110100vw mod100rm shl/sal 110100vw mod101rm shr 110100vw mod111rm sar 11010100 00001010 aam 11010101 00001010 aad 11010111 xlat (xlate byte to al) 11011xxx modxxxrm esc 11100000 dispdisp loopnz/loopne 11100001 dispdisp loopz/loope 11100010 dispdisp loop 11100011 dispdisp jcxz 1110010w portport in/inw to al/ax from fixed port 1110011w portport out/outw to al/ax to fixed port 11101000 disp=low disphigh call direct within segment 11101001 disp-low disphigh jmp direct within segment 11101010 offslo offshi seglo seghi jmp direct intersegment 11101011 dispdisp jmp direct within segment short 1110110w in/inw to al/ax from variable port 1110111w out/outw to al/ax to variable port 11110000 lock 1111001z rep 11110100 hlt 11110101 cmc 1111011w mod010rm not 1111011w mod011rm neg 1111011w mod100rm mul 1111011w mod101rm imul 1111011w mod110rm div 1111011w mod111rm idiv 11111000 clc 11111001 stc 11111010 cli 11111011 sti 11111100 cld 11111101 std 1111111w mod000rm inc reg/mem 1111111w mod001rm dec reg/mem 11111111 mod010rm call indirect within segment 11111111 mod011rm call indirect intersegment 11111111 mod100rm jmp indirect within segment 11111111 mod101rm jmp indirect intersegment 11111111 mod110rm push reg/mem d: 0 from 1 to w: 0 byte 1 word mod: 00 disp=0, except if rm=110 then EA=disphigh:disp-low 01 disp=disp-low sign extended to 16 bits 10 disp=disphigh:disp-low 11 r/m is reg field rm: 000 EA=bx+si+disp 001 EA=bx+di+disp 010 EA=bp+si+disp 011 EA=bp+di+disp 100 EA=si+disp 101 EA=di+disp 110 EA=bp+disp, except if mod=00 then EA=disphigh:disp-low 111 EA=bx+disp sw: 01 16 bits of imm data form the operand 11 an imm data byte is sign extended to form the 16-bit operand v: 0 count=0 1 count in cl x don't care z is used for string primitives for comparison with zf flag w reg: 0 000 al 0 001 cl 0 010 dl 0 011 bl 0 100 ah 0 101 ch 0 110 dh 0 111 bh 1 000 ax 1 001 cx 1 010 dx 1 011 bx 1 100 sp 1 101 bp 1 110 si 1 111 di sr: 00 es 01 cs 10 ss 11 ds flags = -:-:-:-:OF:DF:IF:TF:SF:ZF:-:AF:-:PF:-:CF From: Jaap van Ganswijk To: Herve Marechal Subject: Re: About microprocessor At 11:27 AM 5/20/96 +0200, you wrote: >Hello, >Please, could you tell me where I can get complete info about the >instruction set of i386 processor ? (mnemonics, and opcodes). I don't >care if it's 486, pentium or newer. >But I do want both names and hexadecimal codes of instructions. >Thank you very much, I've spent an hour without finding! Have you found: ../chipdir/iset/ It has the 8086 instruction set. The 386 instruction set is based on this one with a prefix byte of 0x66 to change the operand size to 32 bits and 0x67 to change the addressing size to 32 bits. When you use 32 bits addressing, the coding of the addressing modes changes... There are PDF's of the Pentium databook on the Intel CD-ROM called 'Intel Architecture Labs'. See '../chipdir/ext/cdrom.html', to get this free CD-ROM. Or look at the Intel-site for this CD-ROM or the PDF's... Perhaps it's better to buy a regular databook however... (Available in book stores or from Intel distributors.) I think, there is also an overiew of the instruction set in Denmark at: http://www.imada.ou.dk/~jews/PInfo/intel.html - Processor Information: Intel