Program to perform one byte bcd addition-assembly program, Assembly Language

Assignment Help:

Program : Write a program to perform a one byte BCD addition.

Solution :

It is consider that the operands are in BCD form, but the CPU considers it as hexadecimal and accordingly performs addition operation. Assume the following example for addition. Carry is set to be 0.

1141_program7.jpg

Actual result after addition considering hex operand

2453_program8.jpg

407_program9.jpg

In this program, the DAA instruction is used after ADD. In similar manner, DAS can be used after instruction SUB.


Related Discussions:- Program to perform one byte bcd addition-assembly program

Flag manipulation and processor control instructions , Flag Manipulation an...

Flag Manipulation and Processor Control Instructions These instructions control the functioning of available hardware inside the processor chip. These are categorized into thes

Assembly language, how to find out the given number is positive or negative...

how to find out the given number is positive or negative?

Matrix addition, how to write the alp for matrix addition in microprocessor...

how to write the alp for matrix addition in microprocessor 8086?

Mlil-arithmetic instruction-microprocessor, MLIL: Unsigned Multiplication ...

MLIL: Unsigned Multiplication Byte or Word: This instruction multiplies an unsigned byte or word by the contents of the AL. The unsigned byte or word can be in any one of the gene

Basic microprocessor architecture and interface, Basic Microprocessor Archi...

Basic Microprocessor Architecture and Interface : Introduction: Intel launches its first 4-bit microprocessor 4004 in the year 1971 and 8-bit microprocessor 8008 in the y

Selecting array elements, implement the following c++ code in assembly lang...

implement the following c++ code in assembly language using the block-structured .IF and .while directives

I want to make a calculator, 64-bit integer calculator, which processes usi...

64-bit integer calculator, which processes using 16-bits at a time (reg/mem16 operands)

Counting Array Values(Programming exercises), Write an application that doe...

Write an application that does the following:(1) fill an array with 50 random integers; (2) loop through the array, displaying each value, and count the number of negative values;

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd