Add Two 16 Bit BCD Numbers - Add Two 16 Bit BCD Numbers Code

Add Two 16 Bit BCD Numbers Code

Posted on

Add two 16 bit BCD numbers

Add Two 16 Bit BCD Numbers - Add Two 16 Bit BCD Numbers Code

Objective

In this post we will assembly language code for Add Two 16 Bit BCD Numbers Code which we will be running using TASM on windows. So First we are going to initialize memory for storing two numbers which will be loaded into AX and BX registers respectively. 

Add Two 16 Bit BCD Numbers Algorithm

Step I        :   Initialize the data memory.

Step II       :   Load the first number into AX register.

Step III      :   Load the second number into BX register.

Step IV      :   Add two lower digits.

Step V       :   Adjust result to valid BCD number.

Step VI      :   Store the result in BL.

Step VII     :   Add the two upper digits with carry.

Step VIII    :   Adjust result to valid BCD number.

Step IX      :   Store the result in BH.

Step X       :   Display the result.

Step XI      :   Stop.

16 Bit BCD Numbers Program

 

 

Find more assembly language codes here.

Source projectgeek.com