Instruction Set of 8085 Microprocessor & Its Classification

The first commercially successful microprocessor is the 8085 microprocessor by Intel. This microprocessor was mainly developed to eliminate the drawbacks of 8080 architecture. 8085 microprocessor is an 8-bit microprocessor because at a time it works on 8-bits and the technology used to design this processor is N-MOS technology. As compared to other microprocessors, this microprocessor is very popular because it has some unique characteristics like it is an 8-bit device, designed with a single NMOS IC including 6200 transistors. In this processor, a total of 80 instructions and246 operational codes are present. It includes an internal CLK generator and works on a CLK cycle including 50% duty cycle.  This article discusses an overview of the instruction set of 8085 microprocessor, types with examples.

What is Instruction Set in 8085 Microprocessor?

A binary command that is used to perform a function in the microprocessor over provided data is known as instruction. A set of instructions is known as an instruction set that decides the microprocessor function. Every instruction includes two parts like Opcode & the Operand where Opcode is used to specify the function to be executed & operand gives the data to be functioned on.

8085 Microprocessor
8085 Microprocessor

Classification of Instruction Set of 8085

The instruction set of 8085 microprocessor is classified into five types which include the following.

Classification of Instruction Set of 8085 Microprocessor
Classification of Instruction Set of 8085 Microprocessor
  • Data Transfer Instruction
  • Arithmetic Instruction
  • Logical Instruction
  • Branching Instruction
  • Control Instruction

Data Transfer Instruction

An instruction that is used to transfer the data from one register to another is known as data transfer instruction. So, the data transfer can be done from source to destination without changing the source contents. Data transfer mainly occurs from one register to another register, from memory location to register, register to memory, and between an I/O device & accumulator. Following are the list of Data Transfer Instruction

Mov r, M

This data transfer instruction is used to transfer data present within the memory (M) to the register (r). But, the memory location address must be there within the HL register.

Example: MOV r, 1020H

Mov M, Data

This type of instruction specifies the data transfer immediately to a location of memory. This memory location address can be specified at the H-L registers.

Example: MOV M, 28H

MVI r, Data (Move Immediate)

In this type of instruction, the transmission of data can be done immediately toward the particular register.

Example: MVI r, 32H

Instruction Op-
code
Opr Bytes Machine-
cycles
T-
states
Detail
MVI MVI Reg., Data
Mem., Data
2
2
2
3
7
10
Move immediate 8 bit

LDA address (Load Accumulator)

LDA is a load accumulator instruction that is mainly used for copying the data available in the address of memory indicated as the instruction’s operand to the accumulator. Particularly, in this case, the available data in the 16-bit address memory is transferred toward the accumulator.

Example: LDA 500H

Instruction Op-
code
Opr Bytes Machine-
cycles
Hex Code T-
states
Detail
LDA LDA 16-bit address 3 4 3A 13 Load accumulator direct

LDAX (LoaD Accumulator by eXtended Register Pair)

It is a load accumulator from an address in the register pair. In this type of data transfer instruction, the register holds the address of the data that needs to be loaded to the accumulator.

Example: LDAX C/D

Instruction Op-
code
Opr Bytes Machine-
cycles
Hex code T-
states
Detail
LDAX LDAX B/D reg. Pair 1 2 1A 7 Load accumulator indirect

LHLD (Load H & L Registers Direct)

LHLD instruction is a direct load instruction, where it loads the H-L register with the data from the memory. In this type of instruction, the data which is available in the address specified is copied to the L register first and then the available data within the next memory location will be loaded in the H register.

Example: LHLD 2500H

Instruction Op-
code
Opr Bytes Machine-
cycles
Hex Code T-
states
Detail
LHLD LHLD 16 bit address 3 5

2A

16 Load H and L registers direct

STA Address (Store Accumulator Contents in Memory)

STA stands for stored accumulator direct instruction. Once this instruction is accepted, then the available data within the accumulator can be transferred to the address of memory indicated within the operand.

Example: STA 2030H

