输入0,0和推入ebp之间的区别? [英] Difference between enter 0,0 and push ebp?
问题描述
我是组装和接触示例的新手,以便更好地理解.我遇到了2个程序,一个使用enter 0,0
,另一个使用push ebp; mov ebp, esp
.我了解pusha
将所有通用寄存器压入堆栈.我对这两个术语是否可以互换使用感到困惑?
I'm new to assembly and working through examples to get a better understanding. I came across 2 programs one which uses enter 0,0
and other using push ebp; mov ebp, esp
. I understand pusha
pushes all general purpose registers onto the stack. I'm confused if these two terms can be user interchangeably or not?
enter 0,0
pusha
等于
push ebp
mov ebp, esp
在组装吗?
推荐答案
单个指令enter 0, 0
等效于一对指令push ebp
mov ebp, esp
. enter
需要4个字节进行编码,组合仅需要3个字节.
The single instruction enter 0, 0
is equivalent to the pair of instructions push ebp
mov ebp, esp
. The enter
requires 4 bytes to encode, the combo requires only 3 bytes.
由于pusha
,您的2个代码段不相同.
从第一个中删除它,或将其添加到第二个中.
Your 2 code snippets aren't equivalent because of the pusha
.
Either remove it from the first, or add it to the second.
这篇关于输入0,0和推入ebp之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!