Question

In: Computer Science

3. In a typical service routine, to go back to the previous code we do RTI....

3. In a typical service routine, to go back to the previous code we do RTI. Suppose we replace RTI by a sequence of two instructions:


POPpc

POPpsw


The POPpc instruction will pop the PC value from the control stack (assume that PC, PSW values are on the stack in the right order) and put it into the PC register. The POPpsw instruction will pop the PSW value from the control stack and put it in the PSW register.

Assume that all logical addresses are the same as the physical addresses.

Will this scheme work? Explain in LESS THAN 50 WORDS.

Solutions

Expert Solution

Yes,this will work just fine.when a typical service routine is over,then it is required to fill the PC with the next address of instruction which was keep on hold to service that particular routine.

This functionality is actually automatic,when service routine is over,this will invoke pop operation which will then pop the PC and PSW values from control stack which were actually pushed when PC was initialised with address of service routine.

PSW is also required to continue effectively and to produce correct results.PSW contain Accumulator and flag registers which explicitly define the state of program upto where program was preempted.this state information is also required because in most cases instructions are dependent on each other.without this information ,program can't be executed effectively if they execute somehow then it is not guaranteed that it will generate correct output.


Related Solutions

How do I go back to the start of the main method with the given code?...
How do I go back to the start of the main method with the given code? Hello I am making this java program and there is a point in the code where if the user types the character y it will start the program back at the beginning of the main method. How can I do this without drastically changing the code? For instance, if I type y, the program will go back to line 1 and repeat the entire...
Do you think the economy is self-regulating? Do you think economies will always go back to...
Do you think the economy is self-regulating? Do you think economies will always go back to its potential as Classical view believes? Briefly discuss.
Do you think the economy is self-regulating? Do you think economies will always go back to...
Do you think the economy is self-regulating? Do you think economies will always go back to its potential as Classical view believes? Briefly discuss.
Do you think the economy is self-regulating? Do you think economies will always go back to...
Do you think the economy is self-regulating? Do you think economies will always go back to its potential as Classical view believes? Briefly discuss.
Explain Bringing Human Resources Back into Strategic Planning Copy and Paste. Do not use previous answers.
Explain Bringing Human Resources Back into Strategic Planning Copy and Paste. Do not use previous answers.
3. In a previous election, we were wondering if president Obama would be re-elected. We took...
3. In a previous election, we were wondering if president Obama would be re-elected. We took a random poll of 1057 Americans and asked them if they would vote for Obama to be re-elected. Of the 1057 people in the poll, 583 said they would support Obama. Is this evidence convincing enough for us to know if more than 50% of all Americans would vote to re-elect president Obama? To answer this question we will look at simulations from a...
how do we interpret how typical a score is compare to the population based on the...
how do we interpret how typical a score is compare to the population based on the population mean and standard deviation
How would you react to the typical “this is how we do things here” response to...
How would you react to the typical “this is how we do things here” response to change? How can you help the employees make their transition from the unawareness stage to the action stage (stages in the acceptance of individual transition)? Specially thanks to the change curve we can predict people’s emotions and reactions to change. in reference with ringtone: exploring the rise and fall of nokia in mobile phones
Belongs to Hospitality Law Is it fair that we have to go looking for problems? Do...
Belongs to Hospitality Law Is it fair that we have to go looking for problems? Do you think doing this helps us limit liability? Sometimes we are held responsible when people do some pretty dumb things. Search online for the craziest case that a hotel or restaurant was held responsible for. Post your examples and the case citations here. Funniest one wins!
how do we go about determining the cost that goes on the Y axis for the...
how do we go about determining the cost that goes on the Y axis for the regression analysis in question 5c on chapter 2a of the Managerial Accounting 14th edition text? thanks.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT