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 141 โ€“ 150 of 222 Questions
Page 15 of 23
Q141
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Local Variable Allocation and Stack Frame Epilogue/PrologueHard๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Define a local variable in computer programming and explain how local variables are dynamically allocated and deallocated on the assembly stack frame using SP and BP.
๐Ÿ’ป assembly Snippet
push bp
mov bp, sp
sub sp, 4
Q142
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Stack Architecture and Segment Register AssociationsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In 8088 architecture, which segment register is the Stack Pointer (SP) associated with by default for memory addressing?
๐Ÿ’ป assembly Snippet
push ax
  1. A.SS (Stack Segment)
  2. B.DS (Data Segment)
  3. C.CS (Code Segment)
  4. D.ES (Extra Segment)
Q143
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Far Return (RETF) MechanicsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Executing a Far Return instruction (RETF) pops the saved 16-bit code segment address 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
Q144
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Stack Memory Architecture and Word GranularityEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
The system stack in the 8088 architecture operates on element sizes of __________.
๐Ÿ’ป assembly Snippet
push ax
  1. A.Word-sized elements
  2. B.Byte-sized elements
  3. C.Doubleword-sized elements
  4. D.Nibble-sized elements
Q145
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Stack Address Calculation and SS:SP PairingEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In 8088 real mode architecture, how is the physical memory address of the top of the stack calculated?
๐Ÿ’ป assembly Snippet
push ax
  1. A.SS:SI combination
  2. B.SS:SP combination
  3. C.ES:BP combination
  4. D.ES:SP combination
Q146
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Far Return (RETF) Execution MechanicsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When executing a Far Return instruction (RETF), into which register is the 16-bit offset popped first off the stack?
๐Ÿ’ป assembly Snippet
retf
  1. A.Base Pointer (BP)
  2. B.Instruction Pointer (IP)
  3. C.Stack Pointer (SP)
  4. D.Source Index (SI)
Q147
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ RET n Instruction and Argument Cleanup MechanicsHard๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What is the net effect on the Stack Pointer (SP) after executing the instruction 'RET 2' in an 8088 subroutine?
๐Ÿ’ป 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
Q148
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Stack Memory Mechanics and PUSH OperationEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In the 8088 16-bit architecture, how is the Stack Pointer (SP) updated whenever a PUSH operation is performed?
๐Ÿ’ป 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
Q149
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Subroutine Return Execution (RET Mechanics)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When a subroutine finishes execution, which instruction retrieves the return address from the stack and transfers control back to that caller address?
๐Ÿ’ป assembly Snippet
ret
  1. A.RET instruction
  2. B.CALL instruction
  3. C.POP instruction
  4. D.JMP instruction
Q150
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Base Pointer (BP) and Stack Frame AccessEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which 16-bit register acts as a memory pointer containing offset addresses within the special memory region called the stack?
๐Ÿ’ป assembly Snippet
mov ax, [bp + 4]
  1. A.SP
  2. B.BP
  3. C.PB
  4. D.AC