Sei sulla pagina 1di 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

Potrebbero piacerti anche