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 171 โ€“ 180 of 264 Questions
Page 18 of 27
Q171
๐Ÿง  Long Problem๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ 7.1. String Instructions (String Length Calculation via REPNE SCASB)Hardโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Write a complete x86 assembly language subroutine `strlen` that calculates the length of a null-terminated string passed by far pointer (`Segment:Offset`), utilizing string scan instructions (`REPNE SCASB`).
๐Ÿ’ป assembly Snippet
strlen:
    push bp
    mov bp, sp
    push es
    push cx
    push di
    les di, [bp+4]
    mov cx, 0xffff
    xor al, al
    cld
    repne scasb
    mov ax, 0xffff
    sub ax, cx
    dec ax
    pop di
    pop cx
    pop es
    pop bp
    ret 4
Q172
๐Ÿง  Long Problem๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ 7.1. String Instructions (String Length Subroutine Mechanics)Hardโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Write the remaining x86 assembly language statements for the `strlen` subroutine that scan for a null terminator byte (`0x00`), calculate the string length in register `AX`, restore registers, and return clearing stack parameters.
๐Ÿ’ป assembly Snippet
repne scasb
mov ax, 0xffff
sub ax, cx
dec ax
pop di
pop cx
pop es
pop bp
ret 4
Q173
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ Video Memory and Character Attribute LayoutEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which bit of the character attribute byte represents the intensity component of the foreground color in text mode video memory?
๐Ÿ’ป assembly Snippet
mov ah, 0x0E
  1. A.4th bit (Bit 4)
  2. B.5th bit (Bit 5)
  3. C.6th bit (Bit 6)
  4. D.3rd bit (Bit 3)
Q174
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ Segment Override and Memory AddressingEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What is the function of the instruction 'mov [es:di], dx' in 8088 assembly language?
๐Ÿ’ป assembly Snippet
mov [es:di], dx
Q175
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ Text Mode Video Memory LayoutEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In text mode video memory (address 0xB800), every character is represented on screen by a 16-bit word. What does each byte of this word represent?
๐Ÿ’ป assembly Snippet
mov word [es:di], 0x0741
Q176
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ Text Mode Video Memory and Attribute Byte LayoutEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which bit of the character attribute byte represents the blue component of the foreground color in text mode video memory?
๐Ÿ’ป assembly Snippet
mov ah, 0x01    ; Blue foreground color mask (Bit 0 set)
  1. A.Bit 0
  2. B.Bit 1
  3. C.Bit 2
  4. D.Bit 3
Q177
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ Text Mode Video Memory and Attribute Byte LayoutEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which bit of the character attribute byte represents the red component of the background color in text mode video memory?
๐Ÿ’ป assembly Snippet
mov ah, 0x40    ; Red background color mask (Bit 6 set)
  1. A.Bit 3
  2. B.Bit 4
  3. C.Bit 5
  4. D.Bit 6
Q178
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ Text Mode Video Memory and Attribute Byte LayoutEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which bit of the character attribute byte represents the green component of the background color in text mode video memory?
๐Ÿ’ป assembly Snippet
mov ah, 0x20    ; Green background color mask (Bit 5 set)
  1. A.Bit 3
  2. B.Bit 4
  3. C.Bit 5
  4. D.Bit 6
Q179
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ Direction Flag (DF) and String Processing ModesMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the role of the Direction Flag (DF) in 8088 string processing instructions, detailing the effects of 'CLD' and 'STD' instructions on memory address pointer updates.
๐Ÿ’ป assembly Snippet
cld
rep stosw
std
rep movsb
Q180
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ STOS (Store String) Instruction and Memory InitializationEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Describe the STOS (Store String) instruction in 8088 assembly language, detailing default segment and index register associations, bit-width variants, and common applications like screen clearing.
๐Ÿ’ป assembly Snippet
cld
mov ax, 0xB800
mov es, ax
xor di, di
mov ax, 0x0720
mov cx, 2000
rep stosw