| <html lang="en"> |
| <head> |
| <title>Comments - Using as</title> |
| <meta http-equiv="Content-Type" content="text/html"> |
| <meta name="description" content="Using as"> |
| <meta name="generator" content="makeinfo 4.13"> |
| <link title="Top" rel="start" href="index.html#Top"> |
| <link rel="up" href="Syntax.html#Syntax" title="Syntax"> |
| <link rel="prev" href="Whitespace.html#Whitespace" title="Whitespace"> |
| <link rel="next" href="Symbol-Intro.html#Symbol-Intro" title="Symbol Intro"> |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> |
| <!-- |
| This file documents the GNU Assembler "as". |
| |
| Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 2000, 2001, 2002, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| |
| Permission is granted to copy, distribute and/or modify this document |
| under the terms of the GNU Free Documentation License, Version 1.3 |
| or any later version published by the Free Software Foundation; |
| with no Invariant Sections, with no Front-Cover Texts, and with no |
| Back-Cover Texts. A copy of the license is included in the |
| section entitled ``GNU Free Documentation License''. |
| |
| --> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <style type="text/css"><!-- |
| pre.display { font-family:inherit } |
| pre.format { font-family:inherit } |
| pre.smalldisplay { font-family:inherit; font-size:smaller } |
| pre.smallformat { font-family:inherit; font-size:smaller } |
| pre.smallexample { font-size:smaller } |
| pre.smalllisp { font-size:smaller } |
| span.sc { font-variant:small-caps } |
| span.roman { font-family:serif; font-weight:normal; } |
| span.sansserif { font-family:sans-serif; font-weight:normal; } |
| --></style> |
| <link rel="stylesheet" type="text/css" href="../cs.css"> |
| </head> |
| <body> |
| <div class="node"> |
| <a name="Comments"></a> |
| <p> |
| Next: <a rel="next" accesskey="n" href="Symbol-Intro.html#Symbol-Intro">Symbol Intro</a>, |
| Previous: <a rel="previous" accesskey="p" href="Whitespace.html#Whitespace">Whitespace</a>, |
| Up: <a rel="up" accesskey="u" href="Syntax.html#Syntax">Syntax</a> |
| <hr> |
| </div> |
| |
| <h3 class="section">3.3 Comments</h3> |
| |
| <p><a name="index-comments-123"></a>There are two ways of rendering comments to <samp><span class="command">as</span></samp>. In both |
| cases the comment is equivalent to one space. |
| |
| <p>Anything from ‘<samp><span class="samp">/*</span></samp>’ through the next ‘<samp><span class="samp">*/</span></samp>’ is a comment. |
| This means you may not nest these comments. |
| |
| <pre class="smallexample"> /* |
| The only way to include a newline ('\n') in a comment |
| is to use this sort of comment. |
| */ |
| |
| /* This sort of comment does not nest. */ |
| </pre> |
| <p><a name="index-line-comment-character-124"></a>Anything from the <dfn>line comment</dfn> character to the next newline |
| is considered a comment and is ignored. The line comment character is |
| ‘<samp><span class="samp">;</span></samp>’ on the ARC; |
| ‘<samp><span class="samp">@</span></samp>’ on the ARM; |
| ‘<samp><span class="samp">;</span></samp>’ for the H8/300 family; |
| ‘<samp><span class="samp">;</span></samp>’ for the HPPA; |
| ‘<samp><span class="samp">#</span></samp>’ on the i386 and x86-64; |
| ‘<samp><span class="samp">#</span></samp>’ on the i960; |
| ‘<samp><span class="samp">;</span></samp>’ for the PDP-11; |
| ‘<samp><span class="samp">;</span></samp>’ for picoJava; |
| ‘<samp><span class="samp">#</span></samp>’ for Motorola PowerPC; |
| ‘<samp><span class="samp">#</span></samp>’ for IBM S/390; |
| ‘<samp><span class="samp">#</span></samp>’ for the Sunplus SCORE; |
| ‘<samp><span class="samp">!</span></samp>’ for the Renesas / SuperH SH; |
| ‘<samp><span class="samp">!</span></samp>’ on the SPARC; |
| ‘<samp><span class="samp">#</span></samp>’ on the ip2k; |
| ‘<samp><span class="samp">#</span></samp>’ on the m32c; |
| ‘<samp><span class="samp">#</span></samp>’ on the m32r; |
| ‘<samp><span class="samp">|</span></samp>’ on the 680x0; |
| ‘<samp><span class="samp">#</span></samp>’ on the 68HC11 and 68HC12; |
| ‘<samp><span class="samp">#</span></samp>’ on the RX; |
| ‘<samp><span class="samp">;</span></samp>’ on the TMS320C6X; |
| ‘<samp><span class="samp">#</span></samp>’ on the Vax; |
| ‘<samp><span class="samp">;</span></samp>’ for the Z80; |
| ‘<samp><span class="samp">!</span></samp>’ for the Z8000; |
| ‘<samp><span class="samp">#</span></samp>’ on the V850; |
| ‘<samp><span class="samp">#</span></samp>’ for Xtensa systems; |
| see <a href="Machine-Dependencies.html#Machine-Dependencies">Machine Dependencies</a>. |
| <!-- FIXME What about i860? --> |
| |
| <p>On some machines there are two different line comment characters. One |
| character only begins a comment if it is the first non-whitespace character on |
| a line, while the other always begins a comment. |
| |
| <p>The V850 assembler also supports a double dash as starting a comment that |
| extends to the end of the line. |
| |
| <p>‘<samp><span class="samp">--</span></samp>’; |
| |
| <p><a name="index-g_t_0023-125"></a><a name="index-lines-starting-with-_0040code_007b_0023_007d-126"></a><a name="index-logical-line-numbers-127"></a>To be compatible with past assemblers, lines that begin with ‘<samp><span class="samp">#</span></samp>’ have a |
| special interpretation. Following the ‘<samp><span class="samp">#</span></samp>’ should be an absolute |
| expression (see <a href="Expressions.html#Expressions">Expressions</a>): the logical line number of the <em>next</em> |
| line. Then a string (see <a href="Strings.html#Strings">Strings</a>) is allowed: if present it is a |
| new logical file name. The rest of the line, if any, should be whitespace. |
| |
| <p>If the first non-whitespace characters on the line are not numeric, |
| the line is ignored. (Just like a comment.) |
| |
| <pre class="smallexample"> # This is an ordinary comment. |
| # 42-6 "new_file_name" # New logical file name |
| # This is logical line # 36. |
| </pre> |
| <p>This feature is deprecated, and may disappear from future versions |
| of <samp><span class="command">as</span></samp>. |
| |
| </body></html> |
| |