toolchain/share/doc/as.html/a.html

91 lines
4.8 KiB
HTML
Raw Permalink Normal View History

2024-01-10 05:24:32 +00:00
<html lang="en">
<head>
<title>a - 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="Invoking.html#Invoking" title="Invoking">
<link rel="next" href="alternate.html#alternate" title="alternate">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991-2019 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>
</head>
<body>
<div class="node">
<a name="a"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="alternate.html#alternate">alternate</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Invoking.html#Invoking">Invoking</a>
<hr>
</div>
<h3 class="section">2.1 Enable Listings: <samp><span class="option">-a[cdghlns]</span></samp></h3>
<p><a name="index-g_t_002da-47"></a><a name="index-g_t_002dac-48"></a><a name="index-g_t_002dad-49"></a><a name="index-g_t_002dag-50"></a><a name="index-g_t_002dah-51"></a><a name="index-g_t_002dal-52"></a><a name="index-g_t_002dan-53"></a><a name="index-g_t_002das-54"></a><a name="index-listings_002c-enabling-55"></a><a name="index-assembly-listings_002c-enabling-56"></a>
These options enable listing output from the assembler. By itself,
&lsquo;<samp><span class="samp">-a</span></samp>&rsquo; requests high-level, assembly, and symbols listing.
You can use other letters to select specific options for the list:
&lsquo;<samp><span class="samp">-ah</span></samp>&rsquo; requests a high-level language listing,
&lsquo;<samp><span class="samp">-al</span></samp>&rsquo; requests an output-program assembly listing, and
&lsquo;<samp><span class="samp">-as</span></samp>&rsquo; requests a symbol table listing.
High-level listings require that a compiler debugging option like
&lsquo;<samp><span class="samp">-g</span></samp>&rsquo; be used, and that assembly listings (&lsquo;<samp><span class="samp">-al</span></samp>&rsquo;) be requested
also.
<p>Use the &lsquo;<samp><span class="samp">-ag</span></samp>&rsquo; option to print a first section with general assembly
information, like as version, switches passed, or time stamp.
<p>Use the &lsquo;<samp><span class="samp">-ac</span></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>Use the &lsquo;<samp><span class="samp">-ad</span></samp>&rsquo; option to omit debugging directives from the
listing.
<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><span class="samp">-an</span></samp>&rsquo; option turns off all forms processing.
If you do not request listing output with one of the &lsquo;<samp><span class="samp">-a</span></samp>&rsquo; options, the
listing-control directives have no effect.
<p>The letters after &lsquo;<samp><span class="samp">-a</span></samp>&rsquo; may be combined into one option,
<em>e.g.</em>, &lsquo;<samp><span class="samp">-aln</span></samp>&rsquo;.
<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><span class="samp">-pipe</span></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.
</body></html>