Module #5 Study Deck Flashcards

1
Q

PUSHF is used to preserve all general purpose register contents on the stack.
True / False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What will be the value of EAX when the following sequence of instructions has executed?

PUSH 5
PUSH 10
PUSH 20
POP EAX

A

20

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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.

A

the last value to be added to, or pushed on, the top of stack.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In the IA32 architecture, the top item on the stack will always have a lower memory address than the bottom item.
True / False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In the IA32 architecture, ESP (the stack pointer) is incremented each time data is popped from the stack.
True / False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What instruction (with any necessary operands) would pop the top 32 bits of the runtime stack into the EBP register?

A

POP EBP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which of the following instructions always modify the ESP register? (Check all that apply)
* POP
* INC
* DEC
* PUSH
* JNE
* RET
* CALL
* JMP

A
  • PUSH
  • POP
  • RET
  • CALL
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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.

A

EIP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The CALL instruction functions similarly to which of the following?
* Jump
* Jump, then Push
* Push, then Jump
* Move, then Jump

A
  • Push, then Jump
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A/An ________ procedure call occurs when a called procedure calls another procedure before the first procedure returns.
* cointained
* little
* inner
* nested

A
  • nested
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A subprocedure’s stack frame contains the return address and its local variables.
True / False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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.

A
  • The area of the stack set aside for passed arguments, return address, local variables, and saved registers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which offers a more flexible approach, passing arguments to procedures in registers, or on the stack?
* on the stack
* in registers

A
  • on the stack
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What parameter-passing method do most/all of Irvine’s library procedures use?
* Shared memory
* Pass Parameters in Registers
* Pass Parameters on the Stack

A

Pass Parameters in Registers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Arrays are passed by reference to avoid copying each element into the stack/registers.
True / False

A

True

17
Q

When values are received by a called subroutine, they are called __________.
* parameters
* return values
* arguments
* variables

A
  • parameters
18
Q

An input parameter may be passed by reference.
True / False

A

True

19
Q

Values passed to a subroutine by a calling program are called __________.
* variables
* parameters
* arguments
* return values

A
  • arguments
20
Q

When an argument is passed by value, a copy of the address is pushed on the stack.
* True
* False

A

False