📄 input-files.html
字号:
<html lang="en">
<head>
<title>Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.3">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
</head>
<body>
<div class="node">
<p>
Node:<a name="Input%20Files">Input Files</a>,
Next:<a rel="next" accesskey="n" href="Object.html#Object">Object</a>,
Previous:<a rel="previous" accesskey="p" href="Command-Line.html#Command%20Line">Command Line</a>,
Up:<a rel="up" accesskey="u" href="Overview.html#Overview">Overview</a>
<hr><br>
</div>
<h3 class="section">Input Files</h3>
<p>We use the phrase <dfn>source program</dfn>, abbreviated <dfn>source</dfn>, to
describe the program input to one run of <code>as</code>. The program may
be in one or more files; how the source is partitioned into files
doesn't change the meaning of the source.
<p>The source program is a concatenation of the text in all the files, in the
order specified.
<p>Each time you run <code>as</code> it assembles exactly one source
program. The source program is made up of one or more files.
(The standard input is also a file.)
<p>You give <code>as</code> a command line that has zero or more input file
names. The input files are read (from left file name to right). A
command line argument (in any position) that has no special meaning
is taken to be an input file name.
<p>If you give <code>as</code> no file names it attempts to read one input file
from the <code>as</code> standard input, which is normally your terminal. You
may have to type <ctl-D> to tell <code>as</code> there is no more program
to assemble.
<p>Use <code>--</code> if you need to explicitly name the standard input file
in your command line.
<p>If the source is empty, <code>as</code> produces a small, empty object
file.
<h4 class="subheading">Filenames and Line-numbers</h4>
<p>There are two ways of locating a line in the input file (or files) and
either may be used in reporting error messages. One way refers to a line
number in a physical file; the other refers to a line number in a
"logical" file. See <a href="Errors.html#Errors">Error and Warning Messages</a>.
<p><dfn>Physical files</dfn> are those files named in the command line given
to <code>as</code>.
<p><dfn>Logical files</dfn> are simply names declared explicitly by assembler
directives; they bear no relation to physical files. Logical file names help
error messages reflect the original source file, when <code>as</code> source
is itself synthesized from other files. <code>as</code> understands the
<code>#</code> directives emitted by the <code>gcc</code> preprocessor. See also
<a href="File.html#File"><code>.file</code></a>.
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -