www.delorie.com/gnu/docs/binutils/as_29.html   search  
Buy GNU books!

Using as

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]


There are two ways of rendering comments to as. In both cases the comment is equivalent to one space.

Anything from `/*' through the next `*/' is a comment. This means you may not nest these comments.

  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. */

Anything from the line comment character to the next newline is considered a comment and is ignored. The line comment character is `;' for the AMD 29K family; `;' on the ARC; `@' on the ARM; `;' for the H8/300 family; `!' for the H8/500 family; `;' for the HPPA; `#' on the i386 and x86-64; `#' on the i960; `;' for the PDP-11; `;' for picoJava; `;' for Motorola PowerPC; `!' for the Hitachi SH; `!' on the SPARC; `#' on the m32r; `|' on the 680x0; `#' on the 68HC11 and 68HC12; `;' on the M880x0; `#' on the Vax; `!' for the Z8000; `#' on the V850; see 8. Machine Dependent Features.

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.

The V850 assembler also supports a double dash as starting a comment that extends to the end of the line.


To be compatible with past assemblers, lines that begin with `#' have a special interpretation. Following the `#' should be an absolute expression (see section 6. Expressions): the logical line number of the next line. Then a string (see section Strings) is allowed: if present it is a new logical file name. The rest of the line, if any, should be whitespace.

If the first non-whitespace characters on the line are not numeric, the line is ignored. (Just like a comment.)

                          # This is an ordinary comment.
# 42-6 "new_file_name"    # New logical file name
                          # This is logical line # 36.
This feature is deprecated, and may disappear from future versions of as.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003