输入0,0和推入ebp之间的区别? [英] Difference between enter 0,0 and push ebp?

查看:123
本文介绍了输入0,0和推入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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