Final Mic MP
Final Mic MP
INDEX
3 6
ARITHMETIC INSTRUCTIONS:
4 LOGICAL INSTRUCTIONS: 10
5 BRANCH INSTRUCTIONS: 13
6 CONDITIONAL BRANCH 16
INSTRUCTIONS:
8 17
STRING MANIPULATION
INSTRUCTIONS:
10 CONCLUSION 21
PAGE NO : 1
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
MOV:
This instruction copies a word or a byte of data from some source to a destination. The
destination can be a register or a memory location. The source can be a register, a
memory location, or an immediate number.
MOV AX,BX
MOV AX,5000H
MOV AX,[SI]
MOV AX,[2000H]
MOV AX,50H[BX]
MOV [734AH],BX
MOV DS,CX
MOV CL,[357AH]
This instruction pushes the contents of the specified register/memory location on to the
stack. The stack pointer is decremented by 2, after each execution of the instruction.
E.g. PUSH AX
• PUSH DS
• PUSH [5000H]
PAGE NO : 2
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
PAGE NO : 3
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
XLAT :
Translate byte using look-up table
Eg. LEA BX, TABLE1
MOV AL, 04H
XLAT
IN:
Copy a byte or word from specified port to accumulator.
Eg. IN AL,03H
IN AX,DX
OUT:
Copy a byte or word from accumulator specified port.
Eg. OUT 03H, AL
OUT DX, AX
LEA :
Load effective address of operand in specified register.
[reg] offset portion of address in DS
Eg. LEA reg, offset
LDS:
Load DS register and other specified register from memory.
[reg] [mem]
[DS] [mem + 2]
Eg. LDS reg, mem
LES:
Load ES register and other specified register from memory.
[reg] [mem] [ES] [mem + 2]
Eg. LES reg, mem
PAGE NO : 4
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
SAHF:
Store (copy) AH register to low byte of flag register.
[Flags low byte] [-------[AH]
Eg. SAHF
PUSHF:
Copy flag register to top of stack.
[SP] [SP] – 2
[[SP]] [Flags]
Eg. PUSHF
POPF :
Copy word at top of stack to flag register.
[Flags] [[SP]]
[SP] [SP] + 2
PAGE NO : 5
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
ARITHMETIC INSTRUCTIONS:
The 8086 provides many arithmetic operations: addition, subtraction, negation, multiplication and
comparing two values.
ADD :
The add instruction adds the contents of the source operand to the destination, operand.
ADD AX, 0100H
ADD AX, BX
ADD AX, [SI]
ADD AX, [5000H]
ADD [5000H], 0100H
ADD 0100H
SUB : Subtract
The subtract instruction subtracts the source operand from the destination operand and the result is left
in the destination operand.
Eg SUB AX, 0100H
SUB AX, BX
SUB AX, [5000H]
SUB [5000H], 0100H
PAGE NO : 6
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
Eg.
SBB AX, 0100H
SBB AX, BX
SBB AX, [5000H]
INC : Increment
This instruction increases the contents of the specified Register or memory location by 1. Immediate
data cannot be operand of this instruction.
Eg. INC AX INC [BX]
INC [5000H
DEC : Decrement
The decrement instruction subtracts 1 from the contents of the specified register or memory location.
Eg. DEC AX DEC
[5000H]
NEG : Negate
The negate instruction forms 2‟s complement of the specified destination in the instruction. The
destination can be a register or a memory location. This instruction can be implemented by inverting
each bit and adding 1 to it.
Eg. NEG AL
AL = 0011 0101 35H Replace number in AL with its 2‟s complement
AL = 1100 1011 = CBH
CMP : Compare
This instruction compares the source operand, which may be a register or an immediate data or a
memory location, with a destination operand that may be a 6 SBB AX, 0100H SBB AX, BX SBB AX,
[5000H] SBB [5000H], 0100H register or a memory location
Eg. CMP BX, 0100H
CMP AX, 0100H
CMP [5000H], 0100H
CMP BX, [SI]
CMP BX, C
PAGE NO : 7
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
PAGE NO : 8
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
PAGE NO : 9
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
LOGICAL INSTRUCTIONS:
AND : Logical AND
This instruction bit by bit ANDs the source operand that may be an immediate
register or a memory location to the destination operand that may a register or a memory
location. The result is stored in the destination operand.
Eg. AND AX, 0008H
AND AX, BX
OR : Logical OR
This instruction bit by bit ORs the source operand that may be an immediate ,
register or a memory location to the destination operand that may a register or a memory
location. The result is stored in the destination operand.
Eg. OR AX, 0008H
OR AX, BX
NOT : Logical Invert
This instruction complements the contents of an operand register or a memory
location, bit by bit.
Eg. NOT AX
NOT [5000H]
XOR : Logical Exclusive OR
This instruction bit by bit XORs the source operand that may be an immediate ,
register or a memory location to the destination operand that may a register or a memory
location. The result is stored in the destination operand.
Eg. XOR AX, 0098H
XOR AX, BX
PAGE NO : 10
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
PAGE NO : 11
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
PAGE NO : 12
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
BRANCH INSTRUCTIONS :
Branch Instructions transfers the flow of execution of the program to a new
address specified in the instruction directly or indirectly. When this type of instruction is
executed, the CS and IP registers get loaded with new values of CS and IP corresponding
to the location to be transferred.
The Branch Instructions are classified into two types
i. Unconditional Branch Instructions.
ii. Conditional Branch Instructions.
PAGE NO : 13
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
PAGE NO : 14
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
PAGE NO : 15
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
JZ/JE Label
Transfer execution control to address „Label‟, if ZF=1.
JNZ/JNE Label
Transfer execution control to address „Label‟, if ZF=0
JS Label
Transfer execution control to address „Label‟, if SF=1.
JNS Label
Transfer execution control to address „Label‟, if SF=0.
JO Label
Transfer execution control to address „Label‟, if OF=1.
13
JNO Label
Transfer execution control to address „Label‟, if OF=0.
JNP Label
Transfer execution control to address „Label‟, if PF=0.
JP Label
Transfer execution control to address „Label‟, if PF=1.
JB Label
Transfer execution control to address „Label‟, if CF=1.
JNB Label
Transfer execution control to address „Label‟, if CF=0.
JCXZ Label
Transfer execution control to address „Label‟, if CX=0
PAGE NO : 16
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
PAGE NO : 17
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
PAGE NO : 18
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
PAGE NO : 19
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
PAGE NO : 20
INSTRUCTION SET OF 8086 MICROPROCESSOR [ MIC ]
CONCLUSION:
We learn the instruction set of 8086 microprocessors like data transfer instruction, logical instruction,
arithmetic instruction and branching instruction. Addressing mode tells us what is the type of the
operand and the way they are accessed from the memory for execution of an instruction and how to
fetch particular instruction from the memory.
REFERENCE:
1. Microprocessor and Interfacing: Douglas Hall, Tata McGraw Hill.
2. Microcomputer Systems: 8086/8088 family Architecture, Programming and Design: Liu
& Gibson, PHI Publication
PAGE NO : 21