Instruction Op-
code
Opr Bytes Machine-
cycles
Hex Code T-
states
Detail
STA STA 16 bit 3 4

32

13 Store Accumulator Direct

In the above example data stored in the accumulator will be stored to  memory location 2030. LSB followed by MSB will be stored in the memory location.

STAX Register (Store Accumulator by Extended Register)

It is a stored accumulator indirect instruction. In this instruction, the register is available as the operand that holds a memory address. Thus, the accumulator data can be copied to that specific memory location.

Example: STAX D

Instruction Op-
code
Opr Bytes Machine-
cycles
Hes Code T-
states
Detail
STAX STAX B/D reg. pair 1 2

12

7 Store Accumulator Indirect

XCHG (Exchange)

This type of data transfer instruction can be used to exchange the data available within two registers.

Example: XCHG H-L & D-E. In this, the contents of H & D and L & E are exchanged.

Instruction Op-
code
Opr  Bytes Machine-
cycles
Hex Code T-
states
Detail
XCHG XCHG None 1 1 EB 4 Exchange H and L with D and E

SPHL (Stack Pointer HL Register)

In this data transfer instruction, the data of H &L can be moved to the stack pointer.

Instruction Op-
code
Opr Bytes Machine-
cycles
Hex Code T-
states
Detail
SPHL SPHL None 1 1

F9

6 (in 8085),
5(in 8080)
Copy H and L registers to the Stack pointer(SP)

PCHL (Program Counter with HL Data)

Similar to SPHL instruction, this PCHL instruction simply copies the H-L register’s data into the SP by loading the high order bytes at H & low order bytes at L.

Instruction Op-
code
Opr Bytes Machine-
cycles
Hex Code T-
states
Detail
PCHL PCHL None 1 1 E9 6 Load program counter with HL contents

PUSH

In this type of instruction, the stack can be loaded with the available data within the register provided in the operand. Initially, the stack pointer gets decreased & high order bytes are copied to the stack. Further stack pointer gets decreased to load the low order register bytes.

Example: PUSH D

Instruction Op-
code
Opr Bytes Machine-
cycles
Hex Code T-
states
Detail
PUSH PUSH Reg. pair 1 3 D5 12 Push register pair into the stack

POP

This instruction indicates the data transfer from the top of the stack to the register provided as the operand.

Example: POP C

Instruction Op-
code
Opr Bytes Machine-
cycles
Hex Code T-
states
Detail
POP POP Reg. pair 1 3

D1

10 POP OFF Stack to register pair

OUT

In this type of data transfer instruction, the data available at the accumulator can be copied toward the I/O port. An 8-bit port address at the operand is present.

Example: OUT 36 H

Instruction Op-
code
Opr Bytes Machine-
cycles
Hex Code T-
states
Detail
OUT OUT 8-bit port address 2 3

D3

10 Output Data from Accumulator to a port with 8 bit address

IN

This type of instruction is used to load the data available at the I/O port to the accumulator. The operand simply holds the port address from where the data can be copied.

Example: IN, 6B H

Instruction Op-
code
Opr Bytes Machine-
cycles
Hex Code T-
states
Detail
IN IN 8-bit port address 2 3

DB

10 Input data to accumulator from a port with 8-bit address

Arithmetic Instruction of 8085

The arithmetic instructions perform different operations like addition, subtraction, increment & decrement on the data within memory & register in the 8085 microprocessor.

ADD r

This arithmetic instruction adds the data which is available in the register to the data available within the accumulator & the final result will be stored in the accumulator.

Example: ADD C

ADD M

This type of instruction is mainly used to add the date in the memory address data denoted at the operand to the data available at the accumulator. So the addition result will be stored within the accumulator.

Example: ADD 28H

ADI Data (Add Immediate)

In this instruction, the 8-bit data is specified as an operand is added immediately to the data available at the accumulator & the result is stored at the accumulator.

Example: ADI 24 H

Instruction

Leave A Reply

Your email address will not be published. Required fields are marked*