CS 271 Module 5
An input/output parameter may be passed by value. True False
False
When an argument is passed by value, a copy of the address is pushed on the stack. True False
False
The CALL instruction functions similarly to which of the following? Move, then Jump Push, then Jump Jump, then Push Jump
Push, then Jump
What general types of parameters are passed on the stack? Reference parameters Local variables Stack frames Activation records Value parameters
Reference Parameters Values Parameters
Which of the following are normally part of the stack frame? (Select all that apply) Saved Register Values Calling Procedure Starting Address Return Address Arguments Local Variables
Saved Register Values Return Address Arguments Local Variables
In the IA32 architecture, the top item on the stack will always have a lower memory address than the bottom item. True False
True
Which offers a more flexible approach, passing arguments to procedures in registers, or on the stack? in registers on the stack
on the stack
When values are received by a called subroutine, they are called __________. variables arguments parameters return values
parameters
The stack frame inside a procedure is also known as the ____________. Program Record Activation Record Activation Stack Procedure Frame
Activation Record
The RET instruction pops the top of the stack into what register? It does not pop the top of the stack into a register. EBP ESP EIP
EIP
Which of the following instructions always modify the ESP register? (Check all that apply) POP PUSH JMP DEC JNE INC CALL RET
POP PUSH CALL RET
What single instruction would I use to save all general purpose registers?
PUSHAD
A stack frame is _____ The area of the stack set aside for storing global strings. An area in the heap that is used to store global variables The area of the stack set aside for passed arguments, return address, local variables, and saved registers. A register window pointing to local variables. The area of the text segment set aside for passed arguments, subroutine return address, local variables, and saved registers
The area of the stack set aside for passed arguments, return address, local variables, and saved registers.
A subprocedure's stack frame contains the return address and its local variables. True False
True
An input parameter may be passed by reference. True False
True
Values passed to a subroutine by a calling program are called __________. arguments variables return values parameters
arguments
ESP always points to ______ the beginning of the stack when your program first began. the last value to be added to, or pushed on, the top of stack. the next, empty, location below the stack. the next, empty, location above the stack.
the last value to be added to, or pushed on, the top of stack.