Question: Using the code in Section 7.7.1, write a procedure named AddPacked that adds two packed dec imal integers of arbitrary size (both must be the

Using the code in Section 7.7.1, write a procedure named AddPacked that adds two packed dec imal integers of arbitrary size (both must be the same). Write a test program that passes AddPacked several pairs of integers: 4-byte, 8-byte, and 16-byte. Display the sums in hexadeci mal. Use the following registers to pass information: ESI - pointer to the first number EDI - pointer to the second number EDX - pointer to the sum ECX - number of bytes to add (A VideoNote for this exercise is posted on the Web site.)

7.7.1 DAA Instruction The DAA (decimal adjust after addition) instruction converts a binary sum produced by ADD or ADC in AL to packed decimal format. For example, the following instructions add packed deci- mals 35 and 48. The binary sum (7Dh) is adjusted to 83h, the packed decimal sum of 35 and 48.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!