The instructions that are used to call a subroutine from a main program and return to the main program after execution of called function are
A. CALL,JMP
B. JMP,IRET
C. CALL,RET
D. JMP,RET
Answer:A
The instructions that are used to call a subroutine from a main program and return to the main program after execution of called function are
A. CALL,JMP B. JMP,IRET C. CALL,RET D. JMP,RET
Explanation: At each CALL instruction, the IP and CS of the next instruction is pushed onto stack, before the control is transferred to the procedure.At the end of procedure the RET instruction must be executed to retrieve the stored contents of IP & CS registers from stack.