Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

SHEAHJAD

00413307318

EXPERIMENT – 5

AIM : Write a program to add two 16-bit numbers using 8085


microprocessor.
APPARATUS ; 8085 simulator IDE software.
PROGRAM :
Address Mnemonics Operands Comments
0000 MVI C 00H Move 0 in c register.
0002 LHLD 1000H Load content of 1000H
in HL pair.
0005 XCHG Exchange HL pair with
DE pair.
0006 LHLD 1002H Load content of 1002H
in HL pair.
0009 DAD D Add register pair DE to
HL pair.
000A JNC 000EH If there is no carry then
jump to location
000EH.
000D INR C If there is carry
increment C to A.
000E SHLD 1005H Save the contents of HL
pair to 1005H location.
0011 MOV A,C Move contents of C to
A.
0012 STA 1008H Store contents of
accumulator to 1008H
location.
0015 HLT End of program.

PROCEDURE :
1. Go to the Tools and select the Assembler.
2. Write a valid code in Assemble window.
3. Go to the Tools and select Assemble & load in Assembler window or F8.
4. Check if any error and fix.
5. After this, go to 8085 Simulator IDE and open Simulation then start or F1.
6. Open Memory Editor from Tools option to see output as addresses.
SHEAHJAD
00413307318

FLOWCHART :

START

Move 0 in C register.

Load the content of 1000H to HL pair.

Exchange contents of HL pair with DE


pair.

Load contents of 1002H to HL pair.

Add HL pair to DE pair.

Store the contents of HL pair to 1005H.

If there is carry move contents of carry


to 1008H location.

STOP
SHEAHJAD
00413307318

RESULT :
SHEAHJAD
00413307318

You might also like