0% found this document useful (0 votes)
167 views

Ex - No: Multi-Byte Addition in BCD Mode Date: Aim

The document describes an assembly language program that adds two 24-bit numbers in BCD mode using an 8085 microprocessor. The algorithm involves getting the first and second input numbers from memory locations, adding them together, storing the result and carry in other memory locations, and stopping the program. A flowchart shows the steps of starting, getting the inputs, adding them, checking for a carry, storing the carry if present, storing the result, and stopping. The program listing and manual calculation are provided to verify the output matches the sum of the sample input numbers.

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
0% found this document useful (0 votes)
167 views

Ex - No: Multi-Byte Addition in BCD Mode Date: Aim

The document describes an assembly language program that adds two 24-bit numbers in BCD mode using an 8085 microprocessor. The algorithm involves getting the first and second input numbers from memory locations, adding them together, storing the result and carry in other memory locations, and stopping the program. A flowchart shows the steps of starting, getting the inputs, adding them, checking for a carry, storing the carry if present, storing the result, and stopping. The program listing and manual calculation are provided to verify the output matches the sum of the sample input numbers.

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: MULTI-BYTE ADDITION IN BCD MODE


DATE:

AIM:
To learn to write an assembly language program for adding two 24 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


4100 AF XRA A Start the accumulator
4101 21,50,41 LXI H, 4150 Load the HL pair into 4150
Move the content of M in
MOV B,M
4104 46 B
Load the XL pair into
LXI D, 4160
4105 11 4160
4106 60
4107 41
4108 23 INX H ;Increment the HL pair
4109 1A L1 LDAX D Load the AX pair into D
410A 8E ADC M Add C with the register
410B 77 MOV M,A Move the A contents to M
410C 23 INX H Increment H
410D 13 INX D Increment D
410E 05 DCR B Decrement B register
410F C2 JN2 LOOP Jump on to L1
4110 09
4111 41
4112 76 HLT ;Stop the execution

MANUAL CALCULATION:

DATA 1= 50 A4 H 29
DATA 2 =28 37 H FB (+)

SUM = 78 DC H 24
ADDRESS DATA
Input
4150 03
4151 29
4152 A4
4153 50
4160 FB
4161 37
4162 28
Output
4151 24
4152 DCH
4153 78

Result

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy