Category : Assembly Language Source Code
Archive   : OPCODE_A.ZIP
Filename : OPCODES.TXT

 
Output of file : OPCODES.TXT contained in archive : OPCODE_A.ZIP

8086/88/186/188/286 Instruction Set OpCodes PGS - Page 1

| OP XX XX XX XX XX | SW | len | MNEMONICS |
+-------------------+----+-----+---------------------------+
| 00 am dl dh | B | 2/4 | ADD xb,rb |
| 01 am dl dh | W | 2/4 | ADD xw,rw |
| 02 am dl dh | B | 2/4 | ADD rb,xb |
| 03 am dl dh | W | 2/4 | ADD rw,xw |
| 04 ib | B | 2 | ADD AL,ib |
| 05 il ih | W | 3 | ADD AX,iw |
+-------------------+----+-----+---------------------------+
| 06 | | 1 | PUSH ES |
+-------------------+----+-----+---------------------------+
| 07 | | 1 | POP ES |
+-------------------+----+-----+---------------------------+
| 08 am dl dh | B | 2/4 | OR xb,rb |
| 09 am dl dh | W | 2/4 | OR xw,rw |
| 0A am dl dh | B | 2/4 | OR rb,xb |
| 0B am dl dh | W | 2/4 | OR rw,xw |
| 0C ib | B | 2 | OR AL,ib |
| 0D il ih | W | 3 | OR AX,iw |
+-------------------+----+-----+---------------------------+
| 0E | | 1 | PUSH CS |
+-------------------+----+-----+---------------------------+
| 0F | | 1 | ??? |
+-------------------+----+-----+---------------------------+
| 10 am dl dh | B | 2/4 | ADC xb,rb |
| 11 am dl dh | W | 2/4 | ADC xw,rw |
| 12 am dl dh | B | 2/4 | ADC rb,xb |
| 13 am dl dh | W | 2/4 | ADC rw,xw |
| 14 ib | B | 2 | ADC AL,ib |
| 15 il ih | W | 3 | ADC AX,iw |
+-------------------+----+-----+---------------------------+
| 16 | | 1 | PUSH SS |
+-------------------+----+-----+---------------------------+
| 17 | | 1 | POP SS |
+-------------------+----+-----+---------------------------+
| 18 am dl dh | B | 2/4 | SBB xb,rb |
| 19 am dl dh | W | 2/4 | SBB xw,rw |
| 1A am dl dh | B | 2/4 | SBB rb,xb |
| 1B am dl dh | W | 2/4 | SBB rw,xw |
| 1C ib | B | 2 | SBB AL,ib |
| 1D il ih | W | 3 | SBB AX,iw |
+-------------------+----+-----+---------------------------+
| 1E | | 1 | PUSH DS |
+-------------------+----+-----+---------------------------+
| 1F | | 1 | POP DS |
+-------------------+----+-----+---------------------------+

Notation
--------
OP Instruction OpCode.

XX Additional Code bytes.

S Sign Bit -- E - Sign-extend 8-bit immediate data

W Word/byte Bit -- W - 16-bit operands,
B - 8-bit operands

LEN Instruction length.

MNEMONICS Instruction syntax.

8086/88/186/188/286 Instruction Set OpCodes PGS - Page 2

