Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

More Books

Students also viewed these Databases questions