Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a ) Assume you want to organize a nested subroutine calls on a computer as follows: the routine 'main' calls a subroutine 'SUB 1 '

a) Assume you want to organize a nested subroutine calls on a computer as follows: the routine 'main' calls a subroutine 'SUB1' by executing a two-word call subroutine instruction located in memory at address 1000 followed by the address field of 6000 at Iocation 1001. Again subroutine 'SUB1' calls another subroutine 'SUB2' by executing a two-word call subroutine instruction located in memory at address 6050 followed by the address field of 8000 at location 6051. The content of the top of the memory stack (ToS) and stack pointer (SP) is 5000 and 3000 respectively. What are the content of PC,SP, and Top of the stack ?
i) After the subroutine call instruction is executed in the 'main' routine?
ii) After the subroutine call instruction is executed in the subroutine 'SUB1'?
iii) After the return from 'SUB2' subroutine?
image text in transcribed

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

Students also viewed these Databases questions

Question

what is classified as period cost for furniture manufacturer

Answered: 1 week ago