英特尔程序集语法OFFSET [英] Intel assembly syntax OFFSET
问题描述
现在我知道您可以将gcc用于Intel语法,而不是使用
Now that i know u can use gcc for Intel syntax instead of default at&t with
gcc -S -masm = intel test.c
gcc -S -masm=intel test.c
有这行
mov DWORD PTR [ebp-16],偏移平面:基本
mov DWORD PTR [ebp-16], OFFSET FLAT:base
与 mov dword [ebp-16],基本
相同吗?否则我该怎么办?
Is it the same as mov dword[ebp-16], base
?
Otherwise what must i do?
推荐答案
是的, mov dword [ebp-16],基本
应该没问题.我已经有一段时间没有看过 offset flat:
了-我认为它已经过时了,但这是AT& T提出的 .intel_syntax
想法(我不得不看看Gas的源代码可以找出答案).表示与Masm的 offset
相同,或与Nasm中未经修饰的变量名称相同.
Yes, mov dword [ebp - 16], base
should be fine. I haven't seen offset flat:
for a while - I think it's obsolete, but it's what AT&T's idea of .intel_syntax
used to demand (I had to look at Gas's source code to find that out). Means the same as offset
to Masm, or the unadorned variable name in Nasm.
这篇关于英特尔程序集语法OFFSET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!