Question: Consider the following program, this program has two functions, the main function and one subroutine function called multiplication. Write an equivalent program, using the MARIE

 Consider the following program, this program has two functions, the main

Consider the following program, this program has two functions, the main function and one subroutine function called multiplication. Write an equivalent program, using the MARIE assembly language. void main () { int product1, product2: Product 1 = multiplication (3, 5): Print_int(proudct1): product2 = multiplication (-4, -6): Print_int(proudct2): } int multiplication (int x, int y) { int i, tempprod = 0, num = y: if (y 0) tempprod = tempprod + x: else tempprod = tempprod - x: } return tempprod: }

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!