Go to main content

x86 Assembly Language Reference Manual

Exit Print View

Updated: November 2020
 
 

Using the Assembler Command Line

This appendix describes how to invoke the assembler and its options from the command line.

A.1 Assembler Command Line

You invoke the assembler command line as follows:

as [options] [inputfile] ... 

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

The as command translates the assembly language source files, inputfile, into an executable object file, objfile. The 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 assembler prints the error (including a synopsis of the command line syntax and options) to standard error output, and then terminates.

The assembler supports macros, #include files, and symbolic substitution through use of the C preprocessor cpp(1). The assembler invokes the preprocessor before assembly begins if the –P option has been specified from the command line.