An Instruction is a command given to the computer to perform a specified operation on given data. The instruction set of a microprocessor is the collection of the instructions that the microprocessor is designed to execute. The instructions described here are of Intel 8085. These instructions are of Intel Corporation. They cannot be used by other microprocessor manufactures. The programmer can write a program in assembly language using these instructions. These instructions have been classified into the following groups:

Data Transfer Group

Arithmetic Group

Logical Group

Branch Control Group

I/O and Machine Control Group

Data Transfer Group

Instructions, which are used to transfer data from one register to another register, from memory to register or register to memory, come under this group. Examples are: MOV, MVI, LXI, LDA, STA etc. When an instruction of data transfer group is executed, data is transferred from the source to the destination without altering the contents of the source. For example, when MOV A, B is executed the content of the register B is copied into the register A, and the content of register B remains unaltered. Similarly, when LDA 2500 is executed the content of the memory location 2500 is loaded into the accumulator. But the content of the memory location 2500 remains unaltered.

Arithmetic Group

The instructions of this group perform arithmetic operations such as addition, subtraction; increment or decrement of the content of a register or memory. Examples are: ADD, SUB, INR, DAD etc.

The instruction DAA is used in the program after ADD, ADI, ACI, ADC, etc instructions. After the execution of ADD, ADC, etc instructions the result is in hexadecimal and it is placed in the accumulator. The DAA instruction operates on this result and gives the final result in the decimal system. It uses carry and auxiliary carry for decimal adjustment. 6 is added to 4 LSBs of the content of the accumulator if their value lies in between A and F or the AC flag is set to 1. Similarly, 6 is also added to 4 MSBs of the content of the accumulator if their value lies in between A and F or the CS flag is set to 1. All status flags are affected. When DAA is used data should be in decimal numbers.

Logical Group

ANA r. (AND register with accumulator) [A] <-- [A] ^ [r].

ANA M. (AND memory with accumulator). [A] <-- [A] ^ [[H-L]].

ANI data. (AND immediate data with accumulator) [A] <-- [A] ^ data.

ORA r. (OR register with accumulator) [A] <-- [A] v [r].

ORA M. (OR memory with accumulator) [A] <-- [A] v [[H-L]]

ORI data. (OR immediate data with accumulator) [A] <-- [A] v data.

XRA r. (EXCLUSIVE – OR register with accumulator) [A] <-- [A] v [r]

XRA M. (EXCLUSIVE-OR memory with accumulator) [A] <-- [A] v [[H-L]]

XRI data. (EXCLUSIVE-OR immediate data with accumulator) [A] <-- [A]

CMA. (Complement the accumulator) [A] <-- [A]

CMC. (Complement the carry status) [CS] <-- [CS]

STC. (Set carry status) [CS] <-- 1.

CMP r. (Compare register with accumulator) [A] – [r]

CMP M. (Compare memory with accumulator) [A] – [[H-L]]

CPI data. (Compare immediate data with accumulator) [A] – data.

The 2nd byte of the instruction is data, and it is subtracted from the content of the accumulator. The status flags are set according to the result of subtraction. But the result is discarded. The content of the accumulator remains unchanged.

Branch Group

Conditional Jump addr (label): After the execution of the conditional jump instruction the program jumps to the instruction specified by the address (label) if the specified condition is fulfilled. The program proceeds further in the normal sequence if the specified condition is not fulfilled. If the condition is true and program jumps to the specified label, the execution of a conditional jump takes 3 machine cycles: 10 states. If condition is not true, only 2 machine cycles; 7 states are required for the execution of the instruction.

CALL instruction is used to call a subroutine. Before the control is transferred to the subroutine, the address of the next instruction of the main program is saved in the stack. The content of the stack pointer is decremented by two to indicate the new stack top. Then the program jumps to subroutine starting at address specified by the label.

RET (Return from subroutine)

RST n (Restart) Restart is a one-word CALL instruction. The content of the program counter is saved in the stack. The program jumps to the instruction starting at restart location.

Stack, I/O and Machine Control Group

IN port-address. (Input to accumulator from I/O port) [A] <-- [Port]

OUT port-address (Output from accumulator to I/O port) [Port] <-- [A]

PUSH rp (Push the content of register pair to stack)

PUSH PSW (PUSH Processor Status Word)

POP rp (Pop the content of register pair, which was saved, from the stack)