x86 AT& T语法汇编的注释语法 [英] Commenting syntax for x86 AT&T syntax assembly
本文介绍了x86 AT& T语法汇编的注释语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Intel语法使用分号进行注释.当我切换到AT& T时,它实际上试图解释这些注释.
The Intel syntax has comments using the semicolon. When I switched to AT&T, it actually tried to interpret the comments.
AT& T汇编的注释语法是什么?
What is the comment syntax for AT&T assembly?
推荐答案
at& t汇编程序的注释是:
Comments for at&t assembler are:
# this is a comment
/* this is a comment */
//
和/* */
注释仅在.S
文件中受支持,因为GCC在组装之前会对它们运行C预处理程序.对于.s
文件,对于x86,实际的汇编程序本身(as
)仅将#
作为注释字符处理.
//
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.
对于其他一些ISA,GAS使用其他注释字符,例如@
用于ARM.
For some other ISAs, GAS uses other comment characters, for example @
for ARM.
这篇关于x86 AT& T语法汇编的注释语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文