Question: 2. (5 pts) Write a working Assembly macro code labeled 'add2' that is called from your main' routine and uses the register passing parameter technique.

 2. (5 pts) Write a working Assembly macro code labeled 'add2'

2. (5 pts) Write a working Assembly macro code labeled 'add2' that is called from your main' routine and uses the "register passing" parameter technique. Your 'main' routine should: a. pass two parameters (x,y) into the macro 1 of 3 b. store the macro resul into a memory location labeled 'sum:'. The macro 'add2' does the following: a. accepts two parameters "REG1 and REG2" b. Adds REG1 and REG 2 and stores the result in REG3 c. Returns to your 'main' routine. See Section B.6 begin macro fill in macro code here> .endmacro main: .org 2048 fill in main code used to call the macro and store the macro's results into memory here org OxOffe 256 x: : 128 sum: (0 en 2. (5 pts) Write a working Assembly macro code labeled 'add2' that is called from your main' routine and uses the "register passing" parameter technique. Your 'main' routine should: a. pass two parameters (x,y) into the macro 1 of 3 b. store the macro resul into a memory location labeled 'sum:'. The macro 'add2' does the following: a. accepts two parameters "REG1 and REG2" b. Adds REG1 and REG 2 and stores the result in REG3 c. Returns to your 'main' routine. See Section B.6 begin macro fill in macro code here> .endmacro main: .org 2048 fill in main code used to call the macro and store the macro's results into memory here org OxOffe 256 x: : 128 sum: (0 en

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!