Question: Write this program in Assembly Language for x86 Processors. Extended Addition/Subtraction, Binary multiplication A = 9000 7080 5060 3040 1020h; B = 0090 0708 0506

Write this program in Assembly Language for x86 Processors.

Extended Addition/Subtraction, Binary multiplication

A = 9000 7080 5060 3040 1020h;

B = 0090 0708 0506 0304 0102h;

C = A + B; /* Extended Subtraction*/

C = A - B; /* Extended Addition */

C = A * 1001b; /* Bonus question: Binary multiplication */

Given the 10-byte integers stored as arrays of WORDs:

avar WORD 1020h,3040h,5060h,7080h,9000h

bvar WORD 0102h,0304h, 0506h,0708h,0090h

cvar WORD 5 DUP(?)

Create a procedure named Extended_AddW, Extended_SubW, and Binary_MulW, that

[40 points] Adds two 10-byte integers

[40 points] Subtracts two 10-byte integers

[35 points] Bonus question: Multiplies avar by 1001b. Use only shifting and addition

[15 points] You will get 15 points bonus if you correctly use stack to pass arguments to Extended_AddW, Extended_SubW, and Binary_MulW.

[20 points] Draw the memory table to indicate how each byte of avar and bvar is stored in the memory. Assume the offset of avar is 40001100h.

Submission Requirement:

.asm: Your program file needs to contain the main procedure that defines data and calls sub-procedures, and the definition of sub-procedures, Extended_AddW, Extended_SubW, and Binary_MulW

.pdf: Draw the memory table, specify the byte-by-byte storage of data, avar and bvar.

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!