blob: 1bb00879c142644f40554a86930768ad4e913593 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This file documents the GNU Assembler "as".
Copyright (C) 1991-2013 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".
-->
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Using as: a</title>
<meta name="description" content="Using as: a">
<meta name="keywords" content="Using as: a">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Invoking.html#Invoking" rel="up" title="Invoking">
<link href="alternate.html#alternate" rel="next" title="alternate">
<link href="Invoking.html#Invoking" rel="prev" title="Invoking">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="a"></a>
<div class="header">
<p>
Next: <a href="alternate.html#alternate" accesskey="n" rel="next">alternate</a>, Up: <a href="Invoking.html#Invoking" accesskey="u" rel="up">Invoking</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Enable-Listings_003a-_002da_005bcdghlns_005d"></a>
<h3 class="section">2.1 Enable Listings: <samp>-a[cdghlns]</samp></h3>
<a name="index-_002da"></a>
<a name="index-_002dac"></a>
<a name="index-_002dad"></a>
<a name="index-_002dag"></a>
<a name="index-_002dah"></a>
<a name="index-_002dal"></a>
<a name="index-_002dan"></a>
<a name="index-_002das"></a>
<a name="index-listings_002c-enabling"></a>
<a name="index-assembly-listings_002c-enabling"></a>
<p>These options enable listing output from the assembler. By itself,
&lsquo;<samp>-a</samp>&rsquo; requests high-level, assembly, and symbols listing.
You can use other letters to select specific options for the list:
&lsquo;<samp>-ah</samp>&rsquo; requests a high-level language listing,
&lsquo;<samp>-al</samp>&rsquo; requests an output-program assembly listing, and
&lsquo;<samp>-as</samp>&rsquo; requests a symbol table listing.
High-level listings require that a compiler debugging option like
&lsquo;<samp>-g</samp>&rsquo; be used, and that assembly listings (&lsquo;<samp>-al</samp>&rsquo;) be requested
also.
</p>
<p>Use the &lsquo;<samp>-ag</samp>&rsquo; option to print a first section with general assembly
information, like as version, switches passed, or time stamp.
</p>
<p>Use the &lsquo;<samp>-ac</samp>&rsquo; option to omit false conditionals from a listing. Any lines
which are not assembled because of a false <code>.if</code> (or <code>.ifdef</code>, or any
other conditional), or a true <code>.if</code> followed by an <code>.else</code>, will be
omitted from the listing.
</p>
<p>Use the &lsquo;<samp>-ad</samp>&rsquo; option to omit debugging directives from the
listing.
</p>
<p>Once you have specified one of these options, you can further control
listing output and its appearance using the directives <code>.list</code>,
<code>.nolist</code>, <code>.psize</code>, <code>.eject</code>, <code>.title</code>, and
<code>.sbttl</code>.
The &lsquo;<samp>-an</samp>&rsquo; option turns off all forms processing.
If you do not request listing output with one of the &lsquo;<samp>-a</samp>&rsquo; options, the
listing-control directives have no effect.
</p>
<p>The letters after &lsquo;<samp>-a</samp>&rsquo; may be combined into one option,
<em>e.g.</em>, &lsquo;<samp>-aln</samp>&rsquo;.
</p>
<p>Note if the assembler source is coming from the standard input (e.g.,
because it
is being created by <code>gcc</code> and the &lsquo;<samp>-pipe</samp>&rsquo; command line switch
is being used) then the listing will not contain any comments or preprocessor
directives. This is because the listing code buffers input source lines from
stdin only after they have been preprocessed by the assembler. This reduces
memory usage and makes the code more efficient.
</p>
<hr>
<div class="header">
<p>
Next: <a href="alternate.html#alternate" accesskey="n" rel="next">alternate</a>, Up: <a href="Invoking.html#Invoking" accesskey="u" rel="up">Invoking</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>