Ch 11: Real-Time Interrupts & Timer Programming

171 Questions171 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 171 Questions
Page 14 of 18
Q131
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 11๐Ÿท๏ธ Direction Flag (DF) Autoincrement vs Autodecrement ModesEasyโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In 8088 string processing instructions, what does DF = 0 represent and what does DF = 1 represent?
๐Ÿ’ป assembly Snippet
cld
std
Q132
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 11๐Ÿท๏ธ Video RAM Screen Scrolling Algorithm (REP MOVSW / REP STOSW)Hardโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the algorithm and write the assembly language routine to scroll up the text-mode screen by a specified number of lines using string block instructions.
๐Ÿ’ป assembly Snippet
scrollup:
    push bp
    mov bp, sp
    push ax
    push cx
    push si
    push di
    push es
    push ds

    mov ax, 80            ; Load characters per row in AX
    mul byte [bp+4]       ; Calculate source word position (N * 80)
    mov si, ax            ; SI = source word position
    push si               ; Save position for clearing bottom lines later
    shl si, 1             ; Convert word index to byte offset

    mov cx, 2000          ; Total screen word locations (80x25)
    sub cx, ax            ; Count of words to move (2000 - N*80)

    mov ax, 0xb800
    mov es, ax            ; ES points to Video RAM base
    mov ds, ax            ; DS points to Video RAM base
    xor di, di            ; DI = 0 (top-left column)
    cld                   ; Set autoincrement mode
    rep movsw             ; Copy screen content up

    mov ax, 0x0720        ; Space character with normal attribute
    pop cx                ; Restore count of positions to clear (N * 80)
    rep stosw             ; Clear bottom lines with spaces

    pop ds
    pop es
    pop di
    pop si
    pop cx
    pop ax
    pop bp
    ret 2
Q133
๐Ÿง  Long Problem๐Ÿ“˜ CS401๐Ÿ“‘ Lec 11๐Ÿท๏ธ String Length Calculation Subroutine (REPNE SCASB)Hardโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Write a complete 8088 assembly language subroutine ('strlen') to calculate the length of a null-terminated string passed as a far pointer on the stack.
๐Ÿ’ป assembly Snippet
strlen:
    push bp
    mov bp, sp
    ...
    repne scasb
Q134
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 11๐Ÿท๏ธ Memory-to-Memory Data Movement via String InstructionsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Only ________ instructions allow moving data directly from one memory location to another memory location without intermediate register staging.
๐Ÿ’ป assembly Snippet
movsb
  1. A.String
  2. B.Word
  3. C.Indirect
  4. D.Stack
Q135
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 11๐Ÿท๏ธ STOS (Store String) Instruction MechanicsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which string instruction transfers a byte or word from register AL or AX to the memory location addressed by ES:DI and automatically updates DI?
๐Ÿ’ป assembly Snippet
stosb
stosw
  1. A.LODS
  2. B.STOS
  3. C.SCAS
  4. D.MOVE
Q136
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 11๐Ÿท๏ธ Five Basic 8088 String Block InstructionsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which set of 5 fundamental string block instructions is available in 8088 assembly language?
  1. A.STOS, LODS, CMPS, SCAS, and MOVS
  2. B.MUL, DIV, ADD, ADC, and MOVE
  3. C.SBB, ADD, CMPS, ADC, and MOVS
  4. D.None of the given options
Q137
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 11๐Ÿท๏ธ LODS (Load String) Instruction MechanicsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which string instruction transfers a byte or word from the source memory location DS:SI into AL or AX and automatically updates SI?
๐Ÿ’ป assembly Snippet
lodsb
lodsw
  1. A.LODS
  2. B.STOS
  3. C.SCAS
  4. D.MOVE
Q138
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 11๐Ÿท๏ธ SCAS (Scan String) Instruction MechanicsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which string instruction compares a byte or word in register AL or AX with the destination string element addressed by ES:DI and updates status flags?
๐Ÿ’ป assembly Snippet
scasb
scasw
  1. A.LODS
  2. B.STOS
  3. C.SCAS
  4. D.MOVE
Q139
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 11๐Ÿท๏ธ REPE / REPZ Repeat Prefix MechanicsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which repeat prefixes repeat the following string instruction as long as the Zero Flag is set (ZF = 1)?
๐Ÿ’ป assembly Snippet
repe cmpsb
  1. A.REP or REPZ
  2. B.REPE or REPZ
  3. C.REPE or RPZ
  4. D.RPE or REPZ
Q140
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 11๐Ÿท๏ธ LES (Load Extra Segment) Pointer InstructionEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
The LES instruction loads a 32-bit far pointer from memory into a specified general register and which segment register?
๐Ÿ’ป assembly Snippet
les di, [bp+4]
  1. A.ES (Extra Segment)
  2. B.DS (Data Segment)
  3. C.SS (Stack Segment)
  4. D.CS (Code Segment)