Subroutines

Lecture 13: Subroutines

222 Questions172 MCQs45 Short Questions5 Long Questions
Showing 201210 of 222 Questions
Page 21 of 23
Q201❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
To transfer execution control back to the calling routine from a subroutine, how many mandatory explicit operands does the standard RET instruction require?
💻 assembly Snippet
ret
  1. A.1 argument
  2. B.2 arguments
  3. C.3 arguments
  4. D.No arguments
Q202❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
What is the maximum number of parameters a subroutine can receive using CPU general-purpose registers in 8088 architecture?
  1. A.6
  2. B.7
  3. C.8
  4. D.9
Q203📝 Short Q📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
How many mandatory arguments does the basic RET instruction take?
💻 assembly Snippet
ret
ret 4
Q204📝 Short Q📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
Describe the execution function of the PUSH instruction.
💻 assembly Snippet
push ax
Q205❓ MCQ📑 Lec 5Medium🔁RepeatedHigh-Yield💡Conceptual
What is the result of executing the instruction 'RET 2' in 8088 assembly language?
💻 assembly Snippet
ret 2
  1. A.Pops the return instruction pointer into IP and adds 2 additional bytes to SP
  2. B.Pops the return instruction pointer into IP and subtracts 2 bytes from SP
  3. C.Adds 2 to the Instruction Pointer (IP) without modifying SP
  4. D.Clears 2 general-purpose registers from the stack
Q206❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
Executing a standard RET instruction pops the return address offset from the stack into which register?
💻 assembly Snippet
ret
  1. A.BP
  2. B.IP
  3. C.SP
  4. D.SI
Q207❓ MCQ📑 Lec 5Medium🔁RepeatedHigh-Yield💡Conceptual
After executing the instruction 'RET 2', how is the Stack Pointer (SP) updated in total?
💻 assembly Snippet
ret 2
  1. A.SP is incremented by 2
  2. B.SP is decremented by 2
  3. C.SP is incremented by 4
  4. D.SP is decremented by 4
Q208❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
When a subroutine finishes execution, which assembly instruction retrieves the return address from the stack and transfers control back to that location?
💻 assembly Snippet
ret
  1. A.RET instruction
  2. B.CALL instruction
  3. C.POP instruction
  4. D.Jump instruction
Q209❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
Which assembly language instruction allows temporary diversion of control flow to a subroutine, enabling modular code reusability?
💻 assembly Snippet
call my_subroutine
  1. A.CALL
  2. B.RET
  3. C.AND
  4. D.XOR
Q210❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
The CALL instruction takes a target memory label or address as an ________, transferring program execution to that routine.
💻 assembly Snippet
call print_string  ; 'print_string' is the label argument
  1. A.Argument / Operand
  2. B.Label type
  3. C.Text string
  4. D.Register set