92432-90012 June
HP 9000 Computers
Hanover Street Palo Alto, California
Legal Notices
Restricted Rights Legend
Contents
Assembler Directives and Pseudo-Operations
Contents
Contents
Contents
Contents
Pseudo-Instruction Set Assembling Your Program
Index
Diagnostic Messages
Programming Examples
Edition Date Software Version
Preface
Printing History
Related Documentation
Audience
This Manual
Typographical Conventions
Summary of Technical Changes for HP-UX
Assembler Features
Assembly Language
Assembler Features
Chapter
Summary of Changes for PA-RISC
Summary of Changes for PA-RISC 2.0W Wide Mode, 64-bit
Summary of Changes for PA-RISC
Summary of Changes for PA-RISC 2.0W Wide Mode, 64-bit
Program Structure
Label Opcode Operands Comments
Program Structure
Symbols and Constants
Symbols and Constants
Integer Constants Signed Unsigned
Registers and Register Mnemonics
Registers and Register Mnemonics
Registers by using an L or R suffix
General Registers
Single-Precision Floating-Point Registers
Control Registers Synonyms
Double-Precision Floating-Point Registers
Space Registers
Register Synonyms Description
Register Procedure Calling Conventions
Operator Operation
Expressions
Expressions
Standard Arithmetic Operators
Legal Combinations For Relocatable Terms Operation Result
Available Field Selectors Meaning
Field Meaning Selector
Multiple of 2048 allows a three-instruction sequence
Parenthesized Subexpressions
Operands and Completers
Operands and Completers
Addi
Macro Processing
Macro Processing
Defining New Instructions With Macros
Contains general register 19, or binary 10011. These
Spaces
HP-UX Architecture Conventions
Spaces
Memory Layout on HP-UX Sr4 Sr5 Sr6
Subspaces
Subspaces
Attributes
Space Subspace Sort Key Use
Directives
Standard Subspaces and Sort Keys
Sections in 64-bit Mode
Sections in 64-bit Mode
$INIT$
Location Counters
Location Counters
Compiler Conventions
Compiler Conventions
Compiler Conventions
Global Symbol Usage
Mfctl
Shared Libraries
Assembly Listing
Shared Libraries
Assembly Listing
Directive Function
Introduction
Assembler Directives
Requests common storage for a specified number Bytes
Pseudo-Operations Directive Function
Reserves 16 bits a half word of storage
Example
Align Directive
Syntax
Parameters
Allow Directive
Allow Directive
Discussion
To the .LEVEL specified for the file
Block and .BLOCKZ Pseudo-Operations
Block and .BLOCKZ Pseudo-Operations
Space $TEXT$ Subspa $CODE$ Block
Byte initvalue , initvalue
Byte Pseudo-Operation
Byte Pseudo-Operation
Call argumentdescription argumentdescription
Call Directive
Call Directive
Second word in the argument list
Form of argument-description is Arg=location Where arg can
Return value for a procedure
first word in the argument list
LIT Align Word
Procend Export
Callinfo parameter , parameter
Callinfo Directive
Callinfo Directive
Register
ENTRYSR=
Unwound
It restores the RP value when it encounters a .LEAVE
Callinfo Directive Stack Frames
Re-enter code subspace
Label Labels the location of the reserved storage
Comm Directive
Comm Directive
Label .COMM numbytes
Company-name
Copyright Directive
Copyright Directive
Proc Callinfo Enter
Double Pseudo-Operation
Integer .fraction E power
Fraction E power
Double Pseudo-Operation
Dword initvalue , initvalue
Dword Pseudo-Operation
Dword Pseudo-Operation
END Directive
END Directive
Endm Directive
Endm Directive
Enter and .LEAVE Pseudo-Operations
Enter and .LEAVE Pseudo-Operations
Space $TEXT$
Entry and .EXIT Directives
Entry and .EXIT Directives
Value
Symbolicname .EQU value
EQU Directive
EQU Directive
Export Directive
Export Directive
Argument
Export proc,ENTRY,ARGW0=GR
Float Pseudo-Operation
Float Pseudo-Operation
Half initvalue , initvalue
Half Pseudo-Operation
Half Pseudo-Operation
Import Directive
Import Directive
NOP END
Labelid Names the label identifier
Label Directive
Label Directive
Label labelid
Level Directive
Level Directive
Level Directive
Listoff and .LISTON Directives
Listoff and .LISTON Directives
Liston Code Space $TEXT$ SPNUM=0,SORT=0 Subspa $CODE$
Locct Directive
Locct Directive
Label .MACRO formalparameter,formalparameter
Macro Directive
Macro Directive
Examples
100
Chapter 101
Origin Directive
Origin Directive
102
Proc and .PROCEND Directives
Proc and .PROCEND Directives
Chapter 103
Label User-defined register name
REG Directive
REG Directive
Label .REG typedregister
Chapter 105
Shlibversion Directive
Shlibversion Directive
106
Space Directive
Space Directive
Chapter 107
108
Spnum Pseudo-Operation
Spnum Pseudo-Operation
Chapter 109
String and .STRINGZ Pseudo-Operations
String and .STRINGZ Pseudo-Operations
110
Chapter 111
Subspa Directive
Subspa Directive
Name An identifier that names the current subspace
112
Chapter 113
114
Version Directive
Version Directive
Chapter 115
Word Pseudo-Operation
Word Pseudo-Operation
Word initvalue , initvalue
Predefined Subspace Directives
Directive Space Name Default Parameters
Programming Aids
Programming Aids
Chapter 117
Shortdata
Programming Aids 118
119
Pseudo-Instruction Set
120
Chapter 121
Compare and Branch Conditions Comb and Comib
Cond Description
122
Add and Branch Conditions Addb and Addib Description
123
Invoking the Assembler
124
Using the as Command
Using the as Command
Assemble code for the architecture
Chapter 125
filename
Level
126
Wnumber
Tables, see HP-UX Linker and Libraries
Online User Guide
Wa, ,as-argument as-argument
Using the cc Command
Using the cc Command
Passing Arguments to the Assembler
128
Cpp Preprocessor
129
Programming Examples
130
Binary Search for Highest Bit Position
Binary Search for Highest Bit Position
Chapter 131
132
Copying a String
Copying a String
Chapter 133
134
Dividing a Double-Word Dividend
Dividing a Double-Word Dividend
Chapter 135
Programming Examples
136
Demonstrating the Procedure Calling Convention
Demonstrating the Procedure Calling Convention
Program Listing
Chapter 137
Assembly Program Listing
138
Output of the cc -S Command
Assembly Program Listing From the C Compiler
Output of the cc -S Command
Chapter 139
Output of the cc -S Command 140
141
142
Option operand
Chapter 143
144
Reserve
Chapter 145
Wrong register type used
Use a general register
146
Use a space register
Use a control register
Chapter 147
148
Chapter 149
150
Chapter 151
152
Used to invoke the assembler
Chapter 153
154
Error Messages
Error Messages
Chapter 155
156
Chapter 157
158
1030
1027
1028
1029
1034
1031
1032
1033
1038
1035
1036
1037
162
Chapter 163
1057
1054
1055
1056
Chapter 165
166
Chapter 167
168
1082
Format keyword=value
1080
1081
170
Chapter 171
1088
1089
1090
1096
1091
1094
1095
1100
1097
1098
1099
1104
1101
1102
1103
Chapter 175
1105
176
Panic Messages
Panic Messages
2008
2005
2006
2007
178
User Warning Messages
User Warning Messages
7006
7003
7004
7005
180
Chapter 181
182
7201
Limit Error Messages
Limit Error Messages
7200
184
7202
7203
7204
Chapter 185
Diagnostic Messages
186
Chapter 187
Branching Error Messages
Branching Error Messages
188
Chapter 189
190
Chapter 191
192
7835
7827
7828
7834
194
7836
7837
Expr
Index 195
Index
Numerics
196
Copyright
Index 197
HP C/HP-UX,49
198
Mfctl
Index 199
Double
200
See also memory
Index 201
202