Introduction
The OS X assembler serves a dual purpose. It assembles the output of gcc
, Xcode’s default compiler, for use by the OS X linker. It also provides the means to assemble custom assembly language code written for its supported platforms.
This document provides a reference for the use of the assembler, including basic syntax and statement layout. It also contains a list of the specific directives recognized by the assembler and complete instruction sets for the PowerPC and i386 processor architectures.
Organization of This Document
This document contains the following chapters:
Using the Assembler describes how to run the assembler and its relevant input/output files. It also discusses specific options that can be passed to the assembler on the command line.
Assembly Language Syntax describes the basic syntax of assembly language elements and expressions.
Assembly Language Statements describes in greater detail the assembly language statements that make up an assembly language program.
Assembler Directives describes assembler directives specific to the OS X assembler and how to use them in your assembly code.
PowerPC Addressing Modes and Assembler Instructions contains information specific to the PowerPC processor architecture and provides a complete list of addressing modes and instructions relevant to it.
i386 Addressing Modes and Assembler Instructions contains information specific to the i386 processor architecture and provides a complete list of addressing modes and instructions relevant to it.
Mode-Independent Macros introduces the macros included in the OS X v10.4 SDK to facilitate the development of assembly code that runs in 32-bit PowerPC and 64-bit PowerPC environments.
This document also contains a revision history, and an index.
Copyright © 2003, 2009 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2009-01-07