Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #422
Difficulty: Medium
C# has support for strongly-typed function pointers via the keyword delegate.
True or False?
Linux & Unix Commands - Search Man Pages

as(1) [bsd man page]

AS(1)							      General Commands Manual							     AS(1)

as - assembler SYNOPSIS
as [ -u ] [ -V ] [ -o objfile ] file ... DESCRIPTION
As assembles the concatenation of the named files. The options are: -u Treat all undefined symbols in the assembly as external globals. -V Produce an object suitable for loading into an automatic text overlaid program. -o Use objfil for the name of the resultant object. If this is omitted, a.out is used. If no errors occurred during the assembly and if there were no unresolved external references, it is made executable. The special file name -- serves two purposes. It signals the end of all options and causes stdin to be read for input. Thus it is now possible to pipe data to the assembler: /lib/cpp -E foo.s | sed -e ';^#;/;' | as -o foo.o -- The file name -- may be placed between normal files, when EOF is detected on stdin the next file in the argument list is opened and read. If no input files are specified then stdin is read. FILES
/tmp/atm1 temporary a.out object SEE ALSO
adb(1), ld(1), nm(1), a.out(5) UNIX Assembler Manual by D. M. Ritchie DIAGNOSTICS
When an input file cannot be read, its name followed by a question mark is typed and assembly ceases. When syntactic or semantic errors occur, a single-character diagnostic is typed out together with the line number and the file name in which it occurred. Errors in pass 1 cause cancellation of pass 2. The possible errors are: ) Parentheses error ] Parentheses error < String not terminated properly * Indirection used illegally . Illegal assignment to `.' a Error in address b Branch instruction is odd or too remote e Error in expression f Error in local (`f' or `b') type symbol g Garbage (unknown) character i End of file inside an if m Multiply defined symbol as label o Word quantity assembled at odd address p `.' different in pass 1 and 2 r Relocation error u Undefined symbol x Syntax error BUGS
Syntax errors can cause incorrect line numbers in following diagnostics. 3rd Berkeley Distribution AS(1)

Check Out this Related Man Page

as(1)							      General Commands Manual							     as(1)

as - assembler SYNOPSIS
as [option]... file OPTIONS
The following options are interpreted by as and have the same meaning in cc(1). Produce no symbol table information for symbolic debug- ging. This is the default. Produce additional symbol table information for accurate but limited symbolic debugging of partially optimized code. Produce additional symbol table information for full symbolic debugging and not do optimizations that limit full symbolic debugging. Produce additional symbol table information for full symbolic debugging for fully optimized code. This option makes the debugger inaccu- rate. Produce a compressed object as output. Performs no optimization. Runs the instruction scheduler and peepholes. Suppress warning messages. Run only the C macro preprocessor and put the result in a file with the suffix of the source file changed to or if the file has no suffix then a i is added to the source file name. The file has no # lines in it. This sets the -cpp option. Run only the C macro pre- processor on the file and send the result to the standard output. This sets the -cpp option. These three options are passed directly to cpp(1). Please see cpp(1) for details. Set the default exception handling runtime procedure descriptor flags (see <pdsc.h>) to the number specified. If you provide a directive in a procedure in your source code, the -eflag option is ignored for that procedure. Name the final output file output. If this option is used, the file a.out is undisturbed. "-Dname" Define the name to the C macro preprocessor, as if by #define. If no definition is given, the name is defined as "1". Remove any initial definition of name. The #include files whose names do not begin with `/' are always sought first in the directory of the file argument, then in directories specified in -I options, and finally in the standard directory (/usr/include). This option will cause #include files never to be searched for in the standard directory (/usr/include). Print the passes as they execute with their arguments and their input and output files. Print the version of the driver and the versions of all passes. This is done with the what(1) command. Run the C macro preprocessor on assembly source files before com- piling. This is the default for as. Do not run the C macro preprocessor on assembly source files before compiling. Select processor-spe- cific instruction tuning for a specific implementation of the Alpha architecture. Tuning for a specific implementation can provide improve- ments in run-time performance. Regardless of the setting of the -tune option, the generated code will run correctly on all implementations of the Alpha architec- ture. Note that code tuned for a specific target may run more slowly on another target than generically-tuned code. The option keyword can be one of the following: Selects instruction tuning that is appropriate for all implementations of the Alpha architecture. This option is the default. Selects instruction tuning that is appropriate for the machine on which the code is being compiled. Selects instruction tuning for the 21064, 21064A, 21066, and 21068 implementations of the Alpha architecture. Selects instruction tuning for the 21164 implementation of the Alpha architecture. The following options are specific for as: Apply the M4 preprocessor to the source file before assembling it. Specifies the location of the m4 preprocessor (when the modifier is m) or cm4defs, the file of predefined macros (when the modifier is d), as the directory direc- tory. The default location for the predefined macros is /usr/opt/svr4/usr/ccs/lib/cm4defs. The options described below primarily aid compiler development and are not generally used: Halt compiling after the pass specified by the character c, producing an intermediate file for the next pass. The c can be a. It selects the assembler pass in the same way as the -t option. If this option is specified, the symbol table file produced and used by the passes is the last component of the source file with the suffix changed to T is added if the source file has no suffix. This file is not removed. Build and use intermediate file names with the last component of the source file's name replacing its suffix with the conventional suffix for the type of file (for example G file for binary assembly language). If the source file has no suffix, the conventional suffix is added to the source file name. These intermediate files are never removed even when a pass encounters a fatal error. Pass the argument[s] argi to the compiler pass[es] c[c..]. The c can be one of [ pab]. The c selects the compiler pass in the same way as the -t option. The options -t[ hpab], -h path, and -Bstring select a name to use for a particular pass. These arguments are processed from left to right so their order is significant. When the -B option is encountered, the selection of names takes place using the last -h and -t options. Therefore, the -B option is always required when using -h or -t. Sets of these options can be used to select any combination of names. Select the names. The names selected are those designated by the characters following the -t option according to the following table: --------------------------------------- Name Character --------------------------------------- include h (see note following table) cpp p as0 a as1 b --------------------------------------- If the character `h' is in the -t argument, a directory is added to the list of directories to be used in searching for #include files. This directory name has the form COMP_TARGET_ROOT/usr/includestring. This directory is to contain the include files for the string release of the compiler. The standard directory is still searched. Use path rather than the directory where the name is normally found. Append string to all names specified by the -t option. If no -t option has been processed before the -B, the -t option is assumed to be "hpab". This list designates all names. Invoking the assembler with a name of the form asstring has the same effect as using a -Bstring option on the command line. If the environment variable COMP_HOST_ROOT is set, the value is used as the root directory for all paths to the pass names other than the default root directory ( /). If the environment variable COMP_TARGET_ROOT is set, the value is used as the root directory for the #include files other than the default root directory (/). If the environment variable ROOTDIR is set, the value is used as the root directory for all names rather than the default /usr/. This also affects the standard directory for #include files, /usr/include. If the environment variable TMPDIR is set, the value is used as the directory to place any temporary files rather than the default /tmp/. Other arguments are ignored. DESCRIPTION
The assembler, as, produces files in the following formats: object code in extended coff format (the normal result) and binary assembly language. The as command never runs the link editor (ld(1)). The as command accepts one type of argument. The argument file is assumed to be a symbolic assembly language source program. It is assembled, producing an object file. The assembler always defines the C preprocessor macros unix, and LANGUAGE_ASSEMBLY to the C macro preprocessor. To see a list of predefined macros, use the -v option. ERRORS
The diagnostics produced by the assembler are intended to be self-explanatory. FILES
object file assembler output temporary C macro preprocessor symbolic to binary assembly language translator binary assembly language assem- bler and reorganizer standard directory for #include files SEE ALSO
Commands: cc(1), what(1) Programmer's Guide, Assembly Language Programmer's Guide as(1)

Featured Tech Videos