115 lines
		
	
	
	
		
			5.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
		
		
			
		
	
	
			115 lines
		
	
	
	
		
			5.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| 
								 | 
							
								<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.7">
							 | 
						||
| 
								 | 
							
								<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, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002,
							 | 
						||
| 
								 | 
							
								2006, 2007 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.1
							 | 
						||
| 
								 | 
							
								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''.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								man end-->
							 | 
						||
| 
								 | 
							
								<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; } 
							 | 
						||
| 
								 | 
							
								--></style>
							 | 
						||
| 
								 | 
							
								</head>
							 | 
						||
| 
								 | 
							
								<body>
							 | 
						||
| 
								 | 
							
								<div class="node">
							 | 
						||
| 
								 | 
							
								<p>
							 | 
						||
| 
								 | 
							
								<a name="Comments"></a>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><br>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<h3 class="section">3.3 Comments</h3>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<p><a name="index-comments-123"></a>There are two ways of rendering comments to <span class="command">as</span>.  In both
							 | 
						||
| 
								 | 
							
								cases the comment is equivalent to one space.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								   <p>Anything from <span class="samp">/*</span> through the next <span class="samp">*/</span> 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
							 | 
						||
| 
								 | 
							
								<span class="samp">;</span> on the ARC;
							 | 
						||
| 
								 | 
							
								<span class="samp">@</span> on the ARM;
							 | 
						||
| 
								 | 
							
								<span class="samp">;</span> for the H8/300 family;
							 | 
						||
| 
								 | 
							
								<span class="samp">;</span> for the HPPA;
							 | 
						||
| 
								 | 
							
								<span class="samp">#</span> on the i386 and x86-64;
							 | 
						||
| 
								 | 
							
								<span class="samp">#</span> on the i960;
							 | 
						||
| 
								 | 
							
								<span class="samp">;</span> for the PDP-11;
							 | 
						||
| 
								 | 
							
								<span class="samp">;</span> for picoJava;
							 | 
						||
| 
								 | 
							
								<span class="samp">#</span> for Motorola PowerPC;
							 | 
						||
| 
								 | 
							
								<span class="samp">!</span> for the Renesas / SuperH SH;
							 | 
						||
| 
								 | 
							
								<span class="samp">!</span> on the SPARC;
							 | 
						||
| 
								 | 
							
								<span class="samp">#</span> on the ip2k;
							 | 
						||
| 
								 | 
							
								<span class="samp">#</span> on the m32c;
							 | 
						||
| 
								 | 
							
								<span class="samp">#</span> on the m32r;
							 | 
						||
| 
								 | 
							
								<span class="samp">|</span> on the 680x0;
							 | 
						||
| 
								 | 
							
								<span class="samp">#</span> on the 68HC11 and 68HC12;
							 | 
						||
| 
								 | 
							
								<span class="samp">#</span> on the Vax;
							 | 
						||
| 
								 | 
							
								<span class="samp">;</span> for the Z80;
							 | 
						||
| 
								 | 
							
								<span class="samp">!</span> for the Z8000;
							 | 
						||
| 
								 | 
							
								<span class="samp">#</span> on the V850;
							 | 
						||
| 
								 | 
							
								<span class="samp">#</span> 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><span class="samp">--</span>;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								   <p><a name="index-_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 <span class="samp">#</span> have a
							 | 
						||
| 
								 | 
							
								special interpretation.  Following the <span class="samp">#</span> 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 <span class="command">as</span>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								   </body></html>
							 | 
						||
| 
								 | 
							
								
							 |