Computer Architecture & Assembly Language MCQs with Answers
Practice important Computer Architecture & Assembly Language MCQs with answers and explanations.
Chapter: 6
Q161:
What does the instruction int 0x21 do in the context of the provided examples?
A. Calls BIOS
B. Terminates the program
C. Starts the program
D. Resets the CPU
Correct Answer:
B
Chapter: 6
Q162:
What is the significance of 0x30 in converting a number to its ASCII representation?
A. Adds an integer
B. Converts a number to its ASCII code
C. Subtracts an integer
D. None of the above
Correct Answer:
B
Chapter: 6
Q163:
How many rows and columns are there in the standard VGA text mode?
A. 25 rows, 80 columns
B. 24 rows, 80 columns
C. 30 rows, 100 columns
D. 20 rows, 60 columns
Correct Answer:
A
Chapter: 6
Q164:
What does the code mov ax, 0x4c00 followed by int 0x21 accomplish?
A. Clears the screen
B. Prints 'hello world' on screen
C. Terminates the program
D. Restarts the program
Correct Answer:
C
Chapter: 6
Q165:
What is the purpose of the stack in the number printing algorithm?
A. To store the number
B. To store the ASCII code
C. To reverse the order of digits
D. To add digits together
Correct Answer:
C
Chapter: 6
Q166:
In which register is the quotient stored when using DIV BL?
A. AX
B. BX
C. DX
D. AL
Correct Answer:
D
Chapter: 7
Q167:
Which instruction in 8088 is used to move a block of memory from one location to another?
A. STOS
B. LODS
C. MOVS
D. CMPS
Correct Answer:
C
Chapter: 7
Q168:
What does the REP prefix do when used with string instructions?
A. Repeats the instruction CX times
B. Repeats the instruction until zero flag is set
C. Repeats the instruction until zero flag is not set
D. Clears the direction flag
Correct Answer:
A
Chapter: 7
Q169:
Which flag controls the direction of movement for string instructions?
A. Interrupt Flag (IF)
B. Direction Flag (DF)
C. Zero Flag (ZF)
D. Sign Flag (SF)
Correct Answer:
B
Chapter: 7
Q170:
What does the LODS instruction do?
A. Compares two blocks of memory
B. Transfers data from a register to memory
C. Loads data from memory to a register
D. Stores data from a register to memory
Correct Answer:
C
Chapter: 7
Q171:
In which mode does the STOS instruction operate if the Direction Flag (DF) is set?
A. Auto-increment mode
B. Auto-decrement mode
C. No change in mode
D. Repeat mode
Correct Answer:
B
Chapter: 7
Q172:
What is the role of the CX register when using REP prefix with string instructions?
A. Stores the length of the string
B. Acts as a counter for repetitions
C. Holds the address of the source
D. Holds the address of the destination
Correct Answer:
B
Chapter: 7
Q173:
How does the SCAS instruction differ from the other string instructions?
A. It performs arithmetic operations
B. It compares the value in AL or AX with a memory location
C. It moves data between registers
D. It clears a block of memory
Correct Answer:
B
Chapter: 7
Q174:
What does the MOVS instruction do?
A. Moves a byte or word from memory to a register
B. Moves a byte or word from one memory location to another
C. Moves data from a register to memory
D. Compares two blocks of memory
Correct Answer:
B
Chapter: 7
Q175:
What is the effect of the CLD instruction in string processing?
A. Sets the Direction Flag
B. Clears the Direction Flag
C. Sets the Zero Flag
D. Clears the Zero Flag
Correct Answer:
B
Chapter: 7
Q176:
Which instruction is commonly used to clear a block of memory?
A. MOVS
B. SCAS
C. STOS
D. LODS
Correct Answer:
C
Chapter: 7
Q177:
What happens when the REPE prefix is used with the SCAS instruction?
A. The instruction repeats while the zero flag is set
B. The instruction repeats while the zero flag is not set
C. The instruction executes once
D. The instruction does not execute
Correct Answer:
A
Chapter: 7
Q178:
What does the REPNE prefix do when used with string instructions?
A. Repeats the instruction while the zero flag is not set
B. Repeats the instruction while the zero flag is set
C. Repeats the instruction CX times
D. Executes the instruction once
Correct Answer:
A
Chapter: 7
Q179:
When using the MOVS instruction with overlapping memory blocks, how does the Direction Flag (DF) affect the copy operation?
A. It determines the source address
B. It determines the destination address
C. It controls the direction of the copy
D. It does not affect the copy operation
Correct Answer:
C
Chapter: 7
Q180:
What is the purpose of the XOR instruction in the context of clearing a register?
A. To set all bits to one
B. To reset the register to its initial state
C. To zero the register
D. To perform arithmetic operations
Correct Answer:
C