2076 11

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]

MicroprocessorChapter 4: Assembly Language ProgrammingInstruction Types

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.

InstructionDescription
MOVMove data from source to destination
PUSHPush data onto the stack
POPPop data from the stack
INInput data from I/O port
OUTOutput data to I/O port
XCHGExchange contents of two operands

2. Arithmetic Instructions

These instructions perform arithmetic operations such as addition, subtraction, multiplication, and division.

InstructionDescription
ADDAdd source to destination
SUBSubtract source from destination
MULUnsigned multiplication
DIVUnsigned division
INCIncrement operand by 1
DECDecrement operand by 1

3. Logical Instructions

These instructions perform bitwise logical operations.

InstructionDescription
ANDBitwise AND of two operands
ORBitwise OR of two operands
XORBitwise XOR of two operands
NOTBitwise complement of operand
CMPCompare two operands

4. Branch / Control Transfer Instructions

These instructions alter the normal sequential flow of program execution.

InstructionDescription
JMPUnconditional jump to a particular address
JCJump if Carry Flag (CF) = 1
JE / JZJump if Equal / Zero Flag (ZF) = 1
JNCJump if CF = 0
JNE / JNZJump if Not Equal / ZF = 0
JSJump if Sign Flag (SF) = 1
CALLCall a subroutine/procedure
RETReturn from subroutine to calling program

5. Loop Instructions

These instructions repeat a block of instructions a specified number of times.

InstructionDescription
LOOPLoop until CX = 0
LOOPE / LOOPZLoop while ZF = 1 and CX != 0
LOOPNE / LOOPNZLoop while ZF = 0 and CX != 0

6. Rotate and Shift Instructions

These instructions shift or rotate the bits of an operand.

InstructionDescription
ROLRotate bits left (MSB to LSB and CF)
RORRotate bits right (LSB to MSB and CF)
RCLRotate bits left through Carry Flag
RCRRotate bits right through Carry Flag
SHL / SALShift bits left logically/arithmetically
SHR / SARShift bits right logically/arithmetically

7. Interrupt Instructions

These instructions handle interrupt operations.

InstructionDescription
INTSoftware interrupt generated by I/O operations
INTOInterrupt only if Overflow Flag (OF) = 1
IRETReturn 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.