Ch 07: Video Memory & Screen Display

264 Questions264 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 181 โ€“ 190 of 264 Questions
Page 19 of 27
Q181
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ LODS (Load String) Instruction and Loop ProcessingMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Describe the LODS (Load String) instruction in 8088 assembly language, detailing source segment/index register usage, and explain why LODS is typically used inside a loop rather than with the REP prefix.
๐Ÿ’ป assembly Snippet
cld
process_loop:
    lodsb
    cmp al, 0
    jz end_loop
    ; Process character in AL
    jmp process_loop
end_loop:
Q182
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ SCAS (Scan String) Instruction and Search PrefixesHard๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the operation of the SCAS (Scan String) instruction in 8088 assembly language, detailing register usage, flag updates, and how it combines with REPE/REPNE prefixes for string searching.
๐Ÿ’ป assembly Snippet
mov di, string_ptr
mov al, 0
mov cx, 0xFFFF
cld
repne scasb
Q183
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ MOVS (Move String) Instruction and Memory Block CopyingEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Describe the MOVS (Move String) instruction in 8088 assembly language, detailing source and destination register mappings, byte/word variants, and block copy execution using the REP prefix.
๐Ÿ’ป assembly Snippet
cld
mov cx, 100
rep movsb
Q184
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ CMPS (Compare String) Instruction and String ComparisonsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the CMPS (Compare String) instruction in 8088 assembly language, detailing register usage, subtraction operation, flag updates, and how REPE/REPNE prefixes enable string comparison.
๐Ÿ’ป assembly Snippet
cld
mov cx, 10
repe cmpsb
Q185
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ REP (Repeat) Prefix MechanicsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the function of the unconditional REP (Repeat) prefix in 8088 string instructions, detailing CX register handling, flag preservation, and loop termination.
๐Ÿ’ป assembly Snippet
mov cx, 50
rep stosb
Q186
๐Ÿง  Long Problem๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ Conditional String Prefixes: REPE/REPZ vs REPNE/REPNZHard๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Compare the conditional string repetition prefixes REPE (REPZ) and REPNE (REPNZ) in 8088 assembly language, detailing dual termination conditions and usage with CMPS and SCAS.
๐Ÿ’ป assembly Snippet
repe cmpsb
repne scasb
Q187
๐Ÿง  Long Problem๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ LODS String Processing and Video Memory Rendering SubroutineHardโญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Write a complete 8088 assembly subroutine using the LODSB instruction to fetch characters sequentially from a null-terminated string at DS:SI and print them directly to VGA text mode video memory at ES:DI.
๐Ÿ’ป assembly Snippet
print_string:
    cld
next_char:
    lodsb
    cmp al, 0
    jz done
    mov [es:di], al
    mov byte [es:di+1], 0x07
    add di, 2
    jmp next_char
done:
    ret
Q188
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ LODS and STOS Subroutine Pairing for Block ProcessingMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Why is combining the LODS instruction with the REP prefix considered ineffective, and how are LODS and STOS paired inside a loop for string processing?
๐Ÿ’ป assembly Snippet
cld
process_loop:
    lodsb
    mov ah, 0x07
    stosw
    loop process_loop
Q189
๐Ÿง  Long Problem๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ String Length Calculation using REPNE SCASBHard๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain how the SCASB instruction combined with the REPNE prefix calculates the length of a null-terminated string, and why DI points past the null character upon loop termination.
๐Ÿ’ป assembly Snippet
mov di, string_data
mov al, 0
mov cx, 0xFFFF
cld
repne scasb
sub di, string_data
dec di
Q190
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ LES and LDS Far Pointer Loading InstructionsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the operation, syntax, and register mechanics of the LES and LDS instructions in 8088 assembly language.
๐Ÿ’ป assembly Snippet
les di, [far_ptr]
lds si, [far_ptr]