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. OpcodeOperandInstruction 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 OperandCommentMOV 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. RegistersCodeB0 0 0C0 0 1D0 1 0E0 1 1H1 0 0L1 0 1M (Memory)1 1 0A1 1 1 Register PairsCodesBC0 0DE0 1HL1 0AF 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 InstructionD7D6D5D4D3D2D1D0MOV Rd, Rs01DDDSSSMVI R, data (8 bit)00DDD110LXI Rp, data (8 bit)00DD0001ANA 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, BOperation Code0 1 D D D S S SRegister Code 1 1 1 0 0 0Opcode0 1 1 1 1 0 0 0 Example 2 InstructionMVI A data (8 bit)Operation Code0 0 D D D 1 1 0Register Code 1 1 1Opcode0 0 1 1 1 1 1 0 => 3EH Example 3 InstructionLXI B, data (16 bit)Operation Code0 0 D D 0 0 0 1Register Code 0 0Opcode0 0 0 0 0 0 0 1 => 01H Example 4 InstructionANA BOperation Code1 0 1 0 0 S S SRegister Code 0 0 0Opcode1 0 1 0 0 0 0 0 => A0H engineering subjects Microprocessor microprocessor