| OP XX XX XX XX XX | SW | len | MNEMONICS |
+-------------------+----+-----+---------------------------+
| 20 am dl dh | B | 2/4 | AND xb,rb |
| 21 am dl dh | W | 2/4 | AND xw,rw |
| 22 am dl dh | B | 2/4 | AND rb,xb |
| 23 am dl dh | W | 2/4 | AND rw,xw |
| 24 ib | B | 2 | AND AL,ib |
| 25 il ih | W | 3 | AND AX,iw |
+-------------------+----+-----+---------------------------+
| 26 | | 1 | ES: |
+-------------------+----+-----+---------------------------+
| 27 | | 1 | DAA |
+-------------------+----+-----+---------------------------+
| 28 am dl dh | B | 2/4 | SUB xb,rb |
| 29 am dl dh | W | 2/4 | SUB xw,rw |
| 2A am dl dh | B | 2/4 | SUB rb,xb |
| 2B am dl dh | W | 2/4 | SUB rw,xw |
| 2C ib | B | 2 | SUB AL,ib |
| 2D il ih | W | 3 | SUB AX,iw |
+-------------------+----+-----+---------------------------+
| 2E | | 1 | CS: |
+-------------------+----+-----+---------------------------+
| 2F | | 1 | DAS |
+-------------------+----+-----+---------------------------+
| 30 am dl dh | B | 2/4 | XOR xb,rb |
| 31 am dl dh | W | 2/4 | XOR xw,rw |
| 32 am dl dh | B | 2/4 | XOR rb,xb |
| 33 am dl dh | W | 2/4 | XOR rw,xw |
| 34 ib | B | 2 | XOR AL,ib |
| 35 il ih | W | 3 | XOR AX,iw |
+-------------------+----+-----+---------------------------+
| 36 | | 1 | SS: |
+-------------------+----+-----+---------------------------+
| 37 | | 1 | AAA |
+-------------------+----+-----+---------------------------+
| 38 am dl dh | B | 2/4 | CMP xb,rb |
| 39 am dl dh | W | 2/4 | CMP xw,rw |
| 3A am dl dh | B | 2/4 | CMP rb,xb |
| 3B am dl dh | W | 2/4 | CMP rw,xw |
| 3C ib | B | 2 | CMP AL,ib |
| 3D il ih | W | 3 | CMP AX,iw |
+-------------------+----+-----+---------------------------+
| 3E | | 1 | DS: |
+-------------------+----+-----+---------------------------+
| 3F | | 1 | AAS |
+-------------------+----+-----+---------------------------+

Additional Code Bytes
---------------------
am = Addressing mode Byte = mmregr/m
mm = Mode - 2-bit register/memory mode with disp.
00 = disp = 0, dl and dh are absent, unless r/m =
110, when effective address = dh dl.
01 = disp = sign-extended dl. dh is absent.
10 = disp = dh dl.
11 = two-register instruction -
reg = target and r/m = source.

8086/88/186/188/286 Instruction Set OpCodes PGS - Page 3

| OP XX XX XX XX XX | SW | len | MNEMONICS |
+-------------------+----+-----+---------------------------+
| 40 | | 1 | INC AX |
| 41 | | 1 | INC CX |
| 42 | | 1 | INC DX |
| 43 | | 1 | INC BX |
| 44 | | 1 | INC SP |
| 45 | | 1 | INC BP |
| 46 | | 1 | INC SI |
| 47 | | 1 | INC DI |
+-------------------+----+-----+---------------------------+
| 48 | | 1 | DEC AX |
| 49 | | 1 | DEC CX |
| 49 | | 1 | DEC DX |
| 4A | | 1 | DEC BX |
| 4B | | 1 | DEC SP |
| 4C | | 1 | DEC BP |
| 4D | | 1 | DEC SI |
| 4F | | 1 | DEC DI |
+-------------------+----+-----+---------------------------+
| 50 | | 1 | PUSH AX |
| 51 | | 1 | PUSH CX |
| 52 | | 1 | PUSH DX |
| 53 | | 1 | PUSH BX |
| 54 | | 1 | PUSH SP |
| 55 | | 1 | PUSH BP |
| 56 | | 1 | PUSH SI |
| 57 | | 1 | PUSH DI |
+-------------------+----+-----+---------------------------+
| 58 | | 1 | POP AX |
| 59 | | 1 | POP CX |
| 5A | | 1 | POP DX |
| 5B | | 1 | POP BX |
| 5C | | 1 | POP SP |
| 5D | | 1 | POP BP |
| 5E | | 1 | POP SI |
| 5F | | 1 | POP DI |
+-------------------+----+-----+---------------------------+

reg = Register | r/m = Register/Memory
reg W=1 W=0 | r/m operand address
--- --- --- | --- ---------------
000 AX AL | 000 DS:[BX+SI+disp]
001 CX CL | 001 DS:[BX+DI+disp]
010 DX DL | 010 DS:[BP+SI+disp]
011 BX BL | 011 DS:[BP+dI+disp]
100 SP AH | 100 DS:[SI+disp]
101 BP CH | 101 DS:[DI+disp]
110 SI DH | 110 DS:[BP+disp]
111 DI BH | 111 DS:[BX+disp]

dl dh = Displacement [disp_low disp_high]
ds = Short Displacement to label 'sl' (-128/+127 bytes)

8086/88/186/188/286 Instruction Set OpCodes PGS - Page 4

