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.
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)
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
|Memory Location||OPCODE||Operand||Label||Hex Code|