Subroutines
Lecture 13: Subroutines
222 Questions172 MCQs45 Short Questions5 Long Questions
Showing 1 โ 10 of 222 Questions
Page 1 of 23
Q1๐ Short Q๐ Lec 5Easy๐RepeatedโญHigh-Yield๐กConceptual
Describe the operation of PUSH and POP instructions with the help of an assembly language example.
Q2๐ 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?
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
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.
Q5๐ Short Q๐ Lec 5EasyโญHigh-Yield๐กConceptual
How many parameters can a subroutine receive through the stack in x86 assembly language?
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๐ Short Q๐ Lec 5Medium๐RepeatedโญHigh-Yield๐กConceptual
Analyze the following x86 assembly code sequence and describe its final effect on the value stored in the BP register:
push bp
mov bp, sp
sub sp, 2
mov bp, sp
pop bp