Ch 15: 32-Bit Protected Mode Architecture

173 Questions173 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 91 โ€“ 100 of 173 Questions
Page 10 of 18
Q91
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 15๐Ÿท๏ธ Stack Frame Offset Calculation for ParametersMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When two 16-bit word parameters are pushed onto the stack prior to invoking a Near subroutine that executes the standard prologue ('push bp' / 'mov bp, sp'), at which relative BP offset is the first parameter (pushed first) located?
  1. A.[bp+2]
  2. B.[bp+4]
  3. C.[bp+6]
  4. D.[bp+8]
Q92
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 15๐Ÿท๏ธ Callee Stack Cleanup (RET n) vs Caller Stack Cleanup (cdecl)Hard๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Compare Callee Stack Cleanup (e.g., using 'RET n') and Caller Stack Cleanup (e.g., using 'ADD SP, n' after CALL) when passing parameters via the stack.
๐Ÿ’ป assembly Snippet
; Callee Cleanup
ret 4

; Caller Cleanup
call my_subroutine
add sp, 4
Q93
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 15๐Ÿท๏ธ RET n Instruction Order of Operations and Stack Parameter DiscardingMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain why the 'RET n' instruction adds the immediate value 'n' to the Stack Pointer (SP) AFTER popping the return address into the Instruction Pointer (IP), rather than before.
๐Ÿ’ป assembly Snippet
ret 4
Q94
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 15๐Ÿท๏ธ Dynamic Allocation and Deallocation of Stack Local VariablesMedium๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain how local variables are allocated and deallocated on the stack within a subroutine frame, and contrast them with global variables.
๐Ÿ’ป assembly Snippet
push bp
mov bp, sp
sub sp, 4
; body
mov sp, bp
pop bp
ret
Q95
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 15๐Ÿท๏ธ Stack Local Variable Allocation (sub sp, n) and Negative BP OffsetsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain how local variables are allocated on the stack in 8088 assembly language using the 'sub sp, n' instruction. Why must the byte allocation count be an even number, and how are local variables accessed relative to the Base Pointer (BP)?
๐Ÿ’ป assembly Snippet
push bp
mov bp, sp
sub sp, 2
Q96
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 15๐Ÿท๏ธ Stack Frame Offset Distinctions (Positive Parameter Offsets vs Negative Local Offsets)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In a standard x86 subroutine stack frame initialized with 'push bp', 'mov bp, sp', and 'sub sp, 4', distinguish between the relative BP offsets used to access parameters versus local variables.
๐Ÿ’ป assembly Snippet
mov ax, [bp+4]   ; Parameter
mov bx, [bp-2]   ; Local variable
Q97
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 15๐Ÿท๏ธ Serial Port DB-9 Connector HardwareEasyโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
The standard PC serial port (COM port) hardware interface uses which type of pin connector?
  1. A.9-pin DB-9
  2. B.8-pin DB-9
  3. C.3-pin DB-9
  4. D.9-pin DB-5
Q98
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 15๐Ÿท๏ธ DOS vs BIOS Storage AbstractionEasyโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which software layer provides a higher, more logical abstraction of the storage medium (files and directories) compared to raw sector/track BIOS access?
  1. A.BIOS
  2. B.DOS
  3. C.Both BIOS and DOS
  4. D.None of the given
Q99
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 15๐Ÿท๏ธ DOS INT 21h Service 01h Read Character with EchoEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
DOS INT 21h Service 01h reads a character from standard input with keyboard echo. Into which CPU register is the ASCII character code returned?
๐Ÿ’ป assembly Snippet
mov ah, 0x01
int 0x21
  1. A.AL
  2. B.BL
  3. C.CL
  4. D.BH
Q100
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 15๐Ÿท๏ธ DOS Device Driver Device Attribute Word Bit 15Mediumโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In a DOS Device Driver Header Device Attribute Word, which bit determines whether the driver represents a Character Device or a Block Device?
  1. A.Bit 12
  2. B.Bit 13
  3. C.Bit 14
  4. D.Bit 15