Professional Documents
Culture Documents
8086 - Hoja Con Sumario de InstruccionesA4
8086 - Hoja Con Sumario de InstruccionesA4
Description
8086
ARITHMETIC
Instruction Code
76543210
76543210
76543210
76543210
data if s w e 01
Instruction Code
DATA TRANSFER
MOV e Move (|ODITSZAPC|=|---------|) 7 6 5 4 3 2 1 0
76543210
100010dw
mod
Immediate to RegisterMemory
1100011w
000000dw
Immediate to RegisterMemory
100000sw
mod 0 0 0 rm
data
Immediate to Accumulator
0000010w
data
data if w e 1
76543210
76543210
mod 0 0 0 rm
data
data if w e 1
1 0 1 1 w reg
data
data if w e 1
Memory to Accumulator
1010000w
addr-low
addr-high
Accumulator to Memory
1010001w
addr-low
addr-high
RegisterMemory
10001110
Register
10001100
00110111
(|ODITSZAPC| = |?---??*?*|)
00100111
(|ODITSZAPC| = |?---*****|)
Immediate to Register
reg
rm
11111111
Register
000100dw
Immediate to RegisterMemory
100000sw
mod 0 1 0 rm
data
Immediate to Accumulator
0001010w
data
data if w e 1
1111111w
mod 0 0 0 rm
0 1 0 0 0 reg
mod 1 1 0 rm
001010dw
100000sw
mod 1 0 1 rm
data
0010110w
data
data if w e 1
0 1 0 1 0 reg
Segment Register
0 0 0 reg 1 1 0
mod 0 0 0 rm
0 1 0 1 1 reg
0 0 0 reg 1 1 1
1000011w
Variable Port
1110110w
Variable Port
1110111w
11010111
10001101
(|ODITSZAPC| = |---------|)
port
11000101
(|ODITSZAPC| = |---------|)
(|ODITSZAPC| = |---------|)
11000100
10011111
(|ODITSZAPC| = |---------|)
10011110
(|ODITSZAPC| = |----*****|)
10011100
(|ODITSZAPC| = |---------|)
10011101
(|ODITSZAPC| = |*********|)
Mnemonic and
Description
(|ODITSZAPC| = |---------|)
data if w e 1
NOT e Invert
1111011w
mod 0 1 0 rm
(|ODITSZAPC| = |---------|)
110100vw
mod 1 0 0 rm
(|ODITSZAPC| = |*---**?**|)
110100vw
mod 1 0 1 rm
(|ODITSZAPC| = |*---**?**|)
110100vw
mod 1 1 1 rm
(|ODITSZAPC| = |*---**?**|)
110100vw
mod 0 0 0 rm
(|ODITSZAPC| = |-------- |)
110100vw
mod 0 0 1 rm
(|ODITSZAPC| = |*-------*|)
110100vw
mod 0 1 0 rm
(|ODITSZAPC| = |*-------*|)
110100vw
mod 0 1 1 rm
(|ODITSZAPC| = |*-------*|)
76543210
76543210
76543210
001000dw
Immediate to RegisterMemory
1000000w
mod 1 0 0 rm
data
Immediate to Accumulator
0010010w
data
data if w e 1
data if w e 1
1111011w
mod 0 0 0 rm
data
1010100w
data
data if w e 1
data if w e 1
000010dw
Immediate to RegisterMemory
1000000w
mod 0 0 1 rm
data
Immediate to Accumulator
0000110w
data
data if w e 1
data if w e 1
(|ODITSZAPC| = |*---**?**|)
001100dw
Immediate to RegisterMemory
1000000w
mod 1 1 0 rm
data
Immediate to Accumulator
0011010w
data
data if w e 1
STRING MANIPULATION
REP e Repeat
1111001z
(|ODITSZAPC| = |---------|)
1010010w
(|ODITSZAPC| = |---------|)
1010011w
(|ODITSZAPC| = |*---*****|)
1010111w
(|ODITSZAPC| = |*---*****|)
1010110w
1010101w
1111111w
mod 0 0 1 rm
0 1 0 0 1 reg
1111011w
mod 0 1 1 rm
(|ODITSZAPC| = |*---*****|)
001110dw
100000sw
mod 1 1 1 rm
data
0011110w
data
data if w e 1
00111111
00101111
1111011w
mod 1 0 0 rm
1111011w
mod 1 0 1 rm
(|ODITSZAPC| = |*---????*|)
11010100
00001010
(|ODITSZAPC| = |?---**?*?|)
(|ODITSZAPC| = |---------|)
(|ODITSZAPC| = |---------|)
CONTROL TRANSFER
CALL e Call (|ODITSZAPC| = |---------|)
Direct within Segment
11101000
disp-low
disp-high
11111111
mod 0 1 0 rm
Direct Intersegment
10011010
offset-low
offset-high
seg-low
seg-high
Indirect Intersegment
11111111
mod 0 1 1 rm
data if w e 1
data if s w e 01
(|ODITSZAPC| = |?---??*?*|)
(|ODITSZAPC| = |?---*****|)
(|ODITSZAPC| = |*---????*|)
1111011w
mod 1 1 0 rm
(|ODITSZAPC| = |?---?????|)
1111011w
mod 1 1 1 rm
(|ODITSZAPC| = |?---?????|)
11010101
00001010
(|ODITSZAPC| = |?---**?*?|)
10011000
(|ODITSZAPC| = |---------|)
10011001
(|ODITSZAPC| = |---------|)
Mnemonic and
Description
76543210
1000010w
data if s w e 01
Instruction Code
LOGIC
data
1110011w
data
000111w
Fixed Port
mod 0 1 1 rm
Register
100000sw
Registermemory
000110dw
1 0 0 1 0 reg
Fixed Port
data if s w e 01
Segment Register
data if s w e 01
Instruction Code
76543210
76543210
11101001
disp-low
disp-high
11101011
disp
11111111
mod 1 0 0 rm
Direct Intersegment
11101010
offset-low
offset-high
seg-low
seg-high
Indirect Intersegment
11111111
mod 1 0 1 rm
11000011
11000010
Intersegment
11001011
data-low
11001010
data-low
01110100
disp
01111100
disp
01111110
disp
01110010
disp
01110110
disp
01111010
disp
JO e Jump on Overflow
01110000
disp
JS e Jump on Sign
01111000
disp
01110101
disp
01111101
disp
01111111
disp
01110011
disp
01110111
disp
01111011
disp
01110001
disp
01111001
disp
11100010
disp
11100001
disp
11100000
disp
11100011
disp
data-high
data-high
(|ODITSZAPC| = |---------|)
(|ODITSZAPC| = |---------|)
(|ODITSZAPC| = |---------|)
11001101
Type 3
11001100
type
11001110
(|ODITSZAPC| = |--**-----|)
11001111
(|ODITSZAPC| = |*********|)
Mnemonic and
Description
Instruction Code
76543210
8086 Registers
Pin Diagram
76543210
PROCESSOR CONTROL
CLC e Clear Carry
11111000
(|ODITSZAPC| = |--------0|)
11110101
(|ODITSZAPC| = |--------*|)
11111001
(|ODITSZAPC| = |--------1|)
11111100
(|ODITSZAPC| = |-0-------|)
11111101
(|ODITSZAPC| = |-1-------|)
11111010
(|ODITSZAPC| = |--0------|)
11111011
(|ODITSZAPC| = |--1------|)
HLT e Halt
11110100
(|ODITSZAPC| = |---------|)
WAIT e Wait
10011011
(|ODITSZAPC| = |---------|)
11011xxx
11110000
NOTES
AL e 8-bit accumulator
AX e 16-bit accumulator
CX e Count register
DS e Data segment
ES e Extra segment
Abovebelow refers to unsigned value
Greater e more positive
Less e less positive (more negative) signed values
if d e 1 then to reg if d e 0 then from reg
if w e 1 then word instruction if w e 0 then byte instruction
if mod e 11 then rm is treated as a REG field
if mod e 00 then DISP e 0 disp-low and disp-high are
absent
if mod e 01 then DISP e disp-low sign-extended to
16 bits disp-high is absent
if mod e 10 then DISP e disp-high disp-low
if rm e 000 then EA e (BX) a (SI) a DISP
if rm e 001 then EA e (BX) a (DI) a DISP
if rm e 010 then EA e (BP) a (SI) a DISP
if rm e 011 then EA e (BP) a (DI) a DISP
if rm e 100 then EA e (SI) a DISP
if rm e 101 then EA e (DI) a DISP
if rm e 110 then EA e (BP) a DISP
if rm e 111 then EA e (BX) a DISP
DISP follows 2nd byte of instruction (before data if required)
except if mod e 00 and rm e 110 then EA e disp-high
disp-low
mod x x x rm
(|ODITSZAPC| = |---------|)
(|ODITSZAPC| = |---------|)
Rotate Instructions
CF
RCL
0 0 1 reg 1 1 0
CF
16-Bit (w e 1)
000
001
010
011
100
101
110
111
AX
CX
DX
BX
SP
BP
SI
DI
8-Bit (w e 0)
000
001
010
011
100
101
110
111
AL
CL
DL
BL
AH
CH
DH
BH
ROL
Segment
CF
00 ES
01 CS
10 SS
11 DS
0
SHL
CF
0
SAL
CF
RCR
Intentionally
Blank
CF
ROR
CF
| Unaffected/Affected/Reset/Set/Unknown
SHR
NOTES:
CF
SAR
Instruction
JA
JNBE
JAE
JNB
JB
JNAE
JBE
JNA
JE
JNE
Condition
Carry = 1
Carry = 0
Zero = 1
Zero = 0
Sign = 1
Sign = 0
Overflow = 1
Overflow = 0
Parity = 1
Parity = 1
Parity = 0
Parity = 0
Aliases
JB, JNAE
JNB, JAE
JE
JNE
JPE
JP
JPO
JNP
Unsigned Comparisons
Description
Condition
Jump if above (>)
Carry = 0, Zero = 0
Jump if not below nor equal (not <=)
Carry = 0, Zero = 0
Jump if above or equal (>=)
Carry = 0
Jump if not below (not <)
Carry = 0
Jump if below (<)
Carry = 1
Jump if not above nor equal (not >=)
Carry = 1
Jump if below or equal (<=)
Carry = 1 or Zero = 1
Jump if not above (not >)
Carry = 1 or Zero = 1
Jump if equal (=)
Zero = 1
Jump if not equal ()
Zero = 0
Opposite
JNC
JC
JNZ
JZ
JNS
JS
JNO
JO
JNP
JPO
JP
JPE
Aliases Opposite
JNBE
JNA
JA
JBE
JNC, JNB JNAE
JNC, JAE
JB
JC, JNAE
JNB
JC, JB
JAE
JNA
JNBE
JBE
JA
JZ
JNE
JNZ
JE
Signed Comparisons
Instruction
Description
Condition
Aliases Opposite
JG
Jump if greater (>)
Sign = Overflow or Zero = 0 JNLE
JNG
JNLE
Jump if not less than nor equal (not <=) Sign = Overflow or Zero = 0
JG
JLE
JGE
Jump if greater than or equal (>=)
Sign = Overflow
JNL
JGE
JNL
Jump if not less than (not <)
Sign = Overflow
JGE
JL
JL
Jump if less than (<)
Sign Overflow
JNGE
JNL
JNGE
Jump if not greater nor equal (not >=)
Sign Overflow
JL
JGE
JLE
Jump if less than or equal (<=)
Sign Overflow or Zero = 1
JNG
JNLE
JNG
Jump if not greater than (not >)
Sign Overflow or Zero = 1
JLE
JG
JE
Jump if equal (=)
Zero = 1
JZ
JNE
JNE
Jump if not equal ()
Zero = 0
JNZ
JE
Intentionally
Blank
Assembler Directives
ALIGN
ASSUME sr:sy(,...)
ASSUME NOTHING
DB
e(,...)
DBS
e
DD
e(,...)
DDS
e
DW
e(,...)
DWS
e
EXT
(sr:)sy(t)
LABEL t
PROC
t
ABS
BYTE
DWORD
FAR
HIGH
LENGTH
LOW
NEAR
OFFSET
PTR
SEG
SHORT
SIZE
THIS
TYPE
WORD