Computer Architecture & Assembly Language MCQs with Answers
Practice important Computer Architecture & Assembly Language MCQs with answers and explanations.
Multiple Choice Questions
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
View Answer
B
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
View Answer
B
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
View Answer
B
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
View Answer
B
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
View Answer
B
Q176: Which instruction is commonly used to clear a block of memory?
- A: MOVS
- B: SCAS
- C: STOS
- D: LODS
View Answer
C
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
View Answer
A
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
View Answer
A
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
View Answer
C
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
View Answer
C