(1) Assume that a function has been called and the $ra is now0x00404010. The PC is currently 0x00402000. What is the address of the jal instruction that called the function?

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 31SA
icon
Related questions
Question
I need original answer not plagiarised. So don't copy others'content they are wrong.
(1) Assume that a function has been called and
the $ra is now0x00404010. The PC is currently
0x00402000. What is the address of the jal
instruction that called the function?
(2) Assume that a function has been called and
the $ra is now 0x0040400C. The PC is currently
0x00402000. What is the address of the jal
instruction that called the function?
(3) A function is called using a jal instruction. The jal
instruction is located at 0x00402000. The function is
located at 0x00404008. What is the value in the PC
after the jal instruction is executed?
Transcribed Image Text:(1) Assume that a function has been called and the $ra is now0x00404010. The PC is currently 0x00402000. What is the address of the jal instruction that called the function? (2) Assume that a function has been called and the $ra is now 0x0040400C. The PC is currently 0x00402000. What is the address of the jal instruction that called the function? (3) A function is called using a jal instruction. The jal instruction is located at 0x00402000. The function is located at 0x00404008. What is the value in the PC after the jal instruction is executed?
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Fundamentals of Computer System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr