Skip to content
The Computer Science
TheCScience
  • Engineering Subjects
    • Human Values
    • Computer System Architecture
    • Digital Communication
    • Internet of Things
  • NCERT Solutions
    • Class 12
    • Class 11
  • HackerRank solutions
    • HackerRank Algorithms Problems Solutions
    • HackerRank C solutions
    • HackerRank C++ problems solutions
    • HackerRank Java problems solutions
    • HackerRank Python problems solutions
The Computer Science
TheCScience

8085 Assembly Language Programming

YASH PAL, March 17, 2026March 17, 2026

8085 Assembly Language Programming – A user can interact with the microprocessor through the assembly language instructions. These instructions are the commands to the microprocessor to be executed in the given sequence to complete the given task. The assembly language instructions are also called mnemonics.

In 8085 Assembly language programming, we need to define two formats: instruction format and Opcode format. Let’s look at both formats in detail and how they work in Assembly language.

Instruction Format

Each instruction of the 8085 microprocessor has two specific information fields. One is the operation code (op code), which specifies the operation to be performed. The operation is specified by binary code, hence the name is operation code. Second is the operand, which says about the data on which task is to be performed. This is shown in the figure below.

OpcodeOperand
Instruction Format

The first field of the instruction is always the opcode. Still, the second field may be a source/destination operand, or a source/destination operand address, or next instruction address opcode and operand collectively construct a mnemonic (instruction), the length of which can be one, two, or three bytes.

MnemonicOpcodeOperandType of OperandComment
MOV A, BMOVA, BSource/destination operandCopy data from the source register B to the destination register A.
ADD MADDMSource operand addressAdd the contents of the memory location to the contents of the accumulator.
INR MINRMDestination operand addressIncrement the contents of memory location.
JMP 5000HJMP5000HNext instruction addressChange the program sequence to the location 5000H.

Opcode Format

For an assembly language program, an opcode is an operation code which is represented by an English-like word. The opcode is unique for each instruction and contains the information about the operation, the register to be used, the memory to be used, etc. The 8085 microprocessor has an 8-bit opcode and identifies all operations, registers, and flags with this specific code. All internal registers are identified as given in the table below.

RegistersCode
B0 0 0
C0 0 1
D0 1 0
E0 1 1
H1 0 0
L1 0 1
M (Memory)1 1 0
A1 1 1
Register PairsCodes
BC0 0
DE0 1
HL1 0
AF or SP1 1

Similarly, there are different codes for each operation. Some of the operation codes are given in the table below.

Operation code = D7 – D0

InstructionD7D6D5D4D3D2D1D0
MOV Rd, Rs01DDDSSS
MVI R, data (8 bit)00DDD110
LXI Rp, data (8 bit)00DD0001
ANA R10100SSS

Here, R is any 8-bit register, Rd is the destination register, Rs is the source register, and Rp is the register pair. DDD defines the code for the destination register, SSS defines the source register, and DD defines the register pair.

Let’s take some examples to understand assembly language programming instructions in the 8085 microprocessor.

Example 1

InstructionMOV A, B
Operation Code0 1 D D D S S S
Register Code 1 1 1 0 0 0
Opcode0 1 1 1 1 0 0 0

Example 2

InstructionMVI A data (8 bit)
Operation Code0 0 D D D 1 1 0
Register Code 1 1 1
Opcode0 0 1 1 1 1 1 0 => 3EH

Example 3

InstructionLXI B, data (16 bit)
Operation Code0 0 D D 0 0 0 1
Register Code 0 0
Opcode0 0 0 0 0 0 0 1 => 01H

Example 4

InstructionANA B
Operation Code1 0 1 0 0 S S S
Register Code 0 0 0
Opcode1 0 1 0 0 0 0 0 => A0H
engineering subjects Microprocessor microprocessor

Post navigation

Previous post
Next post

TheCScience

We at TheCScience.com are working towards the goal to give free education to every person by publishing in dept article about Secondary, Senior-Secondary, and Graduation level subjects.

Pages

About US

Contact US

Privacy Policy

DMCA

Our Tools

Hosting - get 20% off

Engineering Subjects

Internet of Things

Human Values

Digital Communication

Computer System Architecture

Programming Tutorials

Data Structure and Algorithm

C

Java

NCERT

Class 12th

©2026 TheCScience | WordPress Theme by SuperbThemes