Subroutines

Lecture 13: Subroutines

222 Questions172 MCQs45 Short Questions5 Long Questions
Showing 171180 of 222 Questions
Page 18 of 23
Q171📝 Short Q📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
Describe the execution mechanism and function of the PUSH instruction in 8088 assembly language.
💻 assembly Snippet
push ax
Q172📝 Short Q📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
Which CPU registers are conventionally treated as caller-saved (scratch) registers during function calls in x86 architecture?
💻 assembly Snippet
call my_func
Q173❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
The RETF (Return Far) instruction pops the target segment address off the stack into which segment register?
💻 assembly Snippet
retf
  1. A.CS (Code Segment) register
  2. B.DS (Data Segment) register
  3. C.SS (Stack Segment) register
  4. D.ES (Extra Segment) register
Q174❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
How many traditional parameter passing calling conventions (specifically C calling convention and Pascal calling convention) exist in standard x86 assembly language programming?
  1. A.1
  2. B.2
  3. C.3
  4. D.4
Q175📝 Short Q📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
What is the exact execution result of the subroutine return instruction 'RET 2'?
💻 assembly Snippet
ret 2
Q176❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
How many prevalent traditional calling conventions (specifically C calling convention and Pascal calling convention) exist in assembly language programming?
  1. A.1
  2. B.2
  3. C.3
  4. D.4
Q177❓ MCQ📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
How many prevalent traditional calling conventions (specifically the C calling convention and the Pascal calling convention) exist in standard x86 assembly language programming?
  1. A.1
  2. B.2
  3. C.3
  4. D.4
Q178📝 Short Q📑 Lec 5Easy🔁RepeatedHigh-Yield💡Conceptual
Who is responsible for removing parameters from the stack during subroutine calls in the C calling convention versus the Pascal calling convention?
💻 assembly Snippet
; C Calling Convention (Caller cleans stack)
call my_func
add sp, 4

; Pascal Calling Convention (Callee cleans stack)
my_func:
  ; body
  ret 4
Q179❓ MCQ📑 Lec 5EasyHigh-Yield💡Conceptual
In 8088 16-bit arithmetic operations, register DX plays an essential role in holding the upper 16 bits during:
💻 assembly Snippet
mul bx
div bx
  1. A.Multiplication and Division
  2. B.Addition and Subtraction
  3. C.Bit shifting and Rotating
  4. D.Logical AND/OR operations
Q180❓ MCQ📑 Lec 5MediumHigh-Yield💡Conceptual
If register BL contains binary 00000101 (5), what value will BL contain after executing a single Logical Shift Right ('SHR BL, 1') instruction?
💻 assembly Snippet
mov bl, 00000101b
shr bl, 1
  1. A.00000010
  2. B.00000011
  3. C.00001010
  4. D.00000001