汇编代码 `movl %1, %%ebx` 是什么意思?
我试图理解一些汇编代码:
movl $244, %eax
movl %1, %%ebx
第一个意味着将数字 244 放入寄存器 eax,但第二个意味着什么?预先感谢您的帮助
P.S see the difference %1 and $244 and %eax and %%ebx
I'm trying to understand some assembly code:
movl $244, %eax
movl %1, %%ebx
The first one means put number 244 to the register eax, but what does second mean? thanks in advance for any help
P.S see the difference %1 and $244 and %eax and %%ebx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
gcc 内联汇编使用 %1 来指定参数。
您将在这里找到一些有关内联汇编的提示:
http:// /www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html#s4
The %1 is used by gcc inline assembly to specify parameter.
You will find some hint about inline assembly here :
http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html#s4
movl %1, %%ebx
movl
将把第一个参数移动到第二个参数。第一个参数是变量%1
。第二个参数是寄存器%%ebx
。编译器会将双百分号更改为单百分号,因此您也可以这样写:movl %1, %ebx
movl %1, %%ebx
movl
will move the first parameter to the second parameter. The first parameter is the variable%1
. The second parameter is the register%%ebx
. The compiler will change the double percent sign to a single percent sign so you could just as good write:movl %1, %ebx