Skip to main content

Computer Architecture & Assembly Language MCQs with Answers

Practice important Computer Architecture & Assembly Language MCQs with answers and explanations.

Chapter: 9
Q221:
How many bytes are there in a paragraph?
A. 8 bytes
B. 16 bytes
C. 32 bytes
D. 64 bytes
Correct Answer: B
Chapter: 9
Q222:
In a timer interrupt service routine, what does the iret instruction do?
A. Increments the tick count
B. Sends End of Interrupt signal
C. Returns from an interrupt
D. Loads a new interrupt vector
Correct Answer: C
Chapter: 9
Q223:
What is the function of the printnum subroutine in the provided assembly code?
A. To print numbers to the screen
B. To initialize the video memory
C. To handle keyboard interrupts
D. To manage parallel port communication
Correct Answer: A
Chapter: 9
Q224:
How does the program handle the interrupt vector table (IVT) for storing interrupt handlers?
A. It initializes the IVT with interrupt addresses
B. It uses a static address for all handlers
C. It saves and restores old interrupt handlers
D. It only updates the data segment register
Correct Answer: C
Chapter: 9
Q225:
What is the purpose of mov cl, 4 followed by shr dx, cl in the provided code?
A. To shift bits left
B. To round up the number of paragraphs
C. To perform integer division
D. To set up the timer interrupt
Correct Answer: B
Chapter: 9
Q226:
What is the role of out 0x20, al in an interrupt service routine?
A. To initialize the video memory
B. To end an interrupt
C. To set up the interrupt vector table
D. To print numbers to the screen
Correct Answer: B
Chapter: 9
Q227:
In the provided code, what happens when the left shift key is pressed?
A. Timer starts counting
B. Counter stops incrementing
C. LED lights up
D. Bulb brightness increases
Correct Answer: A
Chapter: 9
Q228:
What is the function of the parallel interrupt service routine in Example 9.11?
A. It gradually increases power to a bulb
B. It reads characters from the keyboard
C. It sends scancodes to the parallel port
D. It controls the LEDs connected to the parallel port
Correct Answer: A
Chapter: 9
Q229:
How is the timerflag variable used in Example 9.8?
A. To determine whether to increment or stop the counter
B. To control the state of LEDs
C. To track the number of timer interrupts
D. To manage the parallel port communication
Correct Answer: A
Chapter: 9
Q230:
How does the program in Example 9.10 control the light pattern on LEDs?
A. By sending data to the parallel port
B. By modifying the timer interrupt settings
C. By using a keyboard interrupt handler
D. By adjusting the power to the parallel port
Correct Answer: A
Chapter: 9
Q231:
What does the cli instruction do in the provided assembly code?
A. Clears the interrupt flag
B. Initializes the data segment
C. Disables interrupts
D. Loads a new interrupt vector
Correct Answer: C
Chapter: 10
Q232:
What does the trap flag (TF) control in a debugger?
A. It allows debugging after each instruction
B. It skips instructions
C. It sets memory access protection
D. It controls memory allocation
Correct Answer: A
Chapter: 10
Q233:
What is the purpose of the single step interrupt in debugging?
A. It allows multiple instructions to be executed at once
B. It pauses execution after every instruction
C. It skips over certain instructions
D. It directly executes the next instruction in the sequence
Correct Answer: B
Chapter: 10
Q234:
Which instruction is used to push the flags onto the stack?
A. PUSHF
B. POPFL
C. FLAGP
D. PUSHS
Correct Answer: A
Chapter: 10
Q235:
What does the INT 3 interrupt do in debugging?
A. It causes a single step interrupt
B. It sets a breakpoint
C. It clears the breakpoint
D. It disables debugging interrupts
Correct Answer: B
Chapter: 10
Q236:
Which interrupt is used for single stepping in the provided examples?
A. INT 1
B. INT 2
C. INT 3
D. INT 4
Correct Answer: A
Chapter: 11
Q237:
What is the main concept behind multitasking in assembly language?
A. Simultaneous execution of multiple programs
B. Execution of one program at a time
C. Switching between tasks at high speed
D. Independent execution of tasks without switching
Correct Answer: C
Chapter: 11
Q238:
Which interrupt is used to control multitasking in the provided examples?
A. IRQ 0
B. IRQ 1
C. IRQ 2
D. IRQ 3
Correct Answer: A
Chapter: 11
Q239:
In Example 11.1, how is the current task index updated?
A. By incrementing and checking for out of range
B. By decrementing and checking for out of range
C. By using a timer interrupt to automatically update
D. By manually setting the index
Correct Answer: A
Chapter: 11
Q240:
What is the purpose of the iret instruction in the multitasking code?
A. To return to the previous task after an interrupt
B. To initialize the current task
C. To save the state of the current task
D. To reset the system
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Computer Architecture & Assembly Language

🚀 Start Quiz Now