Write a 8085 program to store the content if two successive memory location in DE register pair - ChromeTechny
Home » Write a 8085 program to store the content if two successive memory location in DE register pair
8085 Others Programming

Write a 8085 program to store the content if two successive memory location in DE register pair

wap-to-store-the-content-of-any-ml-in-any-register-using-immediate-addressing-mode

As you can see from the title, for this 8085 program we will use two successive memory location which means we will need two 8-bit data.

So, our first task will be store two 8-bit data in two successive memory location. And then we will use HL register pair to point to those successive memory locations in order to move the content of the memory location to DE register pair.

To make the program smaller we are going to use Immediate Addressing mode.

Input:

As already mentioned, we will use two successive memory location, in 8085 simulator kit, 2000H is considered the base memory location. Hence we will use 2000H and 2001H as two memory location.

In 2000H we will store ADH, and in 2001, we will store FEH.

(Remember, here H stands for hexadecimal, so don’t misinterpret as a data)

Program:

LXI H,2000H //first we will load the content of 2000H in H register

MOV D,M // Data from H register is moved to D register

INX H // we now increment the HL register pair to point at 2001H memory location

MOV E,M //content of 2001H memory location is moved to E register

HLT //finally we halt our program

 

Programming Details
Memory Location OPCODE Operand Label Hex Code
2002 LXI H, 2000H 21
2003 00H
2004 20H
2005 MOV D,M 56H
2006 INX H 23H
2007 MOV E,M 5EH
2008 HLT 76H

About the author

Ayan