Ch 06: Parameter Passing and Stack Frames

216 Questions216 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 216 Questions
Page 14 of 22
Q131
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ Repeat Prefixes and String InstructionsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When executed with the REP prefix (e.g., REP STOSW), how is the CX register modified after each iteration?
๐Ÿ’ป assembly Snippet
rep stosw
  1. A.Decremented by 1
  2. B.Decremented by 2
  3. C.Incremented by 1
  4. D.Incremented by 2
Q132
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ Direction Flag and String Pointer Auto-Increment/DecrementMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In the STOSW instruction, when the Direction Flag (DF) is set (DF = 1), how is the Destination Index (DI) register modified?
๐Ÿ’ป assembly Snippet
std
stosw
  1. A.Decremented by 1
  2. B.Decremented by 2
  3. C.Incremented by 1
  4. D.Incremented by 2
Q133
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ Block Movement Instructions and Flag BehaviorEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following status flags in the FLAGS register are affected by the MOVSW instruction?
๐Ÿ’ป assembly Snippet
movsw
  1. A.Direction Flag (DF)
  2. B.Parity Flag (PF)
  3. C.Zero Flag (ZF)
  4. D.No effect on flags
Q134
๐Ÿง  Long Problem๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ Array Sorting Verification and Stack SubroutinesHardโญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Write an 8088 assembly language subroutine named 'ShowResult' that receives two memory addresses via the stack: the address pushed first is the starting location of a 16-bit signed integer array, and the address pushed second is the memory location containing the array length. The subroutine must determine whether the array elements are sorted in strictly ascending order and print 'Yes' on the screen if sorted, or 'No' if not sorted. Ensure proper stack frame management, register preservation, and stack cleanup.
๐Ÿ’ป assembly Snippet
push array_addr
push length_addr
call ShowResult
Q135
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ Display Memory Structure and Character RepresentationEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In text mode video memory, how many bytes are allocated to represent a single character cell location on the screen?
๐Ÿ’ป assembly Snippet
mov word [es:0], 0x0741    ; Write ASCII 'A' (0x41) with attribute 0x07
  1. A.One byte
  2. B.Two bytes
  3. C.Four bytes
  4. D.Eight bytes
Q136
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ Graphics Mode Memory MappingEasyโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In graphics display mode, a specific location in video memory maps directly to a ________ on the physical screen.
๐Ÿ’ป assembly Snippet
mov ah, 0x0C
mov al, 0x0F
int 0x10
  1. A.Line
  2. B.Dot (Pixel)
  3. C.Circle
  4. D.Rectangle
Q137
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ ASCII Encoding and Text Mode Video Display MemoryEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What is the ASCII encoding standard, and how are ASCII character codes used in x86 text mode video memory to render characters on screen?
๐Ÿ’ป assembly Snippet
mov ax, 0xB800
mov es, ax
mov byte [es:0], 'A'
mov byte [es:1], 0x07
Q138
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ Standard ASCII vs IBM Extended ASCII EncodingEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What is the ASCII character encoding standard, and how does standard 7-bit ASCII (0โ€“127) differ from IBM Extended ASCII (128โ€“255)?
๐Ÿ’ป assembly Snippet
mov al, 'A'
mov bl, 201
Q139
๐Ÿง  Long Problem๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ Display Memory Formation and Text Mode VRAM ArchitectureHard๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the architecture and physical memory layout of Text Mode Display Memory (VGA) in IBM-compatible PCs, including screen resolution, memory base address, character cell byte structures, and physical address calculation for a given row and column.
๐Ÿ’ป assembly Snippet
mov ax, 0xB800
mov es, ax
; Offset = (row * 80 + col) * 2
Q140
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 6๐Ÿท๏ธ VGA Font Rendering and Bitmask Pixel SynthesisMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
How are character shapes and font glyphs rendered on a VGA screen from ASCII codes stored in video display memory?