๐ CHAPTER PRACTICE
CS401 - Computer Architecture and Assembly Language Programming โ Subroutines
Practice 10 verified multiple choice questions per batch with instant answer reveal and comprehensive solutions.
Showing 1 โ 10 of 222 Questions
Page 1 of 23
Q1๐ Short Q๐ Lec 5EasyโญHigh-Yield๐กConceptual
How many parameters can a subroutine receive through the stack in x86 assembly language?
Q2๐ Short Q๐ Lec 5Medium๐RepeatedโญHigh-Yield๐กConceptual
Given initial register values AX = 0x3412, BX = 0x7856, CX = 0x1CAB, and SP = 0x0100, trace the contents of AX, BX, CX, and SP after executing: PUSH AX; PUSH BX; XCHG AX, CX; POP CX.
Q3๐ Short Q๐ Lec 5Medium๐RepeatedโญHigh-Yield๐กConceptual
Given initial values AX = 0x3412, BX = 0x7856, CX = 0x1CAB, and SP = 0x0100, trace the contents of AX, BX, CX, and SP after executing: PUSH AX; PUSH BX; POP AX; POP CX.
Q4๐ Short Q๐ Lec 5Medium๐RepeatedโญHigh-Yield๐กConceptual
How is the value of the IP register saved and updated when a CALL instruction is executed?
Q5๐ Short Q๐ Lec 5Easy๐RepeatedโญHigh-Yield๐กConceptual
Describe the operation of PUSH and POP instructions with the help of an assembly language example.
Q6๐ Short Q๐ Lec 5Easy๐RepeatedโญHigh-Yield๐กConceptual
Why are procedures used in assembly language, and what must be the last executable instruction in a procedure?
Q7๐ Short Q๐ Lec 5Medium๐RepeatedโญHigh-Yield๐กConceptual
Provide valid x86 assembly instruction(s) to move the value located at the top of the stack into the IP (Instruction Pointer) register.
Q8โ MCQ๐ Lec 5Easy๐RepeatedโญHigh-Yield๐กConceptual
How many prevalent calling conventions exist in assembly language programming (specifically x86 CS401)?
Q9โ MCQ๐ Lec 5Medium๐RepeatedโญHigh-Yield๐กConceptual
In NASM assembly language, an imported symbol is declared using the ________ directive, while an exported symbol is declared using the ________ directive.
Q10โ MCQ๐ Lec 5Medium๐RepeatedโญHigh-Yield๐กConceptual
Read the following x86 assembly stack framing sequence and determine the final effect on the BP register value:
push bp
mov bp, sp
sub sp, 2
mov sp, bp
pop bp