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

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.

Posted Date: 10/12/2012 8:08:22 AM | Location : United States







Related Discussions:- Program to perform one byte bcd addition-assembly program, Assignment Help, Ask Question on Program to perform one byte bcd addition-assembly program, Get Answer, Expert's Help, Program to perform one byte bcd addition-assembly program Discussions

Write discussion on Program to perform one byte bcd addition-assembly program
Your posts are moderated
Related Questions
what is double hashing

Interrupt Priority Management The interrupt priority management logic indicated in given figure can be implemented in several ways. It does not required to be present in system

Trying to convert small programs from C to 8086 assembly language using emu 8086 emulator. I converted to low level C, but struggling with converting to the Assembly language.

Part A: Bitwise Logical and Shift Operations Create a SPARC assembly language program that extracts a bit-field from the contents of register %l0. The position of the rightmos

Programming with an assembler The procedure of hand-coding 8086 programs is somewhat tiresome; hence generally a programmer may find it hard to get a correct listing of the mac

LDS/LES Instruction execution :  LAHF : Load AH from Lower Byte of Flag: - This instruction loads the AH register with the lower byte of the flag register. This instruction ca

Compute the Fibonacci sequence - assembly program: Problem: Fibonacci   In this problem you will write a program that will compute the first 20 numbers in the Fibonacci sequ

#write a program 8086 to find the largest number

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

MyLocation SDWORD 14 TheTest        SDWORD 8     mov    eax,MyLocation     mov    ebx,TheTest     neg     eax,ebx     sub     eax,ebx Show exactly what lives in eax after executi