2

Why doesn't the Extended Stack Pointer (ESP) jump 1h in each PUSH or POP operation?

stakx - no longer contributing
  • 83,039
  • 20
  • 168
  • 268
Obzajd
  • 283
  • 1
  • 2
  • 8

1 Answers1

4

That's because PUSH pushes one whole register to the stack. On 32bit machines, that's four byte's worth of data.

PUSHQ would change RSP by 8 in x86_64 because it pushes 64 bits.

Mat
  • 202,337
  • 40
  • 393
  • 406
  • Your answer is brief, clear,easy, fast, and accurate. thanks for clearing things up for me. – Obzajd Sep 23 '11 at 14:37