Instruction Set of 8085 Microprocessor

0
583

In this article we will discuss about instruction set of 8085 microprocessor. An instruction is a binary bit pattern which performs a specific function in a system. The entire group of instructions of a system is called the instruction set. Instruction set determines what functions the microprocessor can perform with a single instruction. The instruction set in microprocessor 8085 can be classified into five functional categories:

  • 1. Data transfer (copy) operations
  • 2. Arithmetic operations
  • 3. Logical operations
  • 4. Branching operations and
  • 5. Machine-control operations.

Data Transfer (Copy) Operations

This group of instructions copies data from a location called as source to another location called as destination, without modifying the contents of the source. In true sense, these instructions are not the data transfer instructions but data copy instruction because the source is not modified. A data can be available at:

  • 1. Immediately available (Im)
  • 2. Available at some memory (M)
  • 3. Available in some register (R)
  • 4. Available at some IO (IO).

And a data can be required at:

  • 1. Some memory
  • 2. In some register
  • 3. At some IO.
Data AvailableData to transfer
ImR, M
RR, M
MR
IOA
AIO

Table I.1 Possible Data Transfer

A data cannot be transferred from a memory to another memory, from memory to an IO, from an IO to another IO, and from IO to memory. IO can communicate with accumulator only.

Arithmetic Operations

They perform arithmetic operations, such as, addition, subtraction, increment, and decrement.

Addition

Addition of any 8-bit number, or the contents of a register or the contents of a memory location is added to the contents of the accumulator and the sum is stored in the accumulator. No two other 8-bit registers can be added directly. For example the contents of register B cannot be added directly to the contents of the register C. 8085 can also perform 16-bit. It can also perform BCD addition.

Subtraction

Subtraction of any 8-bit number, or the contents of a register, or the contents of a memory location can be subtracted from the contents of the accumulator and the results stored in the accumulator. The subtraction is performed in 2’s compliment, and if the results is negative. Then they are expressed in 2’s complement. No two other registers can be subtracted directly. 8085 do not perform 16-bit subtraction.

Increment or Decrement

The 8-bit contents of any register or a memory location can be incremented or decrement by 1. Similarly, the 16-bit contents of a register pair can be incremented or decrement by 1. These increment and decrement operations can be performed directly in the source itself. It means without using accumulator.

Logical Operations

These type instructions performs various logical operations with the contents of the accumulator. 8085 can perform six logical operation which are:

  • AND
  • OR
  • Exclusive-OR
  • NOT
  • Compare
  • Rotate

A 8-bit number can be logically ANDed with the contents of the accumulator. It can also be a content of register or of a memory location. The results are stored in the accumulator. The content of the accumulator can be complimented.

Rotate: Each bit of the accumulator can be shifted either left or right to the next position.

Compare: Any 8-bit number or the content of a register, or content of a memory location can be compared for equality, greater than, or less than, with the contents of the accumulator. The result is reflected by zero and carry flags.

Branching Operations

This group of instruction transfers the control of microprocessor from one location to another location. 8085 can perform four types of branching operations. These are:

  • JMP-Jump within a program.
  • CALL-Jump from main program to sub-routine.
  • RET-Jump from sub-routine to main program.
  • RST-Jump from main program to instruction sub routine.

Jump

Conditional jumps are the important aspect of the decision-making process in the programming of a microprocessor. These instructions tests for a certain conditions and alter the program sequence when the condition is met. For example zero or carry flag, In addition, the instruction set also includes an instruction called unconditional jump.

Call, return, and restart

These type of instructions changes the sequence of a program either by calling a sub-routine or returning from a sub-routine. The conditional call and return instructions can also test the condition flags.

Machine-control Operations

These type of instructions controls the machine functions, such as halt, interrupt, or do nothing.

Read also: 8085 Microprocessor Architecture, 8085 Pin Diagram

LEAVE A REPLY

Please enter your comment!
Please enter your name here