in CO and Architecture
556 views
0 votes
0 votes

 

in CO and Architecture
by
556 views

1 comment

B, Call and return only
0
0

1 Answer

1 vote
1 vote
Best answer
RET (1-byte instruction)

-It retrieves the return address from the top of the stack.

Load the program counter with the return address.

The CALL instruction keeps the return address at the two memory locations immediately before where the Stack Pointer is currently pointing.

So the SP must be set correctly before using the CALL instruction.

RET instruction brings the contents of the two memory locations to the top of the stack and uses these as the return address.

If the content of the stack pointer is a subroutine is modified then the return address will be lost.

So, the option (B) should be the correct answer.

 

Please do verify me the answer once.
selected by
by

1 comment

Brother Jump instruction will modify the PC but not the stack pointer right ?
0
0

Related questions