1AS(1) General Commands Manual AS(1)
2
3
4
6 as - assembler
7
9 as [ -u ] [ -V ] [ -o objfile ] file ...
10
12 As assembles the concatenation of the named files. The options are:
13
14 -u Treat all undefined symbols in the assembly as external globals.
15
16 -V Produce an object suitable for loading into an automatic text
17 overlaid program.
18
19 -o Use objfil for the name of the resultant object. If this is
20 omitted, a.out is used. If no errors occurred during the assem‐
21 bly and if there were no unresolved external references, it is
22 made executable.
23
24 The special file name -- serves two purposes. It signals the end of
25 all options and causes stdin to be read for input. Thus it is now pos‐
26 sible to pipe data to the assembler:
27
28 /lib/cpp -E foo.s | sed -e ';^#;/;' | as -o foo.o --
29
30 The file name -- may be placed between normal files, when EOF is
31 detected on stdin the next file in the argument list is opened and
32 read.
33
34 If no input files are specified then stdin is read.
35
37 /tmp/atm1 temporary
38 a.out object
39
41 adb(1), ld(1), nm(1), a.out(5)
42 UNIX Assembler Manual by D. M. Ritchie
43
45 When an input file cannot be read, its name followed by a question mark
46 is typed and assembly ceases. When syntactic or semantic errors occur,
47 a single-character diagnostic is typed out together with the line num‐
48 ber and the file name in which it occurred. Errors in pass 1 cause
49 cancellation of pass 2. The possible errors are:
50
51 ) Parentheses error
52 ] Parentheses error
53 < String not terminated properly
54 * Indirection used illegally
55 . Illegal assignment to `.'
56 a Error in address
57 b Branch instruction is odd or too remote
58 e Error in expression
59 f Error in local (`f' or `b') type symbol
60 g Garbage (unknown) character
61 i End of file inside an if
62 m Multiply defined symbol as label
63 o Word quantity assembled at odd address
64 p `.' different in pass 1 and 2
65 r Relocation error
66 u Undefined symbol
67 x Syntax error
68
70 Syntax errors can cause incorrect line numbers in following diagnos‐
71 tics.
72
73
74
753rd Berkeley Distribution AS(1)