Commenting syntax for x86 AT&T syntax assembly

前端 未结 3 683
别那么骄傲
别那么骄傲 2021-01-02 05:52

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

3条回答
  •  情书的邮戳
    2021-01-02 06:25

    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.

提交回复
热议问题