在装配体中带有括号的十六进制数字是什么意思? [英] What does a hexadecimal number, with a register in parenthesis mean in Assembly?

查看:234
本文介绍了在装配体中带有括号的十六进制数字是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

lea 0x1c(%ebp),%eax

因此,我模糊地理解lea指令的作用,并且我知道它们是寄存器,但是这种结构是什么:0x1c(%ebp)?我从objdump中获得了这段代码.

So, I understand vaguely what the lea instruction does, and I know those are registers, but what is this structure: 0x1c(%ebp)? I got this code out of objdump.

推荐答案

它是许多x86 寻址模式.具体来说,这称为位移​​"寻址.

It is one of the many x86 addressing modes. Specifically, this is referred to as "displacement" addressing.

由于您说过使用objdump且未指定使用-M标志,因此我将在 GAS语法(与英特尔语法).这意味着第一个操作数是源,第二个操作数是目的地.

Since you said you used objdump and didn't specify that you used the -M flag, I'm going to assume this in the GAS syntax (as opposed to Intel syntax). This means that the first operand is the source, and the second operand is the destination.

lea 0x1C(%ebp),%eax指令的意思是以%ebp取值,添加0x1C(十进制为28),然后将该值存储在%eax中".

The lea 0x1C(%ebp),%eax instruction means, "Take the value in %ebp, add 0x1C (28 in decimal), then store that value in %eax".

这篇关于在装配体中带有括号的十六进制数字是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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