Advertisements
Advertisements
प्रश्न
How are subroutines called? Explain with an example.
स्पष्ट करा
Advertisements
उत्तर
A subroutine is called using a CALL instruction. CALL saves the return address and jumps to the subroutine; when the subroutine finishes, a RET instruction pops the return address back into the program counter, so execution returns to the caller.
Example:
4004: MOV A, C
4005: ADD B
4006: CALL UPDDT
4009: HLT
UPDDT: (subroutine instructions)
RETshaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2023-2024 (July) Official Board Paper
