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 131 โ€“ 140 of 222 Questions
Page 14 of 23
Q131
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Stack Architecture and PUSH / POP MechanicsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the architecture and Last-In, First-Out (LIFO) operational mechanics of the system stack in 8088 assembly language, detailing the execution steps of PUSH and POP instructions.
๐Ÿ’ป assembly Snippet
push ax
pop bx
Q132
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Stack-Based Control Flow and Data Management InstructionsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
List and describe the six primary 8088 assembly language instructions that utilize the system stack for temporary data storage, control flow redirection, and hardware/software interrupt handling.
๐Ÿ’ป assembly Snippet
push ax
call sub1
int 0x21
Q133
๐Ÿง  Long Problem๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Register Preservation and Stack Hygiene in SubroutinesHard๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain why saving and restoring registers on the stack is critical when writing modular subroutines, detailing the required LIFO pushing and popping order to maintain stack hygiene.
๐Ÿ’ป assembly Snippet
subroutine:
    push ax
    push bx
    ... 
    pop bx
    pop ax
    ret
Q134
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Register Preservation and Subroutine TransparencyMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Why is register preservation necessary when writing subroutines in 8088 assembly language, and how are PUSH and POP instructions used to achieve register transparency for the caller?
๐Ÿ’ป assembly Snippet
push ax
push cx
...
pop cx
pop ax
ret
Q135
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ PUSH Instruction Mechanics and Stack ManipulationEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the internal execution sequence of the PUSH instruction in 8088 assembly language, detailing Stack Pointer (SP) modification and data transfer.
๐Ÿ’ป assembly Snippet
push ax
Q136
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ POP Instruction Mechanics and Memory RetrievalEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the internal execution sequence of the POP instruction in 8088 assembly language, detailing Stack Pointer (SP) modification and data retrieval.
๐Ÿ’ป assembly Snippet
pop bx
Q137
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Intra-Segment CALL Mechanics and Control TransferMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Describe the execution flow and stack pointer manipulations performed during an intra-segment direct CALL instruction in 8088 assembly language.
๐Ÿ’ป assembly Snippet
call my_procedure
Q138
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ RET Instruction Mechanics and Stack CleanupMedium๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the operation of the RET (Return from Subroutine) instruction in 8088 assembly language, and describe how `RET n` performs callee parameter stack cleanup.
๐Ÿ’ป assembly Snippet
ret 4
Q139
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Subroutine Mechanics: RET vs RETF and Stack CleanupMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Differentiate between a Near Return (RET) and a Far Return (RETF) instruction in 8088 assembly language in terms of stack popping sequence, register updates, and parameter cleanup (RET n).
๐Ÿ’ป assembly Snippet
ret
retf
ret 6
Q140
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 5๐Ÿท๏ธ Parameter Passing Through Stack and Stack Frame ArchitectureMedium๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain how parameters are passed to subroutines through the stack in assembly language, detailing why parameters are pushed in reverse order and how the Base Pointer (BP) accesses them.
๐Ÿ’ป assembly Snippet
push word [param2]
push word [param1]
call add_numbers