x86 Assembly Language Reference Manual

Chapter 1 Overview of the Solaris x86 Assembler

This chapter provides a brief overview of the Solaris x86 assembler as. This chapter discusses the following topics:

Assembler Overview

The Solaris x86 assembler as translates Solaris x86 assembly language into Executable and Linking Format (ELF) relocatable object files that can be linked with other object files to create an executable file or a shared object file. (See Chapter 7, Object File Format, in Linker and Libraries Guide, for a complete discussion of ELF object file format.) The assembler supports macro processing by the C preprocessor (cpp) or the m4 macro processor. The assembler supports the instruction sets of the following CPUs:

Intel 8086/8088 processors 

Intel 286 processor 

Intel386 processor 

Intel486 processor 

Intel Pentium processor 

Intel Pentium Pro processor 

Intel Pentium II processor 

Pentium II Xeon processor 

Intel Celeron processor 

Intel Pentium III processor 

Pentium III Xeon processor 

Advanced Micro Devices Athlon processor 

Advanced Micro Devices Opteron processor 

Syntax Differences Between x86 Assemblers

There is no standard assembly language for the x86 architecture. Vendor implementations of assemblers for the x86 architecture instruction sets differ in syntax and functionality. The syntax of the Solaris x86 assembler is compatible with the syntax of the assembler distributed with earlier releases of the UNIX operating system (this syntax is sometimes termed “AT&T syntax”). Developers familiar with other assemblers derived from the original UNIX assemblers, such as the Free Software Foundation's gas, will find the syntax of the Solaris x86 assembler very straightforward.

However, the syntax of x86 assemblers distributed by Intel and Microsoft (sometimes termed “Intel syntax”) differs significantly from the syntax of the Solaris x86 assembler. These differences are most pronounced in the handling of instruction operands:

See Chapter 2, Solaris x86 Assembly Language Syntax for additional differences between x86 assemblers.

Assembler Command Line

During the translation of higher-level languages such as C and Fortran, the compilers might invoke as using the alias fbe (“Fortran back end”). You can invoke the assembler manually from the shell command line with either name, as or fbe. See the as(1) man page for the definitive discussion of command syntax and command line options.