Go to main content

SPARC Assembly Language Reference Manual

Exit Print View

Updated: October 2017

Using the Assembler Command Line

A.1 Assembler Command Line

You invoke the assembler command line as follows:

as [options] [inputfile] ... 

Note -  The Oracle Solaris Studio C, C++, and Fortran compilers (cc(1), CC(1), and f95(1)) invoke the assembler with the fbe command. You can use either the as or fbe command on a Oracle Solaris SPARC platform to invoke the SPARC assembler. (Note that the as or fbe command will invoke the x86 assembler on a Solaris x86 platform.)

The as command translates the assembly language source files, inputfile, into an executable object file, objfile. The SPARC assembler recognizes the filename argument hyphen (-) as the standard input. It accepts more than one file name on the command line. The input file is the concatenation of all the specified files. If an invalid option is given or the command line contains a syntax error, the SPARC assembler prints the error (including a synopsis of the command line syntax and options) to standard error output, and then terminates.

The SPARC assembler supports macros, #include files, and symbolic substitution through use of the C preprocessor cpp. The assembler invokes the preprocessor before assembly begins if it has been specified from the command line as an option. See the -P option.