0% found this document useful (0 votes)
39 views4 pages

8085 Program for Adding 16-Bit Numbers

This document summarizes an experiment to add two 16-bit numbers using an 8085 microprocessor. It includes the aim, apparatus, program, procedure, flowchart, and result. The program loads the first number from memory location 1000H into register pair HL, loads the second number from 1002H into DE, adds HL and DE while tracking carry in register C, and stores the output to 1005H with the carry value to 1008H. The procedure involves writing the code in an assembler, assembling and loading it, then running the simulation to view the output in memory.

Uploaded by

Shahjad Ansari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views4 pages

8085 Program for Adding 16-Bit Numbers

This document summarizes an experiment to add two 16-bit numbers using an 8085 microprocessor. It includes the aim, apparatus, program, procedure, flowchart, and result. The program loads the first number from memory location 1000H into register pair HL, loads the second number from 1002H into DE, adds HL and DE while tracking carry in register C, and stores the output to 1005H with the carry value to 1008H. The procedure involves writing the code in an assembler, assembling and loading it, then running the simulation to view the output in memory.

Uploaded by

Shahjad Ansari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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