Sie sind auf Seite 1von 2

Mnemonic and

Instruction Code
Description
8086
ARITHMETIC 76543210 76543210 76543210 76543210
ADD e Add (|ODITSZAPC| = |*---*****|)

Table 2 Instruction Set Summary RegMemory with Register to Either 000000dw mod reg rm

Mnemonic and Immediate to RegisterMemory 100000sw mod 0 0 0 rm data data if s w e 01


Instruction Code
Description
Immediate to Accumulator 0000010w data data if w e 1
DATA TRANSFER
MOV e Move (|ODITSZAPC|=|---------|) 7 6 5 4 3 2 1 0 76543210 76543210 76543210 ADC e Add with Carry (|ODITSZAPC| = |*---*****|)

RegisterMemory tofrom Register 100010dw mod reg rm RegMemory with Register to Either 000100dw mod reg rm

Immediate to RegisterMemory 1100011w mod 0 0 0 rm data data if w e 1 Immediate to RegisterMemory 100000sw mod 0 1 0 rm data data if s w e 01

Immediate to Register 1 0 1 1 w reg data data if w e 1 Immediate to Accumulator 0001010w data data if w e 1

Memory to Accumulator 1010000w addr-low addr-high INC e Increment (|ODITSZAPC| = |*---****-|)

Accumulator to Memory 1010001w addr-low addr-high RegisterMemory 1111111w mod 0 0 0 rm

RegisterMemory to Segment Register 10001110 mod 0 reg rm Register 0 1 0 0 0 reg

Segment Register to RegisterMemory 10001100 mod 0 reg rm AAA e ASCII Adjust for Add 00110111 (|ODITSZAPC| = |?---??*?*|)
DAA e Decimal Adjust for Add 00100111 (|ODITSZAPC| = |?---*****|)
PUSH e Push (|ODITSZAPC| = |---------|)
SUB e Subtract (|ODITSZAPC| = |*---*****|)
RegisterMemory 11111111 mod 1 1 0 rm
RegMemory and Register to Either 001010dw mod reg rm
Register 0 1 0 1 0 reg
Immediate from RegisterMemory 100000sw mod 1 0 1 rm data data if s w e 01
Segment Register 0 0 0 reg 1 1 0
Immediate from Accumulator 0010110w data data if w e 1
POP e Pop (|ODITSZAPC| = |---------|)
SBB e Subtract with Borrow: (|ODITSZAPC| = |*---*****|)
RegisterMemory 10001111 mod 0 0 0 rm
RegMemory and Register to Either 000110dw mod reg rm
Register 0 1 0 1 1 reg
Immediate from RegisterMemory 100000sw mod 0 1 1 rm data data if s w e 01
Segment Register 0 0 0 reg 1 1 1 Immediate from Accumulator 000111w data data if w e 1

XCHG e Exchange (|ODITSZAPC| = |---------|) DEC e Decrement (|ODITSZAPC| = |*---****-|)


RegisterMemory with Register 1000011w mod reg rm Registermemory 1111111w mod 0 0 1 rm

Register with Accumulator 1 0 0 1 0 reg Register 0 1 0 0 1 reg


NEG e Change sign 1111011w mod 0 1 1 rm (|ODITSZAPC| = |*---*****|)
IN e Input from (|ODITSZAPC| = |---------|)
CMP e Compare (|ODITSZAPC| = |*---*****|)
Fixed Port 1110010w port
RegisterMemory and Register 001110dw mod reg rm
Variable Port 1110110w
Immediate with RegisterMemory 100000sw mod 1 1 1 rm data data if s w e 01
OUT e Output to (|ODITSZAPC| = |---------|)
Immediate with Accumulator 0011110w data data if w e 1
Fixed Port 1110011w port
AAS e ASCII Adjust for Subtract 00111111 (|ODITSZAPC| = |?---??*?*|)
Variable Port 1110111w
DAS e Decimal Adjust for Subtract 00101111 (|ODITSZAPC| = |?---*****|)
XLAT e Translate Byte to AL 11010111 (|ODITSZAPC| = |---------|)
MUL e Multiply (Unsigned) 1111011w mod 1 0 0 rm (|ODITSZAPC| = |*---????*|)
LEA e Load EA to Register 10001101 mod reg rm (|ODITSZAPC| = |---------|)
IMUL e Integer Multiply (Signed) 1111011w mod 1 0 1 rm (|ODITSZAPC| = |*---????*|)
LDS e Load Pointer to DS 11000101 mod reg rm (|ODITSZAPC| = |---------|)
AAM e ASCII Adjust for Multiply 11010100 00001010 (|ODITSZAPC| = |?---**?*?|)
LES e Load Pointer to ES 11000100 mod reg rm (|ODITSZAPC| = |---------|)
DIV e Divide (Unsigned) 1111011w mod 1 1 0 rm (|ODITSZAPC| = |?---?????|)
LAHF e Load AH with Flags 10011111 (|ODITSZAPC| = |---------|)
IDIV e Integer Divide (Signed) 1111011w mod 1 1 1 rm (|ODITSZAPC| = |?---?????|)
SAHF e Store AH into Flags 10011110 (|ODITSZAPC| = |----*****|)
AAD e ASCII Adjust for Divide 11010101 00001010 (|ODITSZAPC| = |?---**?*?|)
PUSHF e Push Flags 10011100 (|ODITSZAPC| = |---------|)
CBW e Convert Byte to Word 10011000 (|ODITSZAPC| = |---------|)
POPF e Pop Flags 10011101 (|ODITSZAPC| = |*********|)
CWD e Convert Word to Double Word 10011001 (|ODITSZAPC| = |---------|)

Mnemonic and Mnemonic and


Instruction Code Instruction Code
Description Description
LOGIC 76543210 76543210 76543210 76543210
JMP e Unconditional Jump: (|---------|) 7 6 5 4 3 2 1 0 76543210 76543210
NOT e Invert 1111011w mod 0 1 0 rm (|ODITSZAPC| = |---------|)
Direct within Segment 11101001 disp-low disp-high
SHLSAL e Shift LogicalArithmetic Left 110100vw mod 1 0 0 rm (|ODITSZAPC| = |*---**?**|)
Direct within Segment-Short 11101011 disp
SHR e Shift Logical Right 110100vw mod 1 0 1 rm (|ODITSZAPC| = |*---**?**|)
Indirect within Segment 11111111 mod 1 0 0 rm
SAR e Shift Arithmetic Right 110100vw mod 1 1 1 rm (|ODITSZAPC| = |*---**?**|)
Direct Intersegment 11101010 offset-low offset-high
ROL e Rotate Left 110100vw mod 0 0 0 rm (|ODITSZAPC| = |-------- |)
seg-low seg-high
ROR e Rotate Right 110100vw mod 0 0 1 rm (|ODITSZAPC| = |*-------*|)
Indirect Intersegment 11111111 mod 1 0 1 rm
RCL e Rotate Through Carry Flag Left 110100vw mod 0 1 0 rm (|ODITSZAPC| = |*-------*|)
RCR e Rotate Through Carry Right 110100vw mod 0 1 1 rm (|ODITSZAPC| = |*-------*|) RET e Return from CALL (|ODITSZAPC| = |---------|)
Within Segment 11000011
AND e And (|ODITSZAPC| = |*---**?**|)
Within Seg Adding Immed to SP 11000010 data-low data-high
RegMemory and Register to Either 001000dw mod reg rm
Intersegment 11001011
Immediate to RegisterMemory 1000000w mod 1 0 0 rm data data if w e 1
Intersegment Adding Immediate to SP 11001010 data-low data-high
Immediate to Accumulator 0010010w data data if w e 1
JEJZ e Jump on EqualZero 01110100 disp (|ODITSZAPC| = |---------|)
TEST e And Function to Flags No Result (|ODITSZAPC| = |*---**?**|)
JLJNGE e Jump on LessNot Greater 01111100 disp
RegisterMemory and Register 1000010w mod reg rm or Equal
JLEJNG e Jump on Less or Equal 01111110 disp
Immediate Data and RegisterMemory 1111011w mod 0 0 0 rm data data if w e 1 Not Greater

Immediate Data and Accumulator 1010100w data data if w e 1 JBJNAE e Jump on BelowNot Above 01110010 disp
or Equal
JBEJNA e Jump on Below or Equal
OR e Or (|ODITSZAPC| = |*---**?**|) 01110110 disp
Not Above
RegMemory and Register to Either 000010dw mod reg rm JPJPE e Jump on ParityParity Even 01111010 disp

Immediate to RegisterMemory 1000000w mod 0 0 1 rm data data if w e 1 JO e Jump on Overflow 01110000 disp

Immediate to Accumulator 0000110w data data if w e 1 JS e Jump on Sign 01111000 disp


XOR e Exclusive or (|ODITSZAPC| = |*---**?**|) JNEJNZ e Jump on Not EqualNot Zero 01110101 disp

