8086 Microprocessor Instruction Sets

In this tutorial, we will learn about the different instruction sets of 8086 Microprocessor. By Uma Dasgupta Last updated : May 15, 2023

There are 8 types of instruction sets of 8086 Microprocessor. They are:

  1. Data Copy / Transfer Instructions
  2. Arithmetic and Logical Instructions
  3. Branch Instructions
  4. Loop Instructions
  5. Machine Control Instructions
  6. Flag Manipulation Instructions
  7. Shift and Rotate Instructions
  8. String Instructions

Data Transfer Instructions

S.No.InstructionUse
1MOVCopies the byte/ word from the source to the destination
2PUSHPuts a word at the top of the stack
3POPGets a word from the top of the stack
4PUSHAPuts all the registers into the stack
5POPAGet words from the stack to all registers
6XCHGExchanges the data from two locations
7XLATTranslates a byte in AL using a table in the memory
8INReads a byte or word from the port to the accumulator
9OUTSends a byte/word from the accumulator to the port
10LEALoads the address into the register
11LDSLoads DS register and other register from the memory
12LESLoads ES register and other register from the memory
13LAHFLoads AH with the low byte of the flag register
14SAHFStores AH register to low byte of the flag register
15PUSHFCopies the flag register at the top of the stack
16POPFCopies a word at the top of the stack to the flag register

Arithmetic and Logical Instructions

S.No.InstructionUse
1ADDAdds byte/word to word
2ADCAdds with carry
2INCIncrements byte/word by 1
3AAAAdjusts ASCII after addition
4DAAAdjusts decimal after the addition/subtraction
5SUBSubtracts byte/word from word
6SBBPerforms subtraction with borrow
7DECDecrements byte/word by 1
8NPGNegates each bit of byte/word and add 1/2's complement
9CMPCompares 2 provided byte/word
10AASAdjusts ASCII codes after subtraction
11DASAdjusts decimal after subtraction
12MULMultiplies unsigned byte by byte/word by word
13IMULMultiplies signed byte by byte/word by word
14AAMAdjusts ASCII codes after multiplication
15DIVDivides unsigned words/bytes
16IDIVDivides signed words/bytes
17AADAdjusts ASCII codes after division
18CBWFills the upper byte of the word with the copies of sign bit of the lower byte
19CWDFills the upper word of the double word with the sign bit of the lower word
20NOTPerforms the logical NOT operation
21ABDPerforms the logical AND operation
22ORPerforms the logical OR operation
23XORPerforms the XOR operation
24TESTAdds the operands to update flags
25SHLAdds the left-shift operation
26SHRAdds the right-shift operation

Branch and Loop Instructions

S.No.InstructionUse
1CALLCalls a procedure
2RETReturns from the procedure
3JMPJump

Machine Control Instructions

S.No.InstructionUse
1NOPNo Operation
2HLTHalt
3DIDisable Interrupts
4EIEnable Interrupts
5SIMSet Interrupt Mask
6RIMReset Interrupt Mask

Flag Manipulation Instruction

S.No.InstructionUse
1CLCClears carry flag
2CLDClears direction flag
3CLIClears interrupt flag
4CMCComplements of carry flag
5STCSets carry flag CF to 1
6STDSets direction flag 1
7STISets interrupt flag 1

String Instructions

S.No.InstructionUse
1REP, REPE/REPZ, REPNE/REPNZRepeats the given instructions
2MOVS, MOVSB, MOVSWMoves the byte/word from a string to another
3COMS, COMPSB, COMPSWCompares two string byte/word
4INS, INSB, INSWInput string/byte/word from the I/O port
5OUTS, OUTSB, OUTSWOutputs string/byte/word
6SCAS, SCASB, SCASWOutputs string/byte/word
7LODS, LODSB, LODSWStores the string byte into AL or string word into AX



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.