Reconsider the C-like program shown in Exercise 3, this time assuming display registers are used to access frames (rather than static links). Explain how the values of a, b and c are accessed in r's print statement.
Exercise 3
Consider the following C-like program that allows subprograms to nest. Show the sequence of frames, with static links, on the stack when r(16) is executed assuming we start execution (as usual) with a call to main(). Explain how the values of a, b and c are accessed in r's print statement.
![1932_546ce121-c504-4eec-b5d2-bf1b0022c8a0.png](https://secure.tutorsglobe.com/CMSImages/1932_546ce121-c504-4eec-b5d2-bf1b0022c8a0.png)
![641_77d7df40-b5bf-43ce-b0ea-a2e58ba745c8.png](https://secure.tutorsglobe.com/CMSImages/641_77d7df40-b5bf-43ce-b0ea-a2e58ba745c8.png)