RegMemory and Register to Either 001100dw mod reg rm JNLJGE e Jump on Not LessGreater 01111101 disp
or Equal
Immediate to RegisterMemory 1000000w mod 1 1 0 rm data data if w e 1 JNLEJG e Jump on Not Less or Equal 01111111 disp
Immediate to Accumulator 0011010w data data if w e 1 Greater
JNBJAE e Jump on Not BelowAbove 01110011 disp
or Equal
STRING MANIPULATION
JNBEJA e Jump on Not Below or 01110111 disp
REP e Repeat 1111001z (|ODITSZAPC| = |---------|) EqualAbove
JNPJPO e Jump on Not ParPar Odd 01111011 disp
MOVS e Move ByteWord 1010010w (|ODITSZAPC| = |---------|)
JNO e Jump on Not Overflow 01110001 disp
CMPS e Compare ByteWord 1010011w (|ODITSZAPC| = |*---*****|)
JNS e Jump on Not Sign 01111001 disp
SCAS e Scan ByteWord 1010111w (|ODITSZAPC| = |*---*****|)
LOOP e Loop CX Times 11100010 disp (|ODITSZAPC| = |---------|)
LODS e Load ByteWd to ALAX 1010110w (|ODITSZAPC| = |---------|)
LOOPZLOOPE e Loop While ZeroEqual 11100001 disp
STOS e Stor ByteWd from ALA 1010101w (|ODITSZAPC| = |---------|)
LOOPNZLOOPNE e Loop While Not 11100000 disp
CONTROL TRANSFER ZeroEqual
JCXZ e Jump on CX Zero 11100011 disp (|ODITSZAPC| = |---------|)
CALL e Call (|ODITSZAPC| = |---------|)

Direct within Segment 11101000 disp-low disp-high INT e Interrupt: (|ODITSZAPC| = |--00-----|)

Indirect within Segment 11111111 mod 0 1 0 rm Type Specified 11001101 type

Direct Intersegment 10011010 offset-low offset-high Type 3 11001100

seg-low seg-high INTO e Interrupt on Overflow 11001110 (|ODITSZAPC| = |--**-----|)

Indirect Intersegment 11111111 mod 0 1 1 rm IRET e Interrupt Return 11001111 (|ODITSZAPC| = |*********|)
Mnemonic and
Instruction Code
Description Pin Diagram 8086 Registers
76543210 76543210
PROCESSOR CONTROL

CLC e Clear Carry 11111000 (|ODITSZAPC| = |--------0|)

CMC e Complement Carry 11110101 (|ODITSZAPC| = |--------*|)

STC e Set Carry 11111001 (|ODITSZAPC| = |--------1|)

CLD e Clear Direction 11111100 (|ODITSZAPC| = |-0-------|)

STD e Set Direction 11111101 (|ODITSZAPC| = |-1-------|)


CLI e Clear Interrupt 11111010 (|ODITSZAPC| = |--0------|)

STI e Set Interrupt 11111011 (|ODITSZAPC| = |--1------|)

HLT e Halt 11110100 (|ODITSZAPC| = |---------|)

WAIT e Wait 10011011 (|ODITSZAPC| = |---------|)

ESC e Escape (to External Device) 11011xxx mod x x x rm (|ODITSZAPC| = |---------|)

LOCK e Bus Lock Prefix 11110000 (|ODITSZAPC| = |---------|)

NOTES if s w e 01 then 16 bits of immediate data form the oper-


AL e 8-bit accumulator and
AX e 16-bit accumulator if s w e 11 then an immediate data byte is sign extended
CX e Count register to form the 16-bit operand Rotate Instructions
DS e Data segment if v e 0 then count e 1 if v e 1 then count in (CL)
ES e Extra segment x e dont care CF
Abovebelow refers to unsigned value z is used for string primitives for comparison with ZF FLAG
Greater e more positive RCL
SEGMENT OVERRIDE PREFIX
Less e less positive (more negative) signed values
if d e 1 then to reg if d e 0 then from reg 0 0 1 reg 1 1 0
if w e 1 then word instruction if w e 0 then byte instruc- CF
tion REG is assigned according to the following table ROL
if mod e 11 then rm is treated as a REG field
16-Bit (w e 1) 8-Bit (w e 0) Segment
if mod e 00 then DISP e 0 disp-low and disp-high are
absent CF 0
000 AX 000 AL 00 ES
if mod e 01 then DISP e disp-low sign-extended to SHL
001 CX 001 CL 01 CS
16 bits disp-high is absent
if mod e 10 then DISP e disp-high disp-low 010 DX 010 DL 10 SS
if rm e 000 then EA e (BX) a (SI) a DISP 011 BX 011 BL 11 DS CF 0
if rm e 001 then EA e (BX) a (DI) a DISP 100 SP 100 AH SAL
if rm e 010 then EA e (BP) a (SI) a DISP
101 BP 101 CH
if rm e 011 then EA e (BP) a (DI) a DISP
if rm e 100 then EA e (SI) a DISP 110 SI 110 DH
CF
if rm e 101 then EA e (DI) a DISP 111 DI 111 BH RCR
if rm e 110 then EA e (BP) a DISP
Instructions which reference the flag register file as a 16-bit
if rm e 111 then EA e (BX) a DISP Intentionally
object use the symbol FLAGS to represent the file
DISP follows 2nd byte of instruction (before data if re- Blank
FLAGS e XXXX(OF)(DF)(IF)(TF)(SF)(ZF)X(AF)X(PF)X(CF) CF
quired)
except if mod e 00 and rm e 110 then EA e disp-high ROR
disp-low
The codes used for 'Affected Flags' column are: |-*01? | Unaffected/Affected/Reset/Set/Unknown 0 CF
SHR

NOTES: CF
SAR
Tabulated and Edited by Dr. Mohammed Hawa, University of Jordan.
Version 1.1, June, 2005.

Conditional Jump Instructions ASCII Character Set

Instruction Description Condition Aliases Opposite


JC Jump if carry Carry = 1 JB, JNAE JNC
JNC Jump if no carry Carry = 0 JNB, JAE JC
JZ Jump if zero Zero = 1 JE JNZ
JNZ Jump if not zero Zero = 0 JNE JZ
JS Jump if sign Sign = 1 - JNS
JNS Jump if no sign Sign = 0 - JS
JO Jump if overflow Overflow = 1 - JNO
JNO Jump if no overflow Overflow = 0 - JO
JP Jump if parity Parity = 1 JPE JNP Intentionally
JPE Jump if parity even Parity = 1 JP JPO Blank
JNP Jump if no parity Parity = 0 JPO JP
JPO Jump if parity odd Parity = 0 JNP JPE

Unsigned Comparisons
Instruction Description Condition Aliases Opposite
JA Jump if above (>) Carry = 0, Zero = 0 JNBE JNA
JNBE Jump if not below nor equal (not <=) Carry = 0, Zero = 0 JA JBE
JAE Jump if above or equal (>=) Carry = 0 JNC, JNB JNAE
JNB Jump if not below (not <) Carry = 0 JNC, JAE JB
JB Jump if below (<) Carry = 1 JC, JNAE JNB
JNAE Jump if not above nor equal (not >=) Carry = 1 JC, JB JAE
JBE Jump if below or equal (<=) Carry = 1 or Zero = 1 JNA JNBE
JNA Jump if not above (not >) Carry = 1 or Zero = 1 JBE JA Assembler Directives
JE Jump if equal (=) Zero = 1 JZ JNE ALIGN Align to word boundary
JNE Jump if not equal () Zero = 0 JNZ JE ASSUME sr:sy(,...) Assume segment register name(s)
ASSUME NOTHING Remove all former assumptions
DB e(,...) Define Byte(s)
DBS e Define Byte Storage
Signed Comparisons DD e(,...) Define Double Word(s)
Instruction Description Condition Aliases Opposite DDS e Define Double Word Storage
JG Jump if greater (>) Sign = Overflow or Zero = 0 JNLE JNG DW e(,...) Define Word(s)
DWS e Define Word Storage
JNLE Jump if not less than nor equal (not <=) Sign = Overflow or Zero = 0 JG JLE EXT (sr:)sy(t) External(s)(t=ABS/BYTE/DWORD/FAR/NEAR/WORD)
JGE Jump if greater than or equal (>=) Sign = Overflow JNL JGE LABEL t Label (t=BYTE/DWORD/FAR/NEAR/WORD)
JNL Jump if not less than (not <) Sign = Overflow JGE JL PROC t Procedure (t=FAR/NEAR, default NEAR)
JL Jump if less than (<) Sign Overflow JNGE JNL ABS Absolute value of operand
BYTE Byte type operation
JNGE Jump if not greater nor equal (not >=) Sign Overflow JL JGE DWORD Double Word operation
JLE Jump if less than or equal (<=) Sign Overflow or Zero = 1 JNG JNLE FAR IP and CS registers altered
JNG Jump if not greater than (not >) Sign Overflow or Zero = 1 JLE JG HIGH High-order 8 bits of 16-bit value
JE LENGTH Number of basic units
Jump if equal (=) Zero = 1 JZ JNE LOW Low-order 8 bit of 16-bit value
JNE Jump if not equal () Zero = 0 JNZ JE NEAR Only IP register need be altered
OFFSET Offset portion of an address
PTR Create a variable or label
SEG Segment of address
8086 Flags Register SHORT One byte for a JMP operation
SIZE Number of bytes defined by statement
|ODITSZAPC| Overflow Flag, Direction Flag, Interrupt Flag, Trap Flag, THIS Create a variable/label of specified type
Sign Flag, Zero Flag, Auxilary carry Flag, Parity Flag, TYPE Number of bytes in the unit defined
Carry Flag WORD Word operation

Das könnte Ihnen auch gefallen