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

Addition of Two BCD Numbers

This document describes an assembly language program that adds two Binary Coded Decimal (BCD) numbers. The program loads the two BCD numbers into registers AL and B, adds them together using the DAA instruction, and stores the sum in register R and the carry in R+1. The goal is to write an assembly language program to perform BCD addition.

Uploaded by

api-26685949
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
866 views

Addition of Two BCD Numbers

This document describes an assembly language program that adds two Binary Coded Decimal (BCD) numbers. The program loads the two BCD numbers into registers AL and B, adds them together using the DAA instruction, and stores the sum in register R and the carry in R+1. The goal is to write an assembly language program to perform BCD addition.

Uploaded by

api-26685949
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Adam’s Engineering College, Paloncha

ECE Department –MPI LAB

Experiment No.: 7 Year : III/IV B.Tech II Semester


Page 1 of 1

ADDITION OF TWO BCD NUMBERS

Aim: - To write an assembly language program for


addition of two BCD numbers.

Registers: - AL

Description: - Two BCD numbers are added and the


result is stored in SUM and CARRY is stored in SUM+2.

Ports:- None.

DATA SEGMENT
A DB ?
B DB ?
R DW 1 DUP(0)
DATA ENDS

CODE SEGMENT
ASSUME CS: CODE, DS: DATA

START:
MOV AL,A
ADD AL, B
DAA
MOV R, AL
MOV AL,00
ADC AL,00
MOV R+1,AL

CODE ENDS
END START

Result: Addition of two BCD numbers is obtained.

Lab in-charge HOD, ECE

You might also like