Commenting syntax for x86 AT&T syntax assembly

这一生的挚爱 提交于 2020-08-18 14:10:48

问题


The Intel syntax has comments using the semicolon. When I switched to AT&T, it actually tried to interpret the comments.

What is the comment syntax for AT&T assembly?


回答1:


Comments for at&t assembler are:

 # this is a comment
 /* this is a comment */

According to the fourth result Google gave me

// and /* */ comments are only supported in .S files because GCC runs the C preprocessor on them before assembling. For .s files, the actual assembler itself (as) only handles # as a comment character, for x86.

For some other ISAs, GAS uses other comment characters, for example @ for ARM.



来源:https://stackoverflow.com/questions/17442444/commenting-syntax-for-x86-att-syntax-assembly

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