Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a. When a subroutine is called, what happens to the stack? b. What would happen if a subroutine changes the top value of the

 

a. When a subroutine is called, what happens to the stack? b. What would happen if a subroutine changes the top value of the stack? c. What instruction enters a subroutine? d. What instruction returns from a subroutine? e. How do you pass parameters to a subroutine? .text mov.w #1, R10 mov.w # 4215h, R8; data 1 mov.w #38A6h, R9; data 2 push.w R8 push.w R9 call #subroutine pop.w R9 pop.w R8 jmp ending subroutine: ; subroutine adds value in R10 to data values on stack add.w add.w R10,2(SP) R10,4(SP) ret ending: jmp ; infinite loop to end program f. In this program, why are 2(SP) and 4(SP) used to address the values on the stack? g. In this program, how were parameters passed to the subroutine?

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

Step: 3

blur-text-image

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

Holt McDougal Larson Geometry

Authors: Ron Larson, Laurie Boswell, Timothy D. Kanold, Lee Stiff

1st Edition

0547315171, 978-0547315171

More Books

Students also viewed these Programming questions

Question

What are due process and stare decisis, and why are they important?

Answered: 1 week ago

Question

Describe the criteria for an effective budget.

Answered: 1 week ago

Question

Draw a picture consisting parts of monocot leaf

Answered: 1 week ago

Question

Name the property illustrated by the statement. YZ = ZY

Answered: 1 week ago

Question

Find the area of the figure. y 4 x

Answered: 1 week ago