8086 program to add two 8 bit BCD numbers


In this program we will see how to add two 8-bit BCD numbers.

Problem Statement

Write 8086 Assembly language program to add two 8-bit BCD number stored in memory address offset 600.

Discussion

This task is too simple. Here we are taking the numbers from memory and after adding we need to put DAA instruction to adjust the accumulator content to decimal form. The DAA will check the AC and CY flags to adjust a number to its decimal form.

Input

Address
Data


500
99
501
25


 

Flow Diagram

 

Program

 

Output

Address
Data


600
25
601
01


 

Updated on: 30-Jul-2019

4K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements