CSC167 ยท 2076 ยท 5 marks
What is instruction set? Explain various kinds of instructions of 8086 microprocessor.
What is instruction set? Explain various kinds of instructions of 8086 microprocessor. [5]
Quick answer
An instruction is a binary pattern designed inside a microprocessor to perform a specific function. The entire group of instructions that a microprocessor supports is called the Instruction Set. Each instruction is represented by a binary value called an Op-code (Operation Code).
Instruction Set and Types of Instructions in 8086 Microprocessor
Definition of Instruction Set
Types of Instructions in 8086 Microprocessor
The instructions of the 8086 microprocessor are grouped into the following categories:
1. Data Transfer Instructions
These instructions transfer data between registers, memory, and I/O ports.
| Instruction | Description |
|---|---|
MOV | Move data from source to destination |
PUSH | Push data onto the stack |
POP | Pop data from the stack |
IN | Input data from I/O port |
OUT | Output data to I/O port |
XCHG | Exchange contents of two operands |
2. Arithmetic Instructions
These instructions perform arithmetic operations such as addition, subtraction, multiplication, and division.
| Instruction | Description |
|---|---|
ADD | Add source to destination |
SUB | Subtract source from destination |
MUL | Unsigned multiplication |
DIV | Unsigned division |
INC | Increment operand by 1 |
DEC | Decrement operand by 1 |
3. Logical Instructions
These instructions perform bitwise logical operations.
| Instruction | Description |
|---|---|
AND | Bitwise AND of two operands |
OR | Bitwise OR of two operands |
XOR | Bitwise XOR of two operands |
NOT | Bitwise complement of operand |
CMP | Compare two operands |
4. Branch / Control Transfer Instructions
These instructions alter the normal sequential flow of program execution.
| Instruction | Description |
|---|---|
JMP | Unconditional jump to a particular address |
JC | Jump if Carry Flag (CF) = 1 |
JE / JZ | Jump if Equal / Zero Flag (ZF) = 1 |
JNC | Jump if CF = 0 |
JNE / JNZ | Jump if Not Equal / ZF = 0 |
JS | Jump if Sign Flag (SF) = 1 |
CALL | Call a subroutine/procedure |
RET | Return from subroutine to calling program |
5. Loop Instructions
These instructions repeat a block of instructions a specified number of times.
| Instruction | Description |
|---|---|
LOOP | Loop until CX = 0 |
LOOPE / LOOPZ | Loop while ZF = 1 and CX != 0 |
LOOPNE / LOOPNZ | Loop while ZF = 0 and CX != 0 |
6. Rotate and Shift Instructions
These instructions shift or rotate the bits of an operand.
| Instruction | Description |
|---|---|
ROL | Rotate bits left (MSB to LSB and CF) |
ROR | Rotate bits right (LSB to MSB and CF) |
RCL | Rotate bits left through Carry Flag |
RCR | Rotate bits right through Carry Flag |
SHL / SAL | Shift bits left logically/arithmetically |
SHR / SAR | Shift bits right logically/arithmetically |
7. Interrupt Instructions
These instructions handle interrupt operations.
| Instruction | Description |
|---|---|
INT | Software interrupt generated by I/O operations |
INTO | Interrupt only if Overflow Flag (OF) = 1 |
IRET | Return from interrupt procedure to main program |
Summary
The 8086 instruction set covers data movement, arithmetic, logic, branching, looping, bit manipulation, and interrupt handling, making it a complete and powerful instruction set for general-purpose computing.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.