Instruction Set of 8085 microprocessor

8085 microprocessor

An instruction is a binary pattern that is designed to perform a specific function inside a microprocessor. The group of all instructions are known as the instruction set of 8085 microprocessor. Every instruction is made up of two parts – (a) op-code(operation code) and (b) an operand. op-code specifies the operation or function of instruction whereas an operand provides the needed data for that function or operation.

8085 instructions can be classified into three groups according to their byte size:- (a) One-byte instruction – Contains the only opcode. (b) Two-byte instruction – Contains 8-bit op-code and 8-bit data. (c) Three-byte instruction – Contains 8-bit op-code and 16-bit data.

The instruction set of 8085 microprocessor can be categorized into four groups: 1. Data transfer Group. 2. Arithmetic Group. 3. Logical Group. 4. Branch Control Group

1. Data Transfer Instruction :

These instructions transfer data between register – register and memory – register but not between memory – memory. Examples:

a. MVI A05

  • Instruction Name: MVI
  • Instruction Type: 2 bytes
  • Addressing Mode: Immediate Addressing Mode
  • Function OR Work: Move immediate data into a register

b. MOV AB

  • Instruction Name: MOV
  • Instruction Type: 1 byte
  • Addressing Mode: Register Addressing Mode
  • Function OR Work: Data transmission between two registers A & B

c. LDA 2040

  • Instruction Name: LDA
  • Instruction Type: 3 bytes
  • Addressing Mode: Direct Addressing Mode
  • Function OR Work: Load accumulator directly from given memory address

d. STA 2040

  • Instruction Name: STA
  • Instruction Type: 3 bytes
  • Addressing Mode: Direct Addressing Mode
  • Function OR Work: Store the data of accumulator directly in given memory address

e. LXIH 2050

  • Instruction Name: LXIH
  • Instruction Type: 3 bytes
  • Addressing Mode: Immediate Addressing Mode
  • Function OR Work: Load the given register pair with immediate data

f. SHLD 4050

  • Instruction Name: SHLD
  • Instruction Type: 3 bytes
  • Addressing Mode: Direct Addressing Mode
  • Function OR Work: Store H&L pair directly in given memory address

g. SPHL

  • Instruction Name: SPHL
  • Instruction Type: 1 byte
  • Addressing Mode: Implicit Addressing Mode
  • Function OR Work: Move contact of H&L register pair to the stack pointer

h. XTHL

  • Instruction Name: XTHL
  • Instruction Type: 1 byte
  • Addressing Mode: Implicit Addressing Mode
  • Function OR Work: Exchange of top of stack with H&L register pair

i. PCHL

  • Instruction Name: PCHL
  • Instruction Type: 1 byte
  • Addressing Mode: Implicit Addressing Mode
  • Function OR Work: Move H&L register pair to the program counter

j. IN

  • Instruction Name: IN
  • Instruction Type: 2 bytes
  • Addressing Mode: Implicit Addressing Mode
  • Function OR Work: It is “Initiate Input Operation” and is used in peripheral mapped I/O and 8-bit address. Ex. IN05

k. OUT

  • Instruction Name: OUT
  • Instruction Type: 2 bytes
  • Addressing Mode: Implicit Addressing Mode
  • Function OR Work: It is “Initiate Output Operation” and is used in memory mapped I/O and 8-bit address. Ex. OUT02

l. PUSH H

  • Instruction Name: PUSH
  • Instruction Type: 1 byte
  • Addressing Mode: Indirect Addressing Mode
  • Function OR Work: Push 2 bytes of data onto the stack

m. POP B

  • Instruction Name: POP
  • Instruction Type: 1 byte
  • Addressing Mode: Indirect Addressing Mode
  • Function OR Work: Pop 2 bytes of data out of the stack

2. Arithmetic Instruction :

It adds, subtracts, increments, or decrements the data in registers or memory. Examples:

