EXCRETORY SYSTEM
CORTEX
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
When a subroutine is called, the return address is hold in which register?
|
Stack Pointer
|
|
Interrupt register
|
|
Program Counter
|
|
Link register
|
Explanation:
Detailed explanation-1: -R14 is also called the Link Register (LR). This is used for holding the return address when calling a function or subroutine.
Detailed explanation-2: -The RETURN instruction returns control from a subroutine back to the calling program and optionally returns a value. When calling an internal subroutine, CALL passes control to a label specified after the CALL keyword.
Detailed explanation-3: -A subroutine is a block of code that performs a task based on some arguments and optionally returns a result. By convention, you use registers R0 to R3 to pass arguments to subroutines, and R0 to pass a result back to the callers.
There is 1 question to complete.