Intel assembly syntax OFFSET

别说谁变了你拦得住时间么 提交于 2020-12-01 10:46:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!