x86 Assembly Language Reference Manual


This preface is a brief description of the SunOSTM assembler that runs on x86. This preface also includes a list of documents that can be used for reference.

The SunOS assembler that runs on x86, referred to as the "SunOS x86" in this manual, translates source files that are in assembly language format into object files in linking format.

In the program development process, the assembler is a tool to use in producing program modules intended to exploit features of the Intel® architecture in ways that cannot be easily done using high level languages and their compilers.

Whether assembly language is chosen for the development of program modules depends on the extent to which and the ease with which the language allows the programmer to control the architectural features of the processor.

The assembly language described in this manual offers full direct access to the x86 instruction set. The assembler may also be used in connection with SunOS 5.1 macro preprocessors to achieve full macro-assembler capability. Furthermore, the assembler responds to directives that allow the programmer direct control over the contents of the relocatable object file.

This document describes the language in which the source files must be written. The nature of the machine mnemonics governs the way in which the program's executable portion is written. This document includes descriptions of the pseudo operations that allow control over the object file. This facilitates the development of programs that are easy to understand and maintain.

Before You Read This Book

Use the following documents as references:

You should also become familiar with the following:

How This Book Is Organized

This document is organized into the following chapters:

Chapter 1, Assembler Input describes the overall structure required by the assembler for input source files.

Chapter 2, Instruction-Set Mapping describes the instruction set mappings for the SunOS x86 processor.

Chapter 3, Assembler Output provides an overview of ELF (Executable and Linking Format) for the relocatable object files produced by the assembler.

Appendix A, Using the Assembler Command Line describes the assembler command line options.

What Typographic Changes Mean

The following table describes the typographic changes used in this book.

Typeface or Symbol 




The names of commands, files, and directories; on-screen computer output 

Edit your .login file.

Use ls -a to list all files.

machine_name% You have mail.


What you type, contrasted with on-screen computer output 

machine_name% su


Command-line placeholder: 

replace with a real name or value 

To delete a file, type rm filename.


Book titles, new words or terms, or words to be emphasized 

Read Chapter 6 in User's Guide. These are called class options.

You must be root to do this.

Shell Prompts in Command Examples

The following table shows the default system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell.



C shell prompt 


C shell superuser prompt 


Bourne shell and Korn shell prompt 


Bourne shell and Korn shell superuser prompt