Module #5 Study Deck Flashcards
PUSHF is used to preserve all general purpose register contents on the stack.
True / False
False
What will be the value of EAX when the following sequence of instructions has executed?
PUSH 5
PUSH 10
PUSH 20
POP EAX
20
ESP always points to ______
* the next, empty, location above the stack.
* the next, empty, location below the stack.
* the last value to be added to, or pushed on, the top of stack.
* the beginning of the stack when your program first began.
the last value to be added to, or pushed on, the top of stack.
In the IA32 architecture, the top item on the stack will always have a lower memory address than the bottom item.
True / False
True
In the IA32 architecture, ESP (the stack pointer) is incremented each time data is popped from the stack.
True / False
True
What instruction (with any necessary operands) would pop the top 32 bits of the runtime stack into the EBP register?
POP EBP
Which of the following instructions always modify the ESP register? (Check all that apply)
* POP
* INC
* DEC
* PUSH
* JNE
* RET
* CALL
* JMP
- PUSH
- POP
- RET
- CALL
The RET instruction pops the top of the stack into what register?
* EIP
* EBP
* ESP
* It does not pop the top of the stack into a register.
EIP
The CALL instruction functions similarly to which of the following?
* Jump
* Jump, then Push
* Push, then Jump
* Move, then Jump
- Push, then Jump
A/An ________ procedure call occurs when a called procedure calls another procedure before the first procedure returns.
* cointained
* little
* inner
* nested
- nested
A subprocedure’s stack frame contains the return address and its local variables.
True / False
True
A stack frame is _____
* 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 storing global strings.
* The area of the stack set aside for passed arguments, return address, local variables, and saved registers.
* An area in the heap that is used to store global variables
* A register window pointing to local variables.
- The area of the stack set aside for passed arguments, return address, local variables, and saved registers.
The USES operator, coupled with the PROC directive, lets you list the names of all registers modified within a procedure and preserves them automatically for you.
True / False
True
Which offers a more flexible approach, passing arguments to procedures in registers, or on the stack?
* on the stack
* in registers
- on the stack
What parameter-passing method do most/all of Irvine’s library procedures use?
* Shared memory
* Pass Parameters in Registers
* Pass Parameters on the Stack
Pass Parameters in Registers