Question
Section 2.4: Subroutines using the program stack Data relating to two lines are currently stored in memory as follows: 5000 - slope of line 1
Section 2.4: Subroutines using the program stack
Data relating to two lines are currently stored in memory as follows:
5000 - slope of line 1
5004 - x-coordinate of line 1
5008 - y-intercept of line 1
5012 - slope of line 2
5016 - x-coordinate of line 2
5020 - y-intercept of line 2
Write a program to calculate the y-coordinate of each line. You must use a subroutine to calculate the y-coordinate, and you must use the program stack for subroutine arguments and return value. Store the y-coordinate of line 1 to address 5024 and the y-coordinate of line 2 to 5028.
I highly recommend using the MIPSzy Simulator in section 2.10 to check your results.
Question 15 20 pts Section 2.4: Subroutines using the program stack Data relating to two lines are currently stored in memory as follows: 5000 - slope of line 1 5004 - X-coordinate of line 1 5008 - y-intercept of line 1 5012 - slope of line 2 5016 - X-coordinate of line 2 5020 - y-intercept of line 2 Write a program to calculate the y-coordinate of each line. You must use a subroutine to calculate the y-coordinate, and you must use the program stack for subroutine arguments and return value. Store the y-coordinate of line 1 to address 5024 and the y-coordinate of line 2 to 5028. I highly recommend using the MIPSzy Simulator in section 2.10 to check your results. Question 15 20 pts Section 2.4: Subroutines using the program stack Data relating to two lines are currently stored in memory as follows: 5000 - slope of line 1 5004 - X-coordinate of line 1 5008 - y-intercept of line 1 5012 - slope of line 2 5016 - X-coordinate of line 2 5020 - y-intercept of line 2 Write a program to calculate the y-coordinate of each line. You must use a subroutine to calculate the y-coordinate, and you must use the program stack for subroutine arguments and return value. Store the y-coordinate of line 1 to address 5024 and the y-coordinate of line 2 to 5028. I highly recommend using the MIPSzy Simulator in section 2.10 to check your resultsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started