100% found this document useful (2 votes)
2K views2 pages

Addition Using 8085: Ex - No: 16-Bit Date: Aim

The document describes an assembly language program that adds two 16-bit numbers using an 8085 microprocessor. The program loads the two 16-bit numbers from memory locations, adds them together, stores the result and any carry back to memory. It provides the algorithm, flowchart and sample assembly language program to perform 16-bit addition on the 8085 microprocessor.

Uploaded by

Raja Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
2K views2 pages

Addition Using 8085: Ex - No: 16-Bit Date: Aim

The document describes an assembly language program that adds two 16-bit numbers using an 8085 microprocessor. The program loads the two 16-bit numbers from memory locations, adds them together, stores the result and any carry back to memory. It provides the algorithm, flowchart and sample assembly language program to perform 16-bit addition on the 8085 microprocessor.

Uploaded by

Raja Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

EX.

NO: 16-BIT ADDITION USING 8085


DATE:

AIM:
To learn to write an assembly language program for adding two sixteen bit numbers.

APPARATUS REQUIRED:
 8085 Microprocessor kit,
 Power supply

ALGORITHM:
 Start the program.
 Enter the 1st input in one memory location.
 Enter another input in other memory location.
 Add two inputs.
 Store the result and carry in different memory locations.
 Stop the program.

FLOWCHART:
START

Get the 1stnumber

Get the2ndnumber

Add two number

Is
carry=1

Store the carry

Store the result

STOP
PROGRAM

ADDRESS OPCODE LABEL MNEMONICS COMMENTS


;Load the HL register in
LHLD 4200 H
4100 2A,00.42 ;4200
4103 EB XCHG ;Exchange the contents
4104 2A,02,42 LHLD4202 H ;load the register in4202
4107 AF XRA A
4108 19 DAD D ;Add D with register
;Store the HL register
JNC L1
4109 D2,0D,41 in4204
;Increment the
INR A
410C 3C ;accumulator
;Store the HL register pair
L1 SHLD 4204 H ;location 4204 in the
410D 22,04,42 ;memory
;Store the accumulator
STA 4206 H ;location 4206 in the
4110 32,06,42 ;memory
4113 76 HLT ;Stop the execution

MANUAL CALCULATION:

DATA 1= 1C 15 H
DATA 2 =5A B7 H (+)

SUM = 76 CC H
ADDRESS DATA

Input
4200 15 H (LSB OF DATA 1)
4201 1C H (MSB OF DATA 1)
4202 B7 H (LSB OF DATA 2)
4203 5A H (MSB OF DATA 2)
Output
4204 CC H (LSB OF SUM)
4205 76 H (MSB OF SUM)

Result

Addition of two 16-bit numbers using 8085 is performed and the output is verified.

You might also like