Question: Write a subroutine exp in subroutine.s that takes two input values, raises the first value to the power of the second, and returns the result.

 Write a subroutine "exp" in "subroutine.s" that takes two input values,

raises the first value to the power of the second, and returns

Write a subroutine "exp" in "subroutine.s" that takes two input values, raises the first value to the power of the second, and returns the result. The inputs should be passed in RO and R1 while the result should be returned in RO. The section of code in "main.s" titled "exptest" will be used by the TA to verify your subroutine. The Green LED will turn on if the subroutine is correct or the Red LED will turn on if the subroutine is incorrect. Be sure your function follows the Procedure Call Standard or else you might crunch some of the registers needed by "exptest AREA 1.texti. CODE, READONLY, ALIGN=2 THUMB export exp EXPORT mulsum4 IMPORT green_led_on IMPORT red led on IMPORT leds_off Be sure to export created functions Should take the value in RO and multiply it by itself R1 times (.e. zaises RO to the power of RI) Should return the result in RO Inputs: RO and Rl Outputs: RO exp Your code here BX LR Write a subroutine "exp" in "subroutine.s" that takes two input values, raises the first value to the power of the second, and returns the result. The inputs should be passed in RO and R1 while the result should be returned in RO. The section of code in "main.s" titled "exptest" will be used by the TA to verify your subroutine. The Green LED will turn on if the subroutine is correct or the Red LED will turn on if the subroutine is incorrect. Be sure your function follows the Procedure Call Standard or else you might crunch some of the registers needed by "exptest AREA 1.texti. CODE, READONLY, ALIGN=2 THUMB export exp EXPORT mulsum4 IMPORT green_led_on IMPORT red led on IMPORT leds_off Be sure to export created functions Should take the value in RO and multiply it by itself R1 times (.e. zaises RO to the power of RI) Should return the result in RO Inputs: RO and Rl Outputs: RO exp Your code here BX LR

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!