Ch 17: Secondary Storage and Device Drivers

183 Questions183 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 21 โ€“ 30 of 183 Questions
Page 3 of 19
Q21
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 17๐Ÿท๏ธ Byte vs Word String Variants (STOSB vs STOSW)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
How do string instruction variants (such as STOSB vs STOSW) differ in operand data size and index register pointer adjustments when the Direction Flag (DF) is cleared (CLD)?
๐Ÿ’ป assembly Snippet
stosb
stosw
  1. A.STOSB transfers 1 byte and increments index registers by 1; STOSW transfers 1 word (2 bytes) and increments index registers by 2
  2. B.STOSB transfers 1 word and decrements index registers by 1; STOSW transfers 1 byte and decrements index registers by 2
  3. C.STOSB transfers 1 byte and decrements index registers by 2; STOSW transfers 1 word and increments index registers by 1
  4. D.STOSB and STOSW both transfer 2 bytes but adjust SP instead of DI
Q22
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 17๐Ÿท๏ธ Direction Flag (DF) and Auto-Increment/Auto-Decrement ModesEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain how the Direction Flag (DF) controls the execution direction of string processing instructions in 8088 assembly language. Contrast auto-increment mode ('CLD') with auto-decrement mode ('STD').
๐Ÿ’ป assembly Snippet
cld
std
Q23
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 17๐Ÿท๏ธ String Instruction Destination Memory Addressing RulesEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which segment-offset register pair is used as the implicit memory destination pointer in 8088 string instructions, and can its segment register be overridden?
  1. A.DS:SI, and segment override is allowed
  2. B.ES:DI, and segment override is NOT allowed
  3. C.DS:DI, and segment override is allowed
  4. D.ES:SI, and segment override is NOT allowed
Q24
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 17๐Ÿท๏ธ STOS Instruction and REP Prefix MechanicsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Describe the operation of the STOS (Store String) instruction when combined with the REP hardware prefix, specifying source operands, destination registers, counter registers, and index pointer updates.
๐Ÿ’ป assembly Snippet
mov ax, 0xb800
mov es, ax
mov di, 0
mov ax, 0x0720
mov cx, 2000
cld
rep stosw
Q25
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 17๐Ÿท๏ธ LODS Instruction Mechanics and Inapplicability of REP PrefixMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the mechanics of the LODS (Load String) instruction in 8088 assembly language. Why is the hardware REP prefix generally NOT used with LODS?
๐Ÿ’ป assembly Snippet
lodsb
lodsw
Q26
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 17๐Ÿท๏ธ SCAS Instruction and String Length Calculation using REPNEHard๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the operation of the SCAS (Scan String) instruction and describe how combining SCAS with the REPNE (Repeat While Not Equal) prefix allows programmers to find characters or calculate string lengths.
๐Ÿ’ป assembly Snippet
mov al, 0
mov cx, 0xffff
repne scasb
Q27
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 17๐Ÿท๏ธ REP Prefix Counter Decrement BehaviorEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
How does the hardware REP prefix decrement the counter register (CX) during the execution of string instructions for word-sized operands compared to byte-sized operands?
๐Ÿ’ป assembly Snippet
rep stosw
  1. A.REP always decrements CX by 1 per repetition loop regardless of byte or word operand size
  2. B.REP decrements CX by 1 for byte string instructions and by 2 for word string instructions
  3. C.REP decrements CX by 2 for byte string instructions and by 1 for word string instructions
  4. D.REP decrements CX based on the value stored in the Direction Flag (DF)
Q28
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 17๐Ÿท๏ธ Overlapping Memory Block Copying and Direction Flag ControlHard๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the overlapping memory block problem during block copy operations (MOVS) in 8088 assembly language, and describe how the Direction Flag (DF) is utilized to prevent data corruption.
๐Ÿ’ป assembly Snippet
std
rep movsb
Q29
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 17๐Ÿท๏ธ CMPS Instruction Mechanics and Block ComparisonMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the operation of the CMPS (Compare String) instruction in 8088 assembly language, specifying register roles, flag modifications, and usage with conditional repeat prefixes REPE and REPNE.
๐Ÿ’ป assembly Snippet
repe cmpsb
Q30
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 17๐Ÿท๏ธ Conditional Repeat Prefixes (REPE vs REPNE) Termination ConditionsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which combination of conditions causes the 'REPE CMPSB' instruction to terminate execution loop in 8088 assembly language?
๐Ÿ’ป assembly Snippet
repe cmpsb
  1. A.When a mismatch is found (Zero Flag ZF = 0) OR when CX decrements to 0
  2. B.When a match is found (Zero Flag ZF = 1) OR when CX decrements to 0
  3. C.Only when the Direction Flag (DF) is set to 1
  4. D.When an overflow interrupt occurs during subtraction