a. ADD B

  • Instruction Name: ADD
  • Instruction Type: 1 byte
  • Addressing Mode: Indirect Addressing Mode
  • Function OR Work: Adding to Accumulator means add accumulator data and given register data (B)

b. ADI 05

  • Instruction Name: ADI
  • Instruction Type: 2 bytes
  • Addressing Mode: Immediate Addressing Mode
  • Function OR Work: Add immediate data to the accumulator

c. ADC B

  • Instruction Name: ADC
  • Instruction Type: 1 byte
  • Addressing Mode: Indirect Addressing Mode
  • Function OR Work: Add B to accumulator using carry flag

d. SUB B

  • Instruction Name: SUB
  • Instruction Type: 1 byte
  • Addressing Mode: Indirect Addressing Mode
  • Function OR Work: Subtract B from accumulator

e. SBB C

  • Instruction Name: SBB
  • Instruction Type: 1 byte
  • Addressing Mode: Indirect Addressing Mode
  • Function OR Work: Subtract C from accumulator using borrow flag

f. SUI 05

  • Instruction Name: SUI
  • Instruction Type: 2 bytes
  • Addressing Mode: Immediate Addressing Mode
  • Function OR Work: Subtract immediate data from the accumulator

g. DAD B

  • Instruction Name: DAD
  • Instruction Type: 1 byte
  • Addressing Mode: Indirect Addressing Mode
  • Function OR Work: Add the content of the given register pair(B) to the H&L register pair. (It is double register add)

h. INR H

  • Instruction Name: INR
  • Instruction Type: 1 byte
  • Addressing Mode: Indirect Addressing Mode
  • Function OR Work: Increment specified byte by one

i. INX H

  • Instruction Name: INX
  • Instruction Type: 1 byte
  • Addressing Mode: Indirect Addressing Mode
  • Function OR Work: Increment register pair by one

3. Logical Group :

This group performs logical operations (logical AND, OR & Exclusive OR) on data in registers, memory and in condition flags in order to enable us to set specific bits in the accumulator i.e ON or OFF. Examples:

a. ANA B

  • Instruction Name: ANA
  • Instruction Type: 1 byte
  • Addressing Mode: Indirect Addressing Mode
  • Function OR Work: Performs logical AND with Accumulator

b. ANI 05

  • Instruction Name: ANI
  • Instruction Type: 2 bytes
  • Addressing Mode: Immediate Addressing Mode
  • Function OR Work: Performs Logical AND with Accumulator using immediate data

c. ORA H

  • Instruction Name: ORA
  • Instruction Type: 1 byte
  • Addressing Mode: Indirect Addressing Mode
  • Function OR Work: Performs logical OR with Accumulator

d. XRA A

  • Instruction Name: XRA
  • Instruction Type: 1 byte
  • Addressing Mode: Indirect Addressing Mode
  • Function OR Work: Performs logical Exclusive OR with Accumulator

e. CMP B

  • Instruction Name: CMP
  • Instruction Type: 1 byte
  • Addressing Mode: Indirect Addressing Mode
  • Function OR Work: Compose of 10 registers

f. RRC

  • Instruction Name: RRC
  • Instruction Type: 1 byte
  • Addressing Mode: Implicit Addressing Mode
  • Function OR Work: Rotate accumulator right without the help of carry

g. RAR

  • Instruction Name: RAR
  • Instruction Type: 1 byte
  • Addressing Mode: Implicit Addressing Mode
  • Function OR Work: Rotate accumulator right with the help of carry

h. RLC

  • Instruction Name: RLC
  • Instruction Type: 1 byte
  • Addressing Mode: Implicit Addressing Mode
  • Function OR Work: Rotate accumulator left without the help of carry

4. Branch Control Group :

This topic is explained in following image :

These are some of the instructions used in the 8085 microprocessor remaining instructions can be implemented with the help of these instructions.

1 Comment
  1. @Arpit Jain……Hope u will continue to shower your knowledge with us

Leave a reply

Edusera
Logo
Open chat
1
Scan the code
Hello!๐Ÿ‘‹
Can we help you?