Computer Architecture & Assembly Language MCQs with Answers
Practice important Computer Architecture & Assembly Language MCQs with answers and explanations.
Chapter: 5
Q141:
How are parameters passed to subroutines in assembly language if the number of registers is limited?
A. Through registers only
B. By pushing parameters onto the stack
C. By calling subroutines recursively
D. By using indirect addressing
Correct Answer:
B
Chapter: 5
Q142:
What does the instruction MOV BP, SP achieve in a subroutine?
A. It moves data from BP to SP
B. It initializes BP with the value of SP
C. It swaps the contents of BP and SP
D. It resets the stack pointer to zero
Correct Answer:
B
Chapter: 5
Q143:
Why is the RET instruction used with an argument in some cases?
A. To add a value to SP after returning
B. To pass control to another subroutine
C. To pop additional registers from stack
D. To discard parameters on the stack
Correct Answer:
D
Chapter: 5
Q144:
What is the role of the BP register in accessing parameters passed on the stack?
A. It stores the return address
B. It serves as a reference point on the stack
C. It increments the stack pointer
D. It swaps data on the stack
Correct Answer:
B
Chapter: 5
Q145:
How does the CALL instruction differ for intra-segment and inter-segment calls?
A. It pushes CS for inter-segment calls only
B. It pushes IP for both types of calls
C. It doesn't modify SP for inter-segment
D. It only modifies CS for intra-segment
Correct Answer:
A
Chapter: 5
Q146:
What does the XCHG instruction do when one operand is in memory?
A. Swaps with another memory operand
B. Loads the operand into a register
C. Exchanges with the contents of the register
D. Moves data to the stack
Correct Answer:
C
Chapter: 6
Q147:
What does ASCII stand for?
A. American Standard Code for Information Interchange
B. American Symbolic Character Interface
C. Alphabetic System Code Identification
D. Advanced System Code Interface
Correct Answer:
A
Chapter: 6
Q148:
How many characters are defined in the standard ASCII?
A. 128
B. 256
C. 64
D. 512
Correct Answer:
A
Chapter: 6
Q149:
Which standard has become the most prevalent for global communication?
A. EBCDIC
B. Gray Code
C. ASCII
D. Unicode
Correct Answer:
C
Chapter: 6
Q150:
What is the memory address used for the IBM PC text mode color display?
A. A0000
B. B8000
C. C0000
D. D8000
Correct Answer:
B
Chapter: 6
Q151:
Which byte in a word is used for the foreground and background colors in display memory?
A. First
B. Second
C. Third
D. Fourth
Correct Answer:
B
Chapter: 6
Q152:
In the attribute byte, what does bit 7 represent?
A. Intensity of background
B. Blinking of foreground character
C. Red component of background
D. Green component of foreground
Correct Answer:
B
Chapter: 6
Q153:
How many colors can be displayed for the foreground in video memory attributes?
A. 8
B. 16
C. 4
D. 32
Correct Answer:
B
Chapter: 6
Q154:
In Assembly language, how do you load the video memory segment into ES?
A. mov es, ax
B. mov ds, ax
C. mov cs, ax
D. mov ss, ax
Correct Answer:
A
Chapter: 6
Q155:
Which instruction is used to clear the screen in Assembly language?
A. mov word [es:di], 0x0720
B. mov [es:di], 0x00
C. mov es, 0xB800
D. int 0x21
Correct Answer:
A
Chapter: 6
Q156:
What does the instruction mov word [es:0], 0x0741 do?
A. Clears the screen
B. Displays 'A' in white on black
C. Displays '0' in green on blue
D. Displays 'A' in green on blue
Correct Answer:
B
Chapter: 6
Q157:
What is the purpose of the DIV instruction in Assembly language?
A. Multiply two numbers
B. Divide a number
C. Add two numbers
D. Subtract two numbers
Correct Answer:
B
Chapter: 6
Q158:
How is the ASCII code for 'A' stored in memory?
A. 0x41
B. 0x30
C. 0x61
D. 0x20
Correct Answer:
A
Chapter: 6
Q159:
What is the result of executing mov word [es:160], 0x1230?
A. Prints 'A' on top left
B. Prints '0' on second line in green on blue
C. Clears the screen
D. Prints 'A' on the bottom right
Correct Answer:
B
Chapter: 6
Q160:
Which of the following is the correct syntax to declare the string 'abc' in Assembly language?
A. db 'abc'
B. db "abc"
C. db abc
D. db ['abc']
Correct Answer:
A