Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please write three assembly subroutines to calculate the multiplication of different numbers. The first subroutine accepts two int arguments and returns an int value. The

please write three assembly subroutines to calculate the multiplication of different numbers. The first subroutine accepts two int arguments and returns an int value. The second subroutine is similar except that it returns a value of type long long, which is a 64-bit wide signed integer. The third subroutine accepts two arguments of type unsigned int and returns a value of type unsigned long long. The remaining C++ code is akin to what you saw in the first example. It initializes some test cases, calls the corresponding assembly language functions, and prints the results. You should run 5 tests and for each test report the number you get.

Test 1: Pass int a1 = 50 and int b1 = 25; as the input to subroutine 1.

Test 2: Pass int a2 = -300 and int b2 = 7 as the input to subroutine 1.

Test 3: Pass int a3 = 4000; int b3 = 1000000 as the input to subroutine 2

Test 4: Pass int a4 = 100000; int b4 = -20000000; as the input to subroutine 2.

Test 5: Pass unsigned int a5 = 0x80000000; unsigned int b5 = 0x80000000; as the input to subroutine 3.

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

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago