JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
SPARC Assembly Language Reference Manual     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information


1.  SPARC Assembler for SunOS 5.x

2.  Assembler Syntax

3.  Executable and Linking Format

4.  Converting Files to the New Format

5.  Instruction-Set Mapping

A.  Pseudo-Operations

B.  Examples of Pseudo-Operations

C.  Using the Assembler Command Line

D.  An Example Language Program

E.  SPARC-V9 Instruction Set



The SunOS assembler that runs on the SPARC operating environment, referred to as the “SunOS SPARC” 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 SPARC 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 SPARC instruction set. The assembler may also be used in connection with SunOS 5.x 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

You should also become familiar with the following:

How This Book is Organized

This book is organized as follows:

Chapter 1, SPARC Assembler for SunOS 5.x discusses features of the SunOS 5.x SPARC Assembler.

Chapter 2, Assembler Syntax describes the syntax of the SPARC assembler that takes assembly programs and produces relocatable object files for processing by the link editor.

Chapter 3, Executable and Linking Format describes the relocatable ELF files that hold code and data suitable for linking with other object files.

Chapter 4, Converting Files to the New Format describes how to convert existing SunOS 4.1 SPARC assembly files to the SunOS 5.x assembly file format.

Chapter 5, Instruction-Set Mapping describes the relationship between hardware instructions of the SPARC architecture and the assembly language instruction set.

Appendix A, Pseudo-Operations lists the pseudo-operations supported by the SPARC assembler.

Appendix B, Examples of Pseudo-Operations shows some examples of ways to use various pseudo-operations.

Appendix C, Using the Assembler Command Line describes the available assembler command-line options.

Appendix D, An Example Language Program describes an example C language program with comments to show correspondence between the assembly code and the C code.

Appendix E, SPARC-V9 Instruction Set describes the SPARC-V9 instruction set and the changes due to the SPARC-V9 implementation.

Documentation, Support, and Training

See the following web sites for additional resources:

Oracle Software Resources

Oracle Technology Network offers a range of resources related to Oracle software:

Typographic Conventions

The following table describes the typographic conventions that are used in this book.

Table P-1 Typographic Conventions

The names of commands, files, and directories, and onscreen computer output
Edit your .login file.

Use ls -a to list all files.

machine_name% you have mail.

What you type, contrasted with onscreen computer output
machine_name% su


Placeholder: replace with a real name or value
The command to remove a file is rm filename.
Book titles, new terms, and terms to be emphasized
Read Chapter 6 in the User's Guide.

A cache is a copy that is stored locally.

Do not save the file.

Note: Some emphasized items appear bold online.

Shell Prompts in Command Examples

The following table shows the default UNIX system prompt and superuser prompt for shells that are included in the Oracle Solaris OS. Note that the default system prompt that is displayed in command examples varies, depending on the Oracle Solaris release.

Table P-2 Shell Prompts

Bash shell, Korn shell, and Bourne shell
Bash shell, Korn shell, and Bourne shell for superuser
C shell
C shell for superuser