Skip to main content
3 of 3
added 31 characters in body
PaulD
  • 453
  • 1
  • 4
  • 10

What purpose of mov %esp,%ebp?

When execution enters a new function by performing call I do often see this code template (asm list generated by Gnu Debugger when in debugging mode):

0x00401170 push %ebp 0x00401171 mov %esp,%ebp 0x00401173 pop %ebp 

So what's the purpose of moving esp to ebp?

PaulD
  • 453
  • 1
  • 4
  • 10