Ch 05: Subroutines and Stack Architecture

222 Questions222 MCQs0 Short Questions0 Long Questions
๐ŸŽฏ Exam Practice Papers
SEMESTER PASS

CS401 - Computer Architecture and Assembly Language Programming Examination Practice

Timed practice exam simulation for CS401 - Computer Architecture and Assembly Language Programming.

๐Ÿ“˜ VU MID TERM EXAMLectures 1 to 22
โฑ๏ธ 60 Mins

Mid Term Examination

Covers syllabus of Lectures 1 to 22 with 30 high-yield MCQs in a timed exam environment.

๐Ÿ“30 MCQs
โฑ๏ธ60 Minutes
๐Ÿ“— VU FINAL TERM EXAMLectures 23 to 45
โฑ๏ธ 90 Mins

Final Term Examination

Comprehensive semester exam preparation with 45 MCQs covering Lectures 23 to 45 with complete course coverage.

๐Ÿ“45 MCQs
โฑ๏ธ90 Minutes
Showing 201 โ€“ 210 of 222 Questions
Page 21 of 23
Q201
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. Program FlowEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.2. Our First SubroutineEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. Program FlowEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
How many mandatory arguments does the basic RET instruction take?
๐Ÿ’ป assembly Snippet
ret
ret 4
Q204
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.3. Stack ImplementationEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Describe the execution function of the PUSH instruction.
๐Ÿ’ป assembly Snippet
push ax
Q205
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. Subroutine MechanismMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. Subroutine MechanismEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. Subroutine MechanismMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. Program FlowEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. Subroutine MechanismEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ 5.1. Subroutine MechanismEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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