HP UX Developer Tools manual Preface, Printing History, Edition Date Software Version

Page 11

Preface

This manual describes the use of the Precision Architecture RISC (PA-RISC) Assembler on HP 9000 computers.

You need to be familiar with the machine instructions to use the Assembler. For a complete description of the machine instruction set, refer to PA-RISC 1.1 Architecture and Instruction Set Reference Manual and PA-RISC 2.0 Architecture.

Note that, throughout this manual, there are references to PA-RISC 1.0, 1.1, and 2.0. Each version of the architecture is a superset of the preceding version.

Any program written for PA-RISC 1.0 machines will execute on PA-RISC 1.1 and 2.0 machines, but programs using instructions unique to PA-RISC 1.1 will not execute on PA-RISC 1.0 machines. Any program written for PA-RISC 1.1 machines will execute on PA-RISC 2.0 machines, but programs using features unique to PA-RISC 2.0 will not execute on PA-RISC 1.1 or 1.0 machines.

Printing History

New editions are complete revisions of the manual. Technical addendums or release notes may be released as supplements.

The software version is the version level of the software product at the time the manual was issued. Many product updates and fixes do not require manual changes and, conversely, manual corrections may be done without accompanying product changes. Therefore, do not expect a one-to-one correspondence between product updates and manual updates.

Edition

Date

Software

Version

 

 

 

 

 

First Edition

November 1986

 

 

 

 

Update 1

March 1987

 

 

 

 

Update 1 Incorporated

May 1987

 

 

 

 

11

Image 11
Contents 92432-90012 June HP 9000 ComputersHanover Street Palo Alto, California Legal NoticesRestricted Rights Legend Contents Assembler Directives and Pseudo-Operations Contents Contents Contents Contents Pseudo-Instruction Set Assembling Your Program Index Diagnostic MessagesProgramming Examples Edition Date Software Version PrefacePrinting History Related Documentation AudienceThis Manual Typographical ConventionsSummary of Technical Changes for HP-UX Assembler Features Assembly LanguageAssembler Features Chapter Summary of Changes for PA-RISCSummary of Changes for PA-RISC 2.0W Wide Mode, 64-bit Summary of Changes for PA-RISCSummary of Changes for PA-RISC 2.0W Wide Mode, 64-bit Program Structure Label Opcode Operands Comments Program StructureSymbols and Constants Symbols and ConstantsInteger Constants Signed Unsigned Registers and Register Mnemonics Registers and Register MnemonicsRegisters by using an L or R suffix General Registers Single-Precision Floating-Point Registers Control Registers Synonyms Double-Precision Floating-Point RegistersSpace Registers Register Synonyms Description Register Procedure Calling ConventionsOperator Operation ExpressionsExpressions Standard Arithmetic OperatorsLegal 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 CompletersAddi Macro Processing Macro ProcessingDefining New Instructions With Macros Contains general register 19, or binary 10011. These Spaces HP-UX Architecture ConventionsSpaces Memory Layout on HP-UX Sr4 Sr5 Sr6 Subspaces SubspacesAttributes Space Subspace Sort Key Use DirectivesStandard Subspaces and Sort Keys Sections in 64-bit Mode Sections in 64-bit Mode$INIT$ Location Counters Location CountersCompiler Conventions Compiler ConventionsCompiler Conventions Global Symbol Usage Mfctl Shared Libraries Assembly ListingShared Libraries Assembly Listing Directive Function IntroductionAssembler Directives Requests common storage for a specified number Bytes Pseudo-Operations Directive Function Reserves 16 bits a half word of storage Example Align DirectiveSyntax ParametersAllow Directive Allow DirectiveDiscussion To the .LEVEL specified for the file Block and .BLOCKZ Pseudo-Operations Block and .BLOCKZ Pseudo-OperationsSpace $TEXT$ Subspa $CODE$ Block Byte initvalue , initvalue Byte Pseudo-OperationByte Pseudo-Operation Call argumentdescription argumentdescription Call DirectiveCall Directive Second word in the argument list Form of argument-description is Arg=location Where arg canReturn value for a procedure first word in the argument listLIT Align Word Procend Export Callinfo parameter , parameter Callinfo DirectiveCallinfo 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 DirectiveComm Directive Label .COMM numbytesCompany-name Copyright DirectiveCopyright Directive Proc Callinfo Enter Double Pseudo-Operation Integer .fraction E powerFraction E power Double Pseudo-OperationDword initvalue , initvalue Dword Pseudo-OperationDword Pseudo-Operation END Directive END DirectiveEndm Directive Endm DirectiveEnter and .LEAVE Pseudo-Operations Enter and .LEAVE Pseudo-OperationsSpace $TEXT$ Entry and .EXIT Directives Entry and .EXIT DirectivesValue Symbolicname .EQU valueEQU Directive EQU DirectiveExport Directive Export DirectiveArgument Export proc,ENTRY,ARGW0=GR Float Pseudo-Operation Float Pseudo-OperationHalf initvalue , initvalue Half Pseudo-OperationHalf Pseudo-Operation Import Directive Import DirectiveNOP END Labelid Names the label identifier Label DirectiveLabel Directive Label labelidLevel Directive Level DirectiveLevel Directive Listoff and .LISTON Directives Listoff and .LISTON DirectivesListon Code Space $TEXT$ SPNUM=0,SORT=0 Subspa $CODE$ Locct Directive Locct DirectiveLabel .MACRO formalparameter,formalparameter Macro DirectiveMacro Directive Examples 100 Chapter 101 Origin DirectiveOrigin Directive 102 Proc and .PROCEND DirectivesProc and .PROCEND Directives Chapter 103 Label User-defined register name REG DirectiveREG Directive Label .REG typedregisterChapter 105 Shlibversion DirectiveShlibversion Directive 106 Space DirectiveSpace Directive Chapter 107 108 Spnum Pseudo-OperationSpnum Pseudo-Operation Chapter 109 String and .STRINGZ Pseudo-OperationsString and .STRINGZ Pseudo-Operations 110 Chapter 111 Subspa DirectiveSubspa Directive Name An identifier that names the current subspace112 Chapter 113 114 Version DirectiveVersion Directive Chapter 115 Word Pseudo-OperationWord Pseudo-Operation Word initvalue , initvaluePredefined Subspace Directives Directive Space Name Default ParametersProgramming Aids Programming AidsChapter 117 ShortdataProgramming Aids 118 119 Pseudo-Instruction Set120 Chapter 121 Compare and Branch Conditions Comb and ComibCond Description 122 Add and Branch Conditions Addb and Addib Description123 Invoking the Assembler124 Using the as CommandUsing the as Command Assemble code for the architectureChapter 125 filenameLevel 126 WnumberTables, see HP-UX Linker and Libraries Online User GuideWa, ,as-argument as-argument Using the cc CommandUsing the cc Command Passing Arguments to the Assembler128 Cpp Preprocessor129 Programming Examples130 Binary Search for Highest Bit PositionBinary Search for Highest Bit Position Chapter 131 132 Copying a StringCopying a String Chapter 133 134 Dividing a Double-Word DividendDividing a Double-Word Dividend Chapter 135 Programming Examples136 Demonstrating the Procedure Calling ConventionDemonstrating the Procedure Calling Convention Program ListingChapter 137 Assembly Program Listing138 Output of the cc -S CommandAssembly Program Listing From the C Compiler Output of the cc -S CommandChapter 139 Output of the cc -S Command 140 141 142 Option operandChapter 143 144 ReserveChapter 145 Wrong register type usedUse a general register 146 Use a space registerUse a control register Chapter 147 148 Chapter 149 150 Chapter 151 152 Used to invoke the assemblerChapter 153 154 Error MessagesError Messages Chapter 155 156 Chapter 157 158 1030 10271028 10291034 10311032 10331038 10351036 1037162 Chapter 163 1057 10541055 1056Chapter 165 166 Chapter 167 168 1082 Format keyword=value1080 1081170 Chapter 171 10881089 10901096 10911094 10951100 10971098 10991104 11011102 1103Chapter 175 1105176 Panic MessagesPanic Messages 2008 20052006 2007178 User Warning MessagesUser Warning Messages 7006 70037004 7005180 Chapter 181 182 7201 Limit Error MessagesLimit Error Messages 7200184 72027203 7204Chapter 185 Diagnostic Messages186 Chapter 187 Branching Error MessagesBranching Error Messages 188 Chapter 189 190 Chapter 191 192 7835 78277828 7834194 78367837 ExprIndex 195 IndexNumerics 196Copyright Index 197HP C/HP-UX,49 198Mfctl Index 199Double 200See also memory Index 201202
Related manuals
Manual 29 pages 37.9 Kb Manual 44 pages 5.6 Kb Manual 2 pages 37.54 Kb