Ch 08: String Instructions and Primitives

307 Questions307 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 201 โ€“ 210 of 307 Questions
Page 21 of 31
Q201
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 8๐Ÿท๏ธ Hooking IVT Vectors for Single-Step and Breakpoint DebuggingHard๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Complete the missing assembly code lines to hook the single-step trap handler (trapisr), breakpoint handler (debugisr), and keyboard handler (kbisr) into the Interrupt Vector Table (IVT), and explain how the Trap Flag (TF) is set on the stack to enable step-by-step execution.
๐Ÿ’ป assembly Snippet
start:
    xor ax, ax
    mov es, ax              ; point es to IVT base
    mov word [es:1*4], trapisr ; store offset at n*4
    mov [es:1*4+2], cs      ; store segment at n*4+2
    mov word [es:3*4], debugisr ; store offset at n*4
    mov [es:3*4+2], cs      ; store segment at n*4+2
    cli                     ; disable interrupts
    mov word [es:9*4], kbisr ; store offset at n*4
    mov [es:9*4+2], cs      ; store segment at n*4+2
    sti                     ; enable interrupts
Q202
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 8๐Ÿท๏ธ Keyboard Interrupt Line (IRQ 1 / INT 9)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which hardware Interrupt Request (IRQ) line is connected to the keyboard controller?
  1. A.IRQ 0
  2. B.IRQ 1
  3. C.IRQ 2
  4. D.IRQ 3
Q203
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 8๐Ÿท๏ธ Floppy Disk Controller IRQ Assignment (IRQ 6)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which hardware Interrupt Request (IRQ) line is reserved for the Floppy Disk Drive controller?
  1. A.IRQ 4
  2. B.IRQ 5
  3. C.IRQ 6
  4. D.IRQ 7
Q204
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 8๐Ÿท๏ธ Divide-by-Zero Hardware Exception (INT 0)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When an arithmetic division by zero occurs during program execution, how is the 'Divide by Zero' exception (INT 0) triggered?
  1. A.By calling INT 0 explicitly in software
  2. B.By calling INT 1 explicitly in software
  3. C.By calling INT 2 explicitly in software
  4. D.This interrupt is generated automatically by processor hardware
Q205
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 8๐Ÿท๏ธ Interrupt Request (IRQ) ConflictsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What condition occurs when two distinct peripheral hardware devices in a computer system attempt to utilize the same IRQ line simultaneously?
  1. A.An IRQ Collision
  2. B.An IRQ Conflict
  3. C.An IRQ Crash
  4. D.An IRQ Blockage
Q206
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 8๐Ÿท๏ธ Breakpoint Interrupt Service Routine (INT 3) ImplementationHard๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Write the assembly language code for a Breakpoint Interrupt Service Routine (INT 3 ISR) that saves register context, restores the original opcode at the breakpoint address, displays register values on screen, enables the Trap Flag (TF) on the stack, and waits for keypress confirmation.
๐Ÿ’ป assembly Snippet
debugISR:
    push bp
    mov bp, sp
    dec word [bp+2]
Q207
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 8๐Ÿท๏ธ Interrupt Vector Table (IVT) Vector InstallationMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Write the assembly language code sequence to install custom interrupt service routines for INT 1 (trapisr), INT 3 (debugisr), and INT 9 (kbisr) into the Interrupt Vector Table (IVT) starting at segment 0x0000.
๐Ÿ’ป assembly Snippet
mov [es:1*4+2], cs
mov word [es:3*4], debugisr
mov [es:3*4+2], cs
cli
mov word [es:9*4], kbisr
mov [es:9*4+2], cs
sti
Q208
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 8๐Ÿท๏ธ Single-Step Exception (INT 1) and Trap FlagEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which processor interrupt vector is generated after every instruction execution when the Trap Flag (TF = 1) is set for single-step debugging?
  1. A.INT 0
  2. B.INT 1
  3. C.INT 2
  4. D.INT 3
Q209
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 8๐Ÿท๏ธ Arithmetic Overflow Exception (INT 4)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which software interrupt vector is reserved by Intel for handling Arithmetic Overflow exceptions generated by the INTO instruction?
๐Ÿ’ป assembly Snippet
into
  1. A.INT 1
  2. B.INT 2
  3. C.INT 3
  4. D.INT 4
Q210
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 8๐Ÿท๏ธ 8259 PIC Hardware IRQ Input LinesEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In the 8259 Programmable Interrupt Controller (PIC), the IRQ lines on the master chip are configured as:
  1. A.Eight Input signals (IRQ 0 - IRQ 7)
  2. B.One Input signal
  3. C.Eight Output signals
  4. D.One Output signal