| OP XX XX XX XX XX | SW | len | MNEMONICS |
+-------------------+----+-----+---------------------------+
| 60 | | 1 | PUSHA [186] |
| 61 | | 1 | POPA [186] |
+-------------------+----+-----+---------------------------+
| 62 am dl dh | | 4 | BOUND rw fp [186] |
+-------------------+----+-----+---------------------------+
| 63 | | 1 | ??? |
| 64 | | 1 | ??? |
| 65 | | 1 | ??? |
| 66 | | 1 | ??? |
| 67 | | 1 | ??? |
+-------------------+----+-----+---------------------------+
| 68 il ih | N | 3 | PUSH iw [186] |
+-------------------+----+-----+---------------------------+
| 69 am dl dh il ih | N | 3/5 | IMUL rw,[xw,]iw [186] |
+-------------------+----+-----+---------------------------+
| 6A ib | E | 2 | PUSH ib [186] |
+-------------------+----+-----+---------------------------+
| 6B am dl dh il | E | 2/4 | IMUL rw,[xw,]ib [186] |
+-------------------+----+-----+---------------------------+
| 6C | B | 1 | INSB [186] |
| 6D | W | 1 | INSW [186] |
+-------------------+----+-----+---------------------------+
| 6E | B | 1 | OUTSB [186] |
| 6F | W | 1 | OUTSW [186] |
+-------------------+----+-----+---------------------------+
| 70 ds | | 2 | JO sl |
| 71 ds | | 2 | JNO sl |
| 72 ds | | 2 | JB sl |
| 73 ds | | 2 | JNB sl |
| 74 ds | | 2 | JZ sl |
| 75 ds | | 2 | JNZ sl |
| 76 ds | | 2 | JNA sl |
| 77 ds | | 2 | JA sl |
| 78 ds | | 2 | JS sl |
| 79 ds | | 2 | JNS sl |
| 7A ds | | 2 | JP sl |
| 7B ds | | 2 | JNP sl |
| 7C ds | | 2 | JL sl |
| 7D ds | | 2 | JNL sl |
| 7E ds | | 2 | JNG sl |
| 7F ds | | 2 | JG sl |
+-------------------+----+-----+---------------------------+

ib = Immediate byte value il ih = Immediate word value
ol oh = Offset value sl sh = Segment value

Mnemonic Notation
-----------------
ib = Immediate byte value iw = Immediate word value

xb = Memory/register byte xw = Memory/register word

mw = Memory word np = near pointer

rb = Byte register. rw = Word register

sl = Short label.

8086/88/186/188/286 Instruction Set OpCodes PGS - Page 5

| OP XX XX XX XX XX | SW | len | MNEMONICS |
+-------------------+----+-----+---------------------------+
| 80 am dl dh il ih | NB | 4/6 | Imm xb,ib |
| 81 am dl dh il ih | NW | 4/6 | Imm xw,iw |
| 82 am dl dh ib | EB | 3/5 | Imm xb,ib |

| 83 am dl dh ib | EW | 3/5 | Imm xw,ib |
+-------------------+----+-----+---------------------------+
| 84 am dl dh | B | 2/4 | TEST xb,xb |
| 85 am dl dh | W | 2/4 | TEST xw,xw |
+-------------------+----+-----+---------------------------+
| 86 am dl dh | B | 2/4 | XCHG xb,xb |
| 87 am dl dh | W | 2/4 | XCHG xw,xw |
+-------------------+----+-----+---------------------------+
| 88 am dl dh | B | 2/4 | MOV xb,rb |
| 89 am dl dh | W | 2/4 | MOV xw,rw |
| 8A am dl dh | B | 2/4 | MOV rb,xb |
| 8B am dl dh | W | 2/4 | MOV rw,xw |
| 8C am dl dh | | 2/4 | MOV xw,sr |
+-------------------+----+-----+---------------------------+
| 8D am dl dh | | 4 | LEA rw,np |
+-------------------+----+-----+---------------------------+
| 8E am dl dh | | 2/4 | MOV sr,xw |
+-------------------+----+-----+---------------------------+
| 8F am dl dh | | 4 | POP xw |
+-------------------+----+-----+---------------------------+
| 90 | | 1 | NOP |
+-------------------+----+-----+---------------------------+
| 91 | | 1 | XCHG CX,AX |
| 92 | | 1 | XCHG DX,AX |
| 93 | | 1 | XCHG BX,AX |
| 94 | | 1 | XCHG SP,AX |
| 95 | | 1 | XCHG BP,AX |
| 96 | | 1 | XCHG SI,AX |
| 97 | | 1 | XCHG DI,AX |
+-------------------+----+-----+---------------------------+
| 98 | | 1 | CBW |
| 99 | | 1 | CWD |
+-------------------+----+-----+---------------------------+
| 9A ol oh sl sh | | 5 | CALL FAR PTR dw |
+-------------------+----+-----+---------------------------+
| 9B | | 1 | WAIT |
+-------------------+----+-----+---------------------------+
| 9C | | 1 | PUSHF |
| 9D | | 1 | POPF |
+-------------------+----+-----+---------------------------+
| 9E | | 1 | SAHF |
| 9F | | 1 | LAHF |
+-------------------+----+-----+---------------------------+

