Classification of Instruction Set of 8085:
Programming Model of 8085 – The programming model assists you in the programming process. The programming model shows only those parts of the microprocessor which the programmer can change. So we can say that block diagram makes it easier to understand the architecture of a microprocessor and the programming model makes it easier to understand working of microprocessor in a programming environment of the Classification of Instruction Set of 8085.
Fig. 2.1 gives the programming model of 8085.
The Classification of Instruction Set of 8085 can be categorised into five different groups based on the nature of function of the instructions.
- Data transfer operations
- Arithmetic operations.
- Logical operations
- Branch operations and
- Stack, Input/Output and Machine control operations
1.Data Transfer Operations:
The data transfer instructions load given data into register, copy data from register to register, copy data from register to memory location, and vice versa. In other words we can say that data transfer instructions copy data from source to destination. Source can be data or contents of register or contents of memory location whereas destination can be register or memory location. These instructions do not affect the flag register of the processor.
2.Arithmetic Operations:
The arithmetic instructions provided by Classification of Instruction Set of 8085 perform addition, subtraction, increment and decrement operations.
- Addition : Any 8-bit number, or the contents of a register, or the contents of a memory location can be added to the contents of the accumulator and the resulted sum is stored in the accumulator. The resulted carry bit is stored in the carry flag. In 8085, no two other registers can be added directly, i.e. the contents of B and C registers cannot be added directly. To add two 16-bit numbers the 8085 provides DAD instruction. It adds the data within the register pair to the contents of the HL register pair and resulted sum is stored in the HL register pair.
- Subtraction : 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 result is stored in the accumulator. The resulted borrow bit is stored in the carry flag: In the Classification of Instruction Set of 8085, no two other registers can be added directly.
- Increment/Decrement : The 8085 has the increment and decrement instructions to increment and decrement the contents of any register, memory location or register pair by 1.
3.Logical Operations:
The logical instructions provided by 8085 perform logical, rotate, compare and complement operations.
- Logical : Using logical instructions, any 8-bit number, or the contents of a register, or of a memory location can be logically ANDed, ORed, or Exclusive-ORed with the contents of the accumulator and the result is stored in the accumulator. The result also affects the flags according to definition of For example, the zero result sets the zero flag.
- Rotate : These instructions allow shifting of each bit in the accumulator either left or right by 1 bit position.
- Compare : Any 8-bit number, or the contents of a register, or the contents of a memory location can be compared for equality, greater than, or less than, with the contents of the accumulator.
- Complement : The result of accumulator can be complemented with this It replaces all 0s by 1s and all 1s by 0s.
4.Branching Operations:
These instructions allow the 8085 to change the sequence of the program, either unconditionally or under certain test conditions. These instructions include branch instructions, subroutine call and return instructions and restart instructions.
5.Stack, Input/Output and Machine Control Operations:
These instructions control the stack operations, input/output operations and machine operations. The stack instructions allow the transfer of data from register pair to stack memory and from stack memory to the register, pair. The input/output instruction allows the transfer of 8-bit data to input/output port. On the other hand machine instructions control the Machine operations such as interrupt, halt, or do nothing.