CSC167 ยท 2075 ยท 5 marks
What is instruction set? Explain various kinds of instructions of 8085 microprocessor.
What is instruction set? Explain various kinds of instructions of 8085 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.
Instruction Set and Types of Instructions in 8085 Microprocessor
Definition of Instruction Set
- The 8085 microprocessor supports 246 instructions.
- Each instruction is represented by an 8-bit binary value called the Op-code or Instruction Byte.
Types (Kinds) of Instructions in 8085 Microprocessor
The instructions of the 8085 microprocessor are classified into the following categories:
1. Data Transfer Instructions
These instructions move data between registers, memory, and I/O ports without modifying the data.
| Instruction | Function |
|---|---|
| MOV | Move data from one register to another |
| MVI | Move immediate data to a register |
| LDA | Load accumulator from memory |
| STA | Store accumulator to memory |
| IN / OUT | Input/Output data from/to I/O port |
2. Arithmetic Instructions
These instructions perform arithmetic operations such as addition and subtraction.
| Instruction | Function |
|---|---|
| ADD | Add register or memory to accumulator |
| ADI | Add immediate data to accumulator |
| SUB | Subtract register or memory from accumulator |
| INR | Increment register by 1 |
| DCR | Decrement register by 1 |
3. Logical Instructions
These instructions perform logical (Boolean) operations on data.
| Instruction | Function |
|---|---|
| ANA | AND register with accumulator |
| ORA | OR register with accumulator |
| XRA | XOR register with accumulator |
| CMA | Complement the accumulator |
| CMP | Compare register with accumulator |
4. Branch / Jump Instructions
These instructions alter the normal sequential flow of a program by jumping to a specific address, either conditionally or unconditionally.
| Instruction | Function |
|---|---|
| JMP | Unconditional jump to a particular address |
| JC | Jump if Carry Flag (CF) = 1 |
| JNC | Jump if Carry Flag (CF) = 0 |
| JZ / JE | Jump if Zero Flag (ZF) = 1 |
| JNZ | Jump if Zero Flag (ZF) = 0 |
| CALL | Call a subroutine/procedure |
| RET | Return from subroutine to calling program |
5. Stack and Machine Control Instructions
These instructions control the stack operations and the overall machine state.
| Instruction | Function |
|---|---|
| PUSH | Push register pair onto the stack |
| POP | Pop data from stack to register pair |
| HLT | Halt the processor |
| NOP | No operation (do nothing for one cycle) |
| EI / DI | Enable / Disable interrupts |
6. Rotate Instructions
These instructions rotate the bits of the accumulator left or right.
| Instruction | Function |
|---|---|
| ROL / RLC | Rotate bits from MSB to LSB (left) |
| ROR / RRC | Rotate bits from LSB to MSB (right) |
| RCL / RAL | Rotate left through Carry Flag |
| RCR / RAR | Rotate right through Carry Flag |
Summary Table
| Category | Purpose |
|---|---|
| Data Transfer | Move data between registers/memory/I/O |
| Arithmetic | Add, subtract, increment, decrement |
| Logical | AND, OR, XOR, compare, complement |
| Branch/Jump | Change program flow conditionally or unconditionally |
| Stack/Control | Manage stack and machine state |
| Rotate | Shift/rotate bits in the accumulator |
The 8085 instruction set provides a complete set of operations allowing the microprocessor to perform arithmetic, logical, data movement, and program control tasks efficiently.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.