reg | Imm sr = Segment Register
-----+----- ----------------
000 | ADD 00 ES
001 | OR 01 CS
010 | ADC 10 SS
011 | SBB 11 DS
100 | AND
101 | SUB
110 | XOR
111 | CMP
-----+-----

8086/88/186/188/286 Instruction Set OpCodes PGS - Page 6


| OP XX XX XX XX XX | SW | len | MNEMONICS |
+-------------------+----+-----+---------------------------+
| A0 dl dh | B | 3 | MOV AL,xb |
| A1 dl dh | W | 3 | MOV AX,xw |
| A2 dl dh | B | 3 | MOV xb,AL |
| A3 dl dh | W | 3 | MOV xw,AX |
+-------------------+----+-----+---------------------------+
| A4 | B | 1 | MOVSB |
| A5 | W | 1 | MOVSW |
+-------------------+----+-----+---------------------------+
| A6 | B | 1 | CMPSB |
| A7 | W | 1 | CMPSW |
+-------------------+----+-----+---------------------------+
| A8 ib | B | 2 | TEST AL,ib |
| A9 il ih | W | 3 | TEST AX,iw |
+-------------------+----+-----+---------------------------+
| AA | B | 1 | STOSB |
| AB | W | 1 | STOSW |
+-------------------+----+-----+---------------------------+
| AC | B | 1 | LODSB |
| AD | W | 1 | LODSW |
+-------------------+----+-----+---------------------------+
| AE | B | 1 | SCASB |
| AF | W | 1 | SCASW |
+-------------------+----+-----+---------------------------+
| B0 ib | B | 2 | MOV AL,ib |
| B1 ib | B | 2 | MOV CL,ib |
| B2 ib | B | 2 | MOV DL,ib |
| B3 ib | B | 2 | MOV BL,ib |
| B4 ib | B | 2 | MOV AH,ib |
| B5 ib | B | 2 | MOV CH,ib |
| B6 ib | B | 2 | MOV DH,ib |
| B7 ib | B | 2 | MOV BH,ib |
+-------------------+----+-----+---------------------------+
| B8 il ih | W | 3 | MOV AX,iw |
| B9 il ih | W | 3 | MOV CX,iw |
| BA il ih | W | 3 | MOV DX,iw |
| BB il ih | W | 3 | MOV BX,iw |
| BC il ih | W | 3 | MOV SP,iw |
| BD il ih | W | 3 | MOV BP,iw |
| BE il ih | W | 3 | MOV SI,iw |
| BF il ih | W | 3 | MOV DI,iw |
+-------------------+----+-----+---------------------------+

8086/88/186/188/286 Instruction Set OpCodes PGS - Page 7


| OP XX XX XX XX XX | SW | len | MNEMONICS |
+-------------------+----+-----+---------------------------+
| C0 am dl dh ib | B | 3/5 | Shift xb,ib [186] |
| C1 am dl dh ib | W | 3/5 | Shift xw,ib [186] |
+-------------------+----+-----+---------------------------+
| C2 il ih | | 3 | RETN iw |
| C3 | | 1 | RETN |
+-------------------+----+-----+---------------------------+
| C4 am dl dh | | 4 | LES rx,fp |
| C5 am dl dh | | 4 | LDS rx,fp |
+-------------------+----+-----+---------------------------+
| C6 am ib | B | 3 | MOV xb,ib |
| C7 am il ih | W | 4 | MOV xw,iw |
+-------------------+----+-----+---------------------------+
| C8 ih il ib | | 4 | ENTER iw,ib [186] |
+-------------------+----+-----+---------------------------+
| C9 | | 1 | LEAVE [186] |
+-------------------+----+-----+---------------------------+
| CA dl dh | | 3 | RETF iw |
| CB | | 1 | RETF |
+-------------------+----+-----+---------------------------+
| CC | | 1 | INT 3 |
| CD ib | | 2 | INT ib |
+-------------------+----+-----+---------------------------+
| CE | | 1 | INTO |
+-------------------+----+-----+---------------------------+
| CF | | 1 | IRET |
+-------------------+----+-----+---------------------------+
| D0 am dl dh | B | 2/4 | Shift xb,1 |
| D1 am dl dh | W | 2/4 | Shift xw,1 |
| D2 am dl dh | B | 2/4 | Shift xb,CL |
| D3 am dl dh | W | 2/4 | Shift xw,CL |
+-------------------+----+-----+---------------------------+
| D4 0A | | 2 | AAM |
| D5 0A | | 2 | AAD |
+-------------------+----+-----+---------------------------+
| D6 | | | ??? |
+-------------------+----+-----+---------------------------+
| D7 | | 1 | XLAT |
+-------------------+----+-----+---------------------------+
| D8 am | | 2 | ESC 00-07 |
| D9 am | | 2 | ESC 08-0F |
| DA am | | 2 | ESC 10-17 |
| DB am | | 2 | ESC 18-1F |
| DC am | | 2 | ESC 20-27 |
| DD am | | 2 | ESC 28-2F |
| DE am | | 2 | ESC 30-37 |
| DF am | | 2 | ESC 38-3F |
+-------------------+----+-----+---------------------------+

reg | Shf
-----+-----
000 | ROL
001 | ROR
010 | RCL
011 | RCR
100 | SHL
101 | SHR
110 | ???
111 | SAR
-----+-----

8086/88/186/188/286 Instruction Set OpCodes PGS - Page 8


| OP XX XX XX XX XX | SW | len | MNEMONICS |
+-------------------+----+-----+---------------------------+
| E0 ds | | 2 | LOOPNZ sl |
| E1 ds | | 2 | LOOPZ sl |
| E2 ds | | 2 | LOOP sl |
| E3 ds | | 2 | JCXZ sl |
+-------------------+----+-----+---------------------------+
| E4 ib | B | 2 | IN AL,ib |
| E5 ib | W | 2 | IN AX,ib |
+-------------------+----+-----+---------------------------+
| E6 ib | B | 2 | OUT ib,AL |
| E7 ib | W | 2 | OUT ib,AX |
+-------------------+----+-----+---------------------------+
| E8 dl dh | | 3 | CALL np |
+-------------------+----+-----+---------------------------+
| E9 dl dh | | 3 | JMP np |
| EA ol oh sl sh | | 5 | JMP FAR PTR mw |
| EB ds | | 2 | JMP SHORT sl |
+-------------------+----+-----+---------------------------+
| EC | B | 1 | IN AL,DX |
| ED | W | 1 | IN AX,DX |
+-------------------+----+-----+---------------------------+
| EE | B | 1 | OUT DX,AL |
| EF | W | 1 | OUT DX,AX |
+-------------------+----+-----+---------------------------+
| F0 | | 1 | LOCK |
+-------------------+----+-----+---------------------------+
| F1 | | 1 | ??? |
+-------------------+----+-----+---------------------------+
| F2 | | 1 | REP/REPNZ |
| F3 | | 1 | REPZ |
+-------------------+----+-----+---------------------------+
| F4 | | 1 | HLT |
+-------------------+----+-----+---------------------------+
| F5 | | 1 | CMC |
+-------------------+----+-----+---------------------------+
| F6 am dl dh ib | B | 2-5 | Grp1 |
| F7 am dl dh il ih | W | 2-6 | Grp1 |
+-------------------+----+-----+---------------------------+
| F8 | | 1 | CLC |
| F9 | | 1 | STC |
| FA | | 1 | CLI |
| FB | | 1 | STI |
| FC | | 1 | CLD |
| FD | | 1 | STD |
+-------------------+----+-----+---------------------------+
| FE am dl dh | B | 2/4 | Grp2 |
| FF am dl dh | W | 2/4 | Grp2 |
+-------------------+----+-----+---------------------------+

reg | Grp1 reg | Grp2
-----+--------------------- -----+-----------------------
000 | TEST xb/xw,ib/iw 000 | INC xb/xw
001 | ??? 001 | DEC xb/xw
010 | NOT xb/xw 010 | CALL rw
011 | NEG xb/xw 011 | CALL DWORD PTR[rw]
100 | MUL xb/xw 100 | JMP rw
101 | IMUL xb/xw 101 | JMP DWORD PTR[rw]
110 | DIV xb/xw 110 | PUSH mw
111 | IDIV xb/xw 111 | ???
-----+--------------------- -----+-----------------------




  3 Responses to “Category : Assembly Language Source Code
Archive   : OPCODE_A.ZIP
Filename : OPCODES.TXT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/