Home »
Embedded Systems
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:
- Data Copy / Transfer Instructions
- Arithmetic and Logical Instructions
- Branch Instructions
- Loop Instructions
- Machine Control Instructions
- Flag Manipulation Instructions
- Shift and Rotate Instructions
- String Instructions
Data Transfer Instructions
| S.No. | Instruction | Use |
| 1 | MOV | Copies the byte/ word from the source to the destination |
| 2 | PUSH | Puts a word at the top of the stack |
| 3 | POP | Gets a word from the top of the stack |
| 4 | PUSHA | Puts all the registers into the stack |
| 5 | POPA | Get words from the stack to all registers |
| 6 | XCHG | Exchanges the data from two locations |
| 7 | XLAT | Translates a byte in AL using a table in the memory |
| 8 | IN | Reads a byte or word from the port to the accumulator |
| 9 | OUT | Sends a byte/word from the accumulator to the port |
| 10 | LEA | Loads the address into the register |
| 11 | LDS | Loads DS register and other register from the memory |
| 12 | LES | Loads ES register and other register from the memory |
| 13 | LAHF | Loads AH with the low byte of the flag register |
| 14 | SAHF | Stores AH register to low byte of the flag register |
| 15 | PUSHF | Copies the flag register at the top of the stack |
| 16 | POPF | Copies a word at the top of the stack to the flag register |
Arithmetic and Logical Instructions
| S.No. | Instruction | Use |
| 1 | ADD | Adds byte/word to word |
| 2 | ADC | Adds with carry |
| 2 | INC | Increments byte/word by 1 |
| 3 | AAA | Adjusts ASCII after addition |
| 4 | DAA | Adjusts decimal after the addition/subtraction |
| 5 | SUB | Subtracts byte/word from word |
| 6 | SBB | Performs subtraction with borrow |
| 7 | DEC | Decrements byte/word by 1 |
| 8 | NPG | Negates each bit of byte/word and add 1/2's complement |
| 9 | CMP | Compares 2 provided byte/word |
| 10 | AAS | Adjusts ASCII codes after subtraction |
| 11 | DAS | Adjusts decimal after subtraction |
| 12 | MUL | Multiplies unsigned byte by byte/word by word |
| 13 | IMUL | Multiplies signed byte by byte/word by word |
| 14 | AAM | Adjusts ASCII codes after multiplication |
| 15 | DIV | Divides unsigned words/bytes |
| 16 | IDIV | Divides signed words/bytes |
| 17 | AAD | Adjusts ASCII codes after division |
| 18 | CBW | Fills the upper byte of the word with the copies of sign bit of the lower byte |
| 19 | CWD | Fills the upper word of the double word with the sign bit of the lower word |
| 20 | NOT | Performs the logical NOT operation |
| 21 | ABD | Performs the logical AND operation |
| 22 | OR | Performs the logical OR operation |
| 23 | XOR | Performs the XOR operation |
| 24 | TEST | Adds the operands to update flags |
| 25 | SHL | Adds the left-shift operation |
| 26 | SHR | Adds the right-shift operation |
Branch and Loop Instructions
| S.No. | Instruction | Use |
| 1 | CALL | Calls a procedure |
| 2 | RET | Returns from the procedure |
| 3 | JMP | Jump |
Machine Control Instructions
| S.No. | Instruction | Use |
| 1 | NOP | No Operation |
| 2 | HLT | Halt |
| 3 | DI | Disable Interrupts |
| 4 | EI | Enable Interrupts |
| 5 | SIM | Set Interrupt Mask |
| 6 | RIM | Reset Interrupt Mask |
Flag Manipulation Instruction
| S.No. | Instruction | Use |
| 1 | CLC | Clears carry flag |
| 2 | CLD | Clears direction flag |
| 3 | CLI | Clears interrupt flag |
| 4 | CMC | Complements of carry flag |
| 5 | STC | Sets carry flag CF to 1 |
| 6 | STD | Sets direction flag 1 |
| 7 | STI | Sets interrupt flag 1 |
String Instructions
| S.No. | Instruction | Use |
| 1 | REP, REPE/REPZ, REPNE/REPNZ | Repeats the given instructions |
| 2 | MOVS, MOVSB, MOVSW | Moves the byte/word from a string to another |
| 3 | COMS, COMPSB, COMPSW | Compares two string byte/word |
| 4 | INS, INSB, INSW | Input string/byte/word from the I/O port |
| 5 | OUTS, OUTSB, OUTSW | Outputs string/byte/word |
| 6 | SCAS, SCASB, SCASW | Outputs string/byte/word |
| 7 | LODS, LODSB, LODSW | Stores the string byte into AL or string word into AX |
Advertisement
Advertisement