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

Ror-logical instruction-microprocessor, ROR : Rotate Right without Carry: ...

ROR : Rotate Right without Carry: This instruction rotates the contents of destination operand to the bit-wise right either by one or by the count specified in register CL, exclud

Rcr-rcl-logic instruction-microprocessor, RCR: Rotate Right through Carry:...

RCR: Rotate Right through Carry:- This instruction rotates the contents  bit-wise of the destination operand right by the specified count through carry flag (CF). For each operati

Addressing modes for sequential control-microprocessor, The addressing mode...

The addressing modes for the sequential control transfer instructions are described below:   1. Immediate: Immediate data is a part of instruction,in this type of addressin

Pc bus and interrupt system-microprocessor, PC Bus and Interrupt System ...

PC Bus and Interrupt System The PC Bus utilized a bus controller, address latches, and data transceivers (bidirectional data buffers). 1) Bus controller : ( Intel 8288 Bus

Overview of intel pro-pentium, Overview of Intel Pro-Pentium : The 2 c...

Overview of Intel Pro-Pentium : The 2 chief players in the PC CPU market are Motorola and Intel.  Intel has enjoyed incredible success with its processors since the early 1980

Copy a string backwards, I can get it to copy the string but can''t get it ...

I can get it to copy the string but can''t get it to reverse it.

External system bus architecture-microprocessor, External System Bus Archit...

External System Bus Architecture : This is a 16 bit processor with 40 pins. It has twenty address pins and out of which sixteen are utilized as data pins. This concept of by us

Cache components-microprocessor, Cache components The cache sub-system ...

Cache components The cache sub-system may be divided into 3 functional blocks: Tag RAM, SRAM and theCache Controller. In real designs, these blocks can be implemented  by multi

MIPS Assembly, Need help with 2 homework assignments

Need help with 2 homework assignments

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