Subroutines

Lecture 13: Subroutines

222 Questions172 MCQs45 Short Questions5 Long Questions
Showing 161170 of 222 Questions
Page 17 of 23
Q161❓ MCQ📑 Lec 5Medium🔁RepeatedHigh-Yield💡Conceptual
How many traditional parameter passing calling conventions (C calling convention and Pascal calling convention) are primarily recognized in assembly programming?
  1. A.1
  2. B.2
  3. C.3
  4. D.4
Q162❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
When executing a 'RETF' (Return Far) instruction, into which register is the 16-bit target offset popped first from the stack?
💻 assembly Snippet
retf
  1. A.BP
  2. B.IP
  3. C.SP
  4. D.SI
Q163❓ MCQ📑 Lec 5Hard🔁RepeatedHigh-Yield💡Conceptual
After the execution of the near instruction 'RET 2', by how many bytes is the Stack Pointer (SP) incremented in total?
💻 assembly Snippet
ret 2
  1. A.SP is incremented by 2
  2. B.SP is incremented by 4
  3. C.SP is decremented by 2
  4. D.SP is decremented by 4
Q164❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
In 8088 architecture, whenever an element is pushed onto the system stack using a PUSH instruction, how is the Stack Pointer (SP) modified?
💻 assembly Snippet
push ax
  1. A.SP is decremented by 1
  2. B.SP is decremented by 2
  3. C.SP is decremented by 3
  4. D.SP is decremented by 4
Q165❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
In 8088 real mode architecture, the system stack operates strictly on elements of what data size?
💻 assembly Snippet
push ax
pop bx
  1. A.Word-sized elements
  2. B.Byte-sized elements
  3. C.Doubleword-sized elements
  4. D.Nibble-sized elements
Q166❓ MCQ📑 Lec 5Medium🔁RepeatedHigh-Yield💡Conceptual
How many prevalent traditional parameter passing calling conventions (C calling convention and Pascal calling convention) exist in assembly programming?
  1. A.1
  2. B.2
  3. C.3
  4. D.4
Q167❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
When a subroutine finishes execution, which instruction retrieves the saved return address from the stack and transfers control back to the caller?
💻 assembly Snippet
ret
  1. A.RET instruction
  2. B.CALL instruction
  3. C.POP instruction
  4. D.Jump instruction
Q168❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
The Stack Pointer (SP) is a memory pointer register that is manipulated implicitly by a specific set of stack-related __________.
💻 assembly Snippet
push ax
pop bx
  1. A.Instructions (e.g., PUSH, POP, CALL, RET)
  2. B.Pointers
  3. C.Indexes
  4. D.Variables
Q169❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
Besides the Stack Pointer (SP), which base register functions as a frame memory pointer to access parameters and local variables inside the stack segment?
💻 assembly Snippet
mov bp, sp
mov ax, [bp + 4]
  1. A.SP
  2. B.BP
  3. C.PB
  4. D.AC
Q170📝 Short Q📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
How many optional immediate parameter arguments can the RET (Return from Subroutine) instruction accept for stack cleanup?
💻 assembly Snippet
ret 4