in CO and Architecture retagged by
1,007 views
2 votes
2 votes
With reference to the return instruction. Which of the following statement is / are true?

1. The instruction can be used only to take the flow of control back to the program from which it initially jumped.

2.The instruction retrieves the address using the current stack pointer from the stack and alters the control to the program pointed to by it.

3. The instruction works only if the registers used in the main program have been pushed and later popped before its execution.

4.The instruction can be used only in conjunction with the call instruction.

A. 1st and 2nd

B. 2nd only

C. 1st, 2nd and 4

 D. All the statement are true
in CO and Architecture retagged by
1.0k views

2 Comments

Plz any one explain  4th statement
0
0
Explanation of 4th point "The instruction can be used only in conjunction with the call instruction"

CALLand RETURN are always used in pair i.e., you use call instruction in your main program to call a subprogram and in the subprogram you use the return instruction to go back to the calling code.
0
0

1 Answer

0 votes
0 votes
4 certainly all are true
by

Related questions