Computer Architecture & Assembly Language MCQs with Answers
Practice important Computer Architecture & Assembly Language MCQs with answers and explanations.
Chapter: 11
Q241:
How many PCBs (Process Control Blocks) are allocated in Example 11.2?
A. 16
B. 32
C. 64
D. 128
Correct Answer:
B
Chapter: 11
Q242:
In the provided assembly code, where are the task registers saved and restored?
A. In the stack
B. In the Process Control Block (PCB)
C. In the data segment
D. In a global variable
Correct Answer:
B
Chapter: 11
Q243:
What does the mov [cs:taskstates+bx+0], ax instruction do in the timer interrupt service routine?
A. Saves the ax register value in the task state
B. Updates the task state index
C. Restores the ax register value from the task state
D. Initializes the task state
Correct Answer:
A
Chapter: 11
Q244:
How is the stack space for each thread allocated in Example 11.2?
A. Dynamically at runtime
B. Statically at compile time
C. Based on the size of the PCB
D. By resizing the existing stack
Correct Answer:
A
Chapter: 11
Q245:
What does the shl instruction do in the context of PCB index manipulation?
A. Shifts the PCB index to calculate the start address
B. Multiplies the PCB index by 2
C. Divides the PCB index by 2
D. Resets the PCB index
Correct Answer:
A
Chapter: 11
Q246:
In Example 11.3, how is the multitasking kernel made available for use in other programs?
A. By hooking a software interrupt
B. By including it directly in the program
C. By copying the code to each program
D. By dynamically linking it
Correct Answer:
A
Chapter: 11
Q247:
What does the mov ax, 0xb800 instruction achieve in Example 11.1?
A. Points the es register to the video memory base address
B. Sets up a timer interrupt
C. Initializes the stack pointer
D. Configures the keyboard interrupt
Correct Answer:
A
Chapter: 11
Q248:
How are threads registered dynamically in Example 11.2?
A. By using a linked list of PCBs
B. By hardcoding thread information
C. By pre-allocating a fixed number of threads
D. By manually updating the PCB index
Correct Answer:
A
Chapter: 11
Q249:
What is the role of the cli instruction in the multitasking examples?
A. Disables interrupts
B. Enables interrupts
C. Clears the screen
D. Sets the interrupt priority level
Correct Answer:
A
Chapter: 11
Q250:
In Example 11.4, what is the purpose of the int 0x80 instruction?
A. To invoke the multitasking kernel
B. To terminate the program
C. To set up the stack pointer
D. To initialize the video display
Correct Answer:
A
Chapter: 11
Q251:
What is the significance of the int 0x21 instruction in Example 11.3?
A. It terminates and stays resident
B. It initializes the interrupt vector table
C. It sets up the PCB index
D. It hooks the software interrupt
Correct Answer:
A
Chapter: 12
Q252:
Which interrupt vector is used for BIOS video services?
A. INT 21
B. INT 10
C. INT 13
D. INT 14
Correct Answer:
B
Chapter: 12
Q253:
What does the AH register value 00h represent in INT 10 services?
A. Set video mode
B. Set text-mode cursor shape
C. Set cursor position
D. Scroll up window
Correct Answer:
A
Chapter: 12
Q254:
Which video mode corresponds to 80x25 text mode?
A. Mode 0
B. Mode 2
C. Mode 3
D. Mode D
Correct Answer:
B
Chapter: 12
Q255:
In which mode does the INT 10 service AH = 06h operate?
A. Text mode
B. Graphics mode
C. BIOS mode
D. Protected mode
Correct Answer:
A
Chapter: 12
Q256:
What does the AL register specify in the INT 10 service AH = 09h?
A. Character to display
B. Page number
C. Attribute or color
D. Number of times to write character
Correct Answer:
C
Chapter: 12
Q257:
What is the purpose of the INT 10 service with AH = 0Ch?
A. Write character only
B. Write graphics pixel
C. Set cursor position
D. Scroll down window
Correct Answer:
B
Chapter: 12
Q258:
Which service is used to reverse the shapes of all characters on the screen?
A. INT 10 - GET FONT INFORMATION
B. INT 10 - WRITE CHARACTER AND ATTRIBUTE
C. INT 10 - TEXT-MODE CHARGEN
D. INT 10 - WRITE GRAPHICS PIXEL
Correct Answer:
C
Chapter: 12
Q259:
What does the CX register represent in the INT 10 service AH = 13h?
A. Number of characters in string
B. Number of times to write character
C. Row and column of the window’s upper left corner
D. Attribute used to write blank lines
Correct Answer:
A
Chapter: 12
Q260:
What is the role of the DH and DL registers in the INT 10 service AH = 02h?
A. Page number
B. Row and column for cursor position
C. Character to display
D. Attribute or color
Correct Answer:
B