问题
Now that i know u can use gcc for Intel syntax instead of default at&t with
gcc -S -masm=intel test.c
There is this line
mov DWORD PTR [ebp-16], OFFSET FLAT:base
Is it the same as mov dword[ebp-16], base
?
Otherwise what must i do?
回答1:
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.
来源:https://stackoverflow.com/questions/13192353/intel-assembly-syntax-offset