Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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 results

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_2

Step: 3

blur-text-image_3

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

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

Why should a foreign marketer study economic development? Discuss.

Answered: 1 week ago

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

1. Who should participate and how will participants be recruited?

Answered: 1 week ago