Reference Guide
16 Chapter 1
Introduction to PA-RISC Assembly Language
Assembler Features
• Expressions. Arithmetic expressions can be formed from symbolic
addresses and constants, integer constants, and arithmetic operators.
Expressions involving only symbolic and integer constants, or the
difference between two relocatable symbols, defined in the current
module, are called absolute expressions. They can be used wherever
an integer constant can be used. Expressions involving the sum or
difference of a symbolic address and an absolute expression are called
relocatable expressions or address expressions. The constant part of
an expression, the part that does not refer to relocatable expressions,
can use parenthesized subexpressions to alter operator precedence.
• Storage Allocation. In addition to encoding machine language
instructions symbolically, storage may be initialized to constant
values or simply reserved. Symbolic addresses and labels can be
associated with these memory locations.
• Symbol Scope. When two or more object files are to be combined by
the linker, certain symbolic addresses can be defined in one module
and used in another. Such symbols must be exported from the defining
module and imported into the using module. In the defining module,
the symbol has universal scope, while in the using module, the symbol
is unsatisfied. Other symbols declared in the source program that are
not exported have local scope.
• Subspaces and Location Counters. You can organize code and
data into separate subspaces, and into separate location counters
within each subspace. The programmer can move among the
subspaces and location counters, while the Assembler changes the
code and data into the correct order. In 64-bit mode, however, the
Executable and Linking Format (ELF) uses segments and sections
rather than spaces and subspaces.
• Macro Processing. A macro is a user-defined word, which is
replaced by a sequence of instructions. Including a macro in a source
program causes the sequence of instructions to be inserted into the
program wherever the macro appears.