9 - x86 Flags and Stacks Flashcards

1
Q

What are EGLAGS ?

A

They’re the CPU status flags which record information on conditions such as overflow or carry.

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

Which flags are most commonly used?

A
  • S = sign (to tell if operation result is negative)
  • Z = whether zero or not
  • C = carry (arithmetic carry)
  • O = overflow (arithmetic)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a stack?

A

A memory arrangement (data structure) for storing and retrieving information (values).

Like a stack of coins, one on top of another. When we add a value, it goes on top, and the stack grows.

Conversely, when we remove a value, it’s taken from the top and the stack decreases.

LIFO = ‘Last in, first out’

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