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 161 โ€“ 170 of 264 Questions
Page 17 of 27
Q161
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ 7.1. Video Display Architecture (VESA INT 10h Service 4F00h Register Returns)Mediumโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which register pair is passed to BIOS service `INT 10h` (`AX = 4F00h` - VESA Get SuperVGA Information) to return the SuperVGA information block structure pointer?
๐Ÿ’ป assembly Snippet
mov ax, 4F00h      ; VESA Get SuperVGA Information Service
mov di, vbe_buffer ; ES:DI points to destination 256/512 byte buffer
int 10h            ; AX = 004Fh on success
Q162
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ 7.1. String Instructions (Direct Memory to Memory Transfers via MOVS)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In x86 assembly language, only __________ instructions allow transferring data directly from one memory location to another memory location in a single instruction.
๐Ÿ’ป assembly Snippet
movsb ; Copies byte directly from [DS:SI] to [ES:DI]
  1. A.string
  2. B.word
  3. C.indirect
  4. D.stack
Q163
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ 7.1. String Instructions (MOVS SI and DI Register Updates)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
After the execution of a `MOVS` (Move String / `MOVSB` / `MOVSW`) instruction, which of the following index registers are automatically updated?
๐Ÿ’ป assembly Snippet
movsb ; Updates both SI and DI (incremented or decremented based on DF)
  1. A.SI only
  2. B.DI only
  3. C.SI and DI only
  4. D.SI, DI and BP only
Q164
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ 7.1. Video Display Architecture (Character and Attribute Byte Memory Storage)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In standard text-mode video memory where each screen location consumes a 16-bit word, what is contained in the higher-addressed byte (the second byte)?
๐Ÿ’ป assembly Snippet
; Word at screen location: [High Byte: Attribute | Low Byte: ASCII Character]
  1. A.The character code
  2. B.The attribute byte
  3. C.The parameters
  4. D.The dimensions
Q165
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ 7.1. Video Display Architecture (Video Memory Segment Initialization 0xB800)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which set of assembly instructions correctly initializes the Extra Segment (`ES`) register to point to the base of color text-mode video memory ($0\text{xB8000}$)?
๐Ÿ’ป assembly Snippet
mov ax, 0xb800 ; Load segment selector for color video memory
mov es, ax     ; ES now points to base address 0xB8000
  1. A.mov AX, 0xb008 mov ES, AX
  2. B.mov AX, 0xb800 mov ES, AX
  3. C.mov AX, 0x8b00 mov ES, AX
  4. D.mov AX, 0x800b mov ES, AX
Q166
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ 7.1. Video Display Architecture (Two Bytes per Screen Location Layout)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In standard 80x25 text-mode video memory, how many memory bytes are allocated to represent each character cell location on the display screen?
  1. A.One byte
  2. B.Two bytes
  3. C.Four bytes
  4. D.Eight bytes
Q167
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ 7.1. Video Display Architecture (Attribute Byte 0x07 Black Background)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Executing the instruction `mov word [ES:0], 0x0741` writes character 'A' (`0x41`) with attribute `0x07` to the top-left screen cell. What is the resulting background color?
๐Ÿ’ป assembly Snippet
mov word [es:0], 0x0741 ; Writes 'A' (0x41) with Black background & Light Gray foreground (0x07)
  1. A.Black
  2. B.White
  3. C.Red
  4. D.Blue
Q168
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ 7.1. String Instructions (Direction Flag DF=0 Auto-Increment vs DF=1 Auto-Decrement)Easyโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In x86 string processing instructions, what operation and address processing direction do the Direction Flag states `DF = 0` and `DF = 1` represent?
๐Ÿ’ป assembly Snippet
cld ; Clears DF (DF = 0) -> Auto-increment mode (low to high addresses)
std ; Sets DF   (DF = 1) -> Auto-decrement mode (high to low addresses)
Q169
๐Ÿง  Long Problem๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ 7.1. Video Display Architecture (Screen Scroll-Up Assembly Routine and Formula)Hardโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the memory offset calculation formula and write the x86 assembly subroutine `scrollup` to scroll the 80x25 text-mode display screen up by a specified number of lines using string instructions (`REP MOVSW`).
๐Ÿ’ป assembly Snippet
scrollup:
    push bp
    mov bp, sp
    push ax
    push cx
    push si
    push di
    push es
    push ds
    mov ax, 80
    mul byte [bp+4]        ; Calculate line offset
    mov si, ax
    shl si, 1              ; Byte offset
    mov cx, 2000
    sub cx, ax             ; Words to copy
    xor di, di
    cld
    rep movsw
    pop ds
    pop es
    pop di
    pop si
    pop cx
    pop ax
    pop bp
    ret 2
Q170
๐Ÿง  Long Problem๐Ÿ“˜ CS401๐Ÿ“‘ Lec 7๐Ÿท๏ธ 7.1. Video Display Architecture (Screen Scroll-Up Routine Implementation)Hardโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Write the remaining x86 assembly code statements for the screen `scrollup` subroutine that set destination pointers, perform string copy using `REP MOVSW`, and clear the newly revealed bottom screen space using `REP STOSW`.
๐Ÿ’ป assembly Snippet
mov ax, 0xb800
mov es, ax
mov ds, ax
xor di, di
cld
rep movsw
mov ax, 0x0720
pop cx
rep stosw
pop ds
pop es
pop di
pop si
pop cx
pop ax
pop bp
ret 2