开发者

What does "push ebp" mean in x86 assemby? [duplicate]

This question already has answers here: What is the function of the push / pop instructions used on registers in x86 assembly? 开发者_如何学Python (5 answers) Closed 7 years ago.

I disassembled an .exe file and got this as its first line.

push ebp
  • What does it mean?
  • Why ebp?
  • Does it have anything to do with pop command? even though I don't see it in the disassembly!


push ebp just means pushing whatever is in register ebp onto the stack. ebp stores the stack pointer by convention.

This is generally used to establish a stack frame, followed by

mov     ebp, esp


It pushes the value of the EBP register on the stack, and is most commonly used to set up a stackframe. Pop retrieves a value from the stack.


The push instruction saves the value of a register onto the stack. The value can later be retrieved using a pop-instruction.

Wikipedia Stack (data structure): http://en.wikipedia.org/wiki/Stack_%28data_structure%29

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