                                           H                     MACRO-64_Assembler_for_OpenVMS_AXP_Systems__________$                     Reference Manual  -                     Order Number: AA-PT9KB-TE     !                     November 1993   I                     This manual describes the MACRO-64 assembly language.               H                     Revision/Update Information:  This manual supersedes5                                                   the H                                                   MACRO-64 Assembler forE                                                   OpenVMS AXP Systems I                                                   Reference Manual (Order F                                                   Number AA-PT9KA-TE).  H                     Software Version:             MACRO-64 Assembler forE                                                   OpenVMS AXP Systems =                                                   Version 1.1   I                     Operating System and Version: OpenVMS AXP Version 1.5 ;                                                   or higher   1                     Digital Equipment Corporation *                     Maynard, Massachusetts                 J           ________________________________________________________________'           First printing, November 1992             Revised, November 1993  @           Digital Equipment Corporation makes no representationsA           that the use of its products in the manner described in B           this publication will not infringe on existing or futureB           patent rights, nor do the descriptions contained in thisB           publication imply the granting of licenses to make, use,>           or sell equipment or software in accordance with the           description.  ?           Possession, use, or copying of the software described >           in this publication is authorized only pursuant to a=           valid written license from Digital or an authorized            sublicensor.  @            Digital Equipment Corporation 1992, 1993. All Rights           Reserved.   A           The postpaid Reader's Comments forms at the end of this @           document request your critical evaluation to assist in)           preparing future documentation.   ;           The following are trademarks of Digital Equipment C           Corporation: Alpha AXP, AXP, DEC, DECmigrate, DECwindows, 8           Digital, OpenVMS, VAX, VAX MACRO, VMS, and the           DIGITAL logo.   3           The following is a third-party trademark:   >           OSF/1 is a registered trademark of the Open Software           Foundation, Inc.  E                                                                ZK6338   /           This document is available on CD-ROM.   D           This document was prepared using VAX DOCUMENT Version 2.1.                                 C   _________________________________________________________________   C                                                            Contents       C   Preface...................................................     xi      1  Introduction   C         1.1   Language Features.............................    1-1 C         1.1.1     Alpha AXP Native-Mode Instructions........    1-1 C         1.1.2     Direct Assignment Statements..............    1-2 C         1.1.3     Assembler Directives......................    1-2 C         1.1.3.1     General Assembler Directives............    1-2 C         1.1.3.2     Macro Directives........................    1-2 C         1.2   Invoking MACRO-64 on OpenVMS Systems..........    1-3 C         1.2.1     Command-Line Qualifiers...................    1-3   -   2  Components of MACRO-64 Source Statements   C         2.1   Source Statement Format.......................    2-1 C         2.1.1     Label Field...............................    2-3 C         2.1.2     Operator Field............................    2-4 C         2.1.3     Operand Field.............................    2-5 C         2.1.4     Comment Field.............................    2-5 C         2.2   Character Set.................................    2-6 C         2.3   Numbers.......................................    2-8 C         2.3.1     Integers..................................    2-8 C         2.3.2     Floating-Point Numbers....................    2-9 C         2.4   Quoted Literals...............................   2-10 C         2.5   Symbols.......................................   2-11 C         2.5.1     Permanent Symbols.........................   2-11 C         2.5.2     Predefined Symbols........................   2-11 C         2.5.3     User-Defined Symbols and Macro Names......   2-13 C         2.5.4     Determining Symbol Values.................   2-14 C         2.5.4.1     Using Symbols in the Operator Field.....   2-14 C         2.5.4.2     Using Symbols in the Operand Field......   2-15 C         2.6   Temporary Labels Within Source Code...........   2-16   C                                                                 iii                    E           2.7   Label Addresses ..............................   2-18 ;           2.7.1     Label Addresses, Optimization, and Code E                     Alignment.................................   2-18 6           2.7.2     Label Addresses and Automatic DataE                     Alignment ................................   2-20 E           2.8   Terms and Expressions.........................   2-22 E           2.9   Unary Operators for Terms and Expressions.....   2-25 E           2.9.1     Radix Control Operators...................   2-26 E           2.9.2     Numeric Complement Operator...............   2-27 E           2.10  Binary Operators..............................   2-28 E           2.10.1    Arithmetic Shift Operator.................   2-29 E           2.10.2    Logical AND Operator......................   2-29 E           2.10.3    Logical Inclusive OR Operator.............   2-29 E           2.10.4    Logical Exclusive OR Operator.............   2-29 E           2.11  Direct Assignment Statements..................   2-30 E           2.12  Current Location Counter......................   2-31   !     3  MACRO-64 Lexical Operators   E           3.1   Processing with Lexical Operators.............    3-1 E           3.2   Lexical Operator Syntax.......................    3-1 E           3.3   Numeric Symbols and Lexical String Symbols....    3-4 E           3.4   Lexical Substitution Operator.................    3-4 E           3.5   Lexical Escape Operator.......................    3-5 E           3.6   Using Lexical Operators.......................    3-7 E           3.7   Lexical Operators.............................   3-10   E           %EDIT...............................................   3-11   E           %ELEMENT............................................   3-13   E           %EXTRACT............................................   3-14   E           %FREG...............................................   3-15   E           %INTEGER............................................   3-16   E           %IREG...............................................   3-17   E           %LENGTH.............................................   3-18   E           %LOCATE.............................................   3-19            iv                   I               %REPEAT.............................................   3-20   I               %STRING.............................................   3-21   I               %TIME...............................................   3-22   I               %TYPE...............................................   3-23            4  Macro Arguments  I               4.1   Using Macro Arguments.........................    4-2 I               4.2   Using Default Values..........................    4-3 I               4.3   Using Keyword Arguments.......................    4-3 I               4.4   Using String Arguments........................    4-5 I               4.5   Argument Concatenation........................    4-9 I               4.6   Passing Numeric Values of Symbols.............    4-9 I               4.7   Using Created Temporary Labels................   4-10   (         5  MACRO-64 Assembler Directives  I               5.1   Program Sections..............................    5-1 I               5.2   Automatic Data Alignment......................    5-3 I               5.3   Directives....................................    5-4   I               .ADDRESS............................................    5-9   I               .ALIGN..............................................   5-10   I               .ASCIC..............................................   5-13   I               .ASCID..............................................   5-14   I               .ASCII..............................................   5-16   I               .ASCIZ..............................................   5-17   I               .BASE...............................................   5-18   I               .BEGIN_EXACT........................................   5-22   I               .BLKx...............................................   5-24   I               .BYTE...............................................   5-27   I               .CODE_ADDRESS.......................................   5-28   I               .D_FLOATING.........................................   5-29   I               .DEFINE_FREG........................................   5-31   I                                                                         v                    E           .DEFINE_IREG........................................   5-34   E           .DISABLE............................................   5-36   E           .ELSE...............................................   5-37   E           .ENABLE.............................................   5-39   E           .END................................................   5-51   E           .ENDC...............................................   5-53   E           .ENDM...............................................   5-54   E           .ENDR...............................................   5-55   E           .END_EXACT..........................................   5-56   E           .ERROR..............................................   5-57   E           .EVEN...............................................   5-58   E           .EXTERNAL...........................................   5-59   E           .F_FLOATING.........................................   5-60   E           .G_FLOATING.........................................   5-62   E           .IDENT..............................................   5-63   E           .IF.................................................   5-64   E           .IF_x...............................................   5-71   E           .IIF................................................   5-75   E           .INCLUDE............................................   5-77   E           .INSTRUCTION........................................   5-78   E           .IRP................................................   5-80   E           .IRPC...............................................   5-83   E           .LIBRARY............................................   5-86   E           .LINKAGE_PAIR.......................................   5-88   E           .LIST...............................................   5-90   E           .LOCAL_CODE_ADDRESS.................................   5-91   E           .LOCAL_LINKAGE_PAIR.................................   5-92   E           .LOCAL_PROCEDURE_DESCRIPTOR.........................   5-93   E           .LONG...............................................   5-95   E           .MACRO..............................................   5-96        vi                   I               .MCALL..............................................  5-100   I               .MDELETE............................................  5-101   I               .MEXIT..............................................  5-102   I               .NARG...............................................  5-105   I               .NCHR...............................................  5-107   I               .NLIST..............................................  5-109   I               .NOSHOW.............................................  5-110   I               .OCTA...............................................  5-111   I               .ODD................................................  5-113   I               .PACKED.............................................  5-114   I               .PAGE...............................................  5-115   I               .PRINT..............................................  5-116   I               .PROCEDURE_DESCRIPTOR...............................  5-117   I               .PSECT..............................................  5-119   I               .QUAD...............................................  5-126   I               .REPEAT.............................................  5-127   I               .RESTORE_PSECT......................................  5-130   I               .SAVE_PSECT.........................................  5-132   I               .S_FLOATING.........................................  5-133   I               .SHOW...............................................  5-134   I               .SIGNED_BYTE........................................  5-137   I               .SIGNED_WORD........................................  5-138   I               .SUBTITLE...........................................  5-139   I               .T_FLOATING.........................................  5-140   I               .TITLE..............................................  5-141   I               .UNDEFINE_REG.......................................  5-143   I               .WARN...............................................  5-144   I               .WEAK...............................................  5-145   I               .WORD...............................................  5-147   #         6  MACRO-64 Supplied Macros   I               6.1   MACRO-64 Supplied Library.....................    6-1 I               6.2   Routines and Lexical Scope....................    6-2 I               6.2.1     Routines and Program Sections.............    6-2 I               6.3   Using Macros to Control Program Sections......    6-3 I               6.3.1     Defining Program Sections.................    6-3 I               6.3.2     Using Macro-Defined Symbols...............    6-4 I               6.3.3     Defining Procedure Type...................    6-5   I                                                                       vii                    E           6.3.4     Using Macros in Prologue Sections.........    6-6 E           6.3.5     Using Macros in Epilogue Sections.........    6-6 E           6.4   Programming Examples Using Supplied Macros....    6-7 E           6.5   Using the $CALL Macro.........................    6-8 E           6.5.1     Using $CALL in Source Code................   6-10 E           6.6   Programming Considerations....................   6-11 7           6.6.1     Making Multiple Calls From the Same E                     Routine...................................   6-11 E           6.6.2     Nonstandard Linkage.......................   6-11 E           6.6.3     Routine Restrictions......................   6-12 E           6.7   Macro Descriptions and Syntax Rules...........   6-12   E           $BEGIN_EPILOGUE.....................................   6-13   E           $CALL...............................................   6-15   E           $CODE_SECTION ......................................   6-23   E           $DATA_SECTION.......................................   6-24   E           $END_EPILOGUE.......................................   6-25   E           $END_PROLOGUE.......................................   6-27   E           $END_ROUTINE........................................   6-28   E           $LINKAGE_PAIR.......................................   6-29   E           $LINKAGE_SECTION....................................   6-31   E           $OPDEF..............................................   6-32   E           .PACKED.............................................   6-38   E           $PROCEDURE_DESCRIPTOR...............................   6-41   E           $RESET_LP_LIST......................................   6-42   E           $RETURN.............................................   6-44c  E           $ROUTINE............................................   6-45   6     A  MACRO-64 Alpha AXP Architecture Quick Reference  E           A.1   Register Usage Conventions....................    A-3 E           A.2   Instruction Operand Notation..................    A-3 E           A.3   Instruction Qualifier Notation................    A-4 E           A.4   F-P Control Register (FPCR) Format............    A-5 E           A.5   Decodable Pseudo-Operations...................    A-6 8           A.6   Common Architecture Opcodes in NumericalE                 Order.........................................    A-7 E           A.7   OpenVMS PALcode Instruction Summary...........   A-14 E           A.8   PALcode Opcodes in Numerical Order............   A-17 E           A.9   Common Architecture Instructions..............   A-19        viii i                 $         B  Programming with MACRO-64  I               B.1   MACRO-64 Programming Hints....................    B-1_I               B.1.1     STARLET.MLB Migration Macros..............    B-2 I               B.1.2     Integer Division..........................    B-3 9               B.1.3     User-Defined Register Symbols anddI                         Macros....................................    B-3nI               B.2   The OpenVMS Calling Standard..................    B-3c;               B.2.1     Effects on Assembly-Time when Using I                         Calling-Standard Macros...................    B-4cI               B.3   Accessing Memory with Base Registers..........    B-5 I               B.4   Types of Data Structures......................    B-9yI               B.4.1     Procedure Descriptor......................   B-10eI               B.4.2     Signature Block...........................   B-112I               B.4.3     Linkage Pair..............................   B-11 I               B.5   Types of Routines.............................   B-13lI               B.5.1     Routine Capabilities......................   B-14 8               B.5.2     Entry Prologue and Exit EpilogueI                         Sequences.................................   B-15 I               B.6   Establishing Self-Addressability..............   B-16 I               B.7   Optimization and Automatic Alignment..........   B-18 I               B.7.1     Automatic Data Alignment..................   B-18 I               B.7.1.1     Controlling Data Alignment..............   B-19 7               B.7.1.2     Directives for Automatic Data I                           Alignment...............................   B-19 I               B.7.2     Automatic Code Label Alignment............   B-21_I               B.7.3     Scheduling Optimization...................   B-21 I               B.7.4     Peephole Optimization.....................   B-22.I               B.7.5     Using MACRO-64 for Performance............   B-22.I               B.7.6     Viewing Optimization Results..............   B-23t  "         C  Using LSE with MACRO-64  I               C.1   Invoking LSE..................................    C-1sI               C.2   Running Diagnostics...........................    C-2a  %         D  Differences from VAX MACRO   I               D.1   Assembler Features in MACRO-64................    D-1 I               D.2   VAX MACRO Features Not Present in MACRO-64....    D-6.          I                                                                        ix6 o  e                   E  Error MessagesS       F  MACRO-64 Listing Format    	     Index          Examples  9           3-1       Lexical Processing Without the Escape.E                     Operator..................................    3-6   E           3-2       Lexical Processing with Escape Operator...    3-6   E           3-3       Using Lexical Operators...................    3-7e  E           3-4       Source Statements After Macro Expansion...    3-9.  E           6-1       Program Using Supplied Macros.............    6-7.  E           6-2       Program Using $CALL.......................   6-10N  E           B-1       Routine Call Example......................    B-5.  E           B-2       Routine Without Linkage Pairs.............   B-11.  E           B-3       Routine With Linkage Pairs................   B-12.  E           B-4       Establishing a Base Address...............   B-17.  E           B-5       Enabling and Disabling Data Alignment.....   B-19s  E           F-1       Main Source File..........................    F-1.  E           F-2       Include Source File.......................    F-2   E           F-3       Example Listing Output....................    F-21       Figures   E           A-1       Data Structures...........................    A-1   E           A-2       Instruction Formats.......................    A-2   
     Tables  E           2-1       Using Tab Stops in Statement Fields.......    2-2.  7           2-2       Special Characters Used in MACRO-64 E                     Statements................................    2-7   E           2-3       Summary of Unary Operators................   2-26n  E           2-4       Summary of Binary Operators...............   2-28r  E           3-1       Summary of MACRO-64 Lexicals..............   3-10   E           3-2       %TYPE Attributes..........................   3-23        x. .  .              I               5-1       Summary of General Assembler Directives...    5-4   I               5-2       Summary of Macro Directives...............    5-7   I               5-3       .ENABLE and .DISABLE Symbolic Arguments...   5-39   @               5-4       Condition Tests for Conditional AssemblyI                         Directives................................   5-65   I               5-5       Program Section Attributes................  5-120   I               5-6       Default Program Section Attributes........  5-123n  I               5-7       .SHOW and .NOSHOW Symbolic Arguments......  5-134p  I               6-1       ARGS Arguments............................   6-17   >               A-1       Register Usage Conventions for OpenVMSI                         AXP.......................................    A-3   I               A-2       Instruction Operand Notation..............    A-4   I               A-3       Instruction Qualifier Notation............    A-5   I               A-4       F-P Control Register (FPCR) Format........    A-5   I               A-5       Decodable Pseudo-Operations...............    A-6I  @               A-6       Common Architecture Opcodes in NumericalI                         Order.....................................    A-7   4               A-7       OpenVMS Unprivileged PALcodeI                         Instructions..............................   A-141  I               A-8       OpenVMS Privileged PALcode Instructions...   A-15   I               A-9       PALcode Opcodes in Numerical Order........   A-17   I               A-10      Common Architecture Instructions..........   A-20   I               B-1       Frame Attributes..........................   B-15v  I               B-2       Directives Using Automatic Alignment......   B-19.    I                                                                        xi. .  .                        I         _________________________________________________________________   I                                                                   Preface       C               This manual describes the MACRO-64 assembly language..           Intended Audience   H               This manual is intended for all programmers writing MACRO-D               64 programs. Before reading this manual, you should beH               familiar with assembly language programming, the Alpha AXPH               architecture and instruction set, and the operating system(               in use on your AXP system.           Document Structure  I               This manual contains the following chapters and appendices:1  B               o  Chapter 1 introduces the features of the MACRO-64                  language.  F               o  Chapter 2 describes the format of the MACRO-64 source                  statements.  G               o  Chapter 3 describes the MACRO-64 lexical operators. It H                  also discusses differences and similarities between theB                  VAX MACRO string operators and those of MACRO-64.  D               o  Chapter 4 describes the arguments used with macros.  C               o  Chapter 5 describes the MACRO-64 general assembler.C                  directives and the directives used in defining and."                  expanding macros.  H               o  Chapter 6 describes the macros provided with the MACRO-                  64 assembler.  C               o  Appendix A provides a quick reference to the AlphaA?                  AXP architecture as it relates to the MACRO-64 D                  programming language. For more information, see the-                  Alpha Architecture Handbook..  I                                                                        xi. .  .              C           o  Appendix B provides information on how to program more.6              effectively using the MACRO-64 assembler.  @           o  Appendix C explains how to invoke the DEC Language-?              Sensitive Editor (LSE) with the MACRO-64 language.   C           o  Appendix D describes the differences between VAX MACRO #              and MACRO-64 features..  D           o  Appendix E describes the error messages produced by the               MACRO-64 assembler.  A           o  Appendix F provides a MACRO-64 binary listing format5              example..       Associated Documents  C           For more information on MACRO-64, see the following guide.$           in this documentation set:  D           o  MACRO-64 Assembler for OpenVMS AXP Systems Installation              Guide  E           For more information on the Alpha AXP architecture, see the.           following:  0           o  Alpha Architecture Reference Manual  (           o  Alpha Architecture Handbook  8           o  Alpha AXP Achitecture Quick Reference Guide  %           o  OpenVMS Calling Standard.       Conventions.  B           In this manual, every use of Alpha VMS means the OpenVMS>           AXP operating system, every use of VAX VMS means theB           OpenVMS VAX operating system, and every use of VMS meansC           both the OpenVMS AXP operating system and the OpenVMS VAX.           operating system..  <           The following conventions are used in this manual:  C           Ctrl/x           A sequence such as Ctrl/x indicates that.B                            you must hold down the key labeled CtrlD                            while you press another key or a pointing)                            device button.        xii  I  .                F               PF1 x            A sequence such as PF1 x indicates thatC                                you must first press and release the.F                                key labeled PF1, then press and releaseG                                another key or a pointing device button..  D               <Return>         In examples, a key name enclosed in aD                                box indicates that you press a key onH                                the keyboard. (In text, a key name is not2                                enclosed in a box.)  @                . . .           A horizontal ellipsis in examples=                                indicates one of the following.-                                possibilities:   D                                o  Additional optional arguments in a>                                   statement have been omitted.  D                                o  The preceding item or items can be=                                   repeated one or more times..  I                                o  Additional parameters, values, or other.=                                   information can be entered..  I               .                A vertical ellipsis indicates the omission.F               .                of items from a code example or commandD               .                format; the items are omitted becauseH                                they are not important to the topic being)                                discussed..  B               ( )              In format descriptions, parenthesesE                                indicate that, if you choose more than.G                                one option, you must enclose the choicesR.                                in parentheses.  H               [ ]              In format descriptions, brackets indicateE                                optional elements. You can choose one,-E                                none, or all of the options. (Brackets.@                                are not optional, however, in theB                                syntax of a directory name in a VMSF                                file specification, or in the syntax ofI                                a substring specification in an assignment.*                                statement.)  F               { }              In format descriptions, braces surroundE                                a required choice of options; you must @                                choose one of the options listed.  I                                                                      xiii. .  .                D           boldface text    Boldface text represents the introductionD                            of a new term or the name of an argument,5                            an attribute, or a reason..  ;           italic text      Italic text emphasizes important.@                            information, indicates variables, and@                            indicates complete titles of manuals.B                            Italic text also represents information@                            that can vary in system messages (forC                            example, Internal error number), command.C                            lines (for example, /PRODUCER=name), and 6                            command parameters in text.  B           UPPERCASE TEXT   Uppercase text indicates a command, theD                            name of a routine, the name of a file, orC                            the abbreviation for a system privilege..  C           -                A hyphen in code examples indicates that B                            additional arguments to the request are=                            provided on the line that follows.   =           numbers          All numbers in text are assumed to >                            be decimal, unless otherwise noted.?                            Nondecimal radixes-binary, octal, or.@                            hexadecimal-are explicitly indicated.  @           mouse            The term mouse refers to any pointing@                            device, such as a mouse, a puck, or a"                            stylus.  C           MB1, MB2, MB3    MB1 indicates the left mouse button, MB2 A                            indicates the middle mouse button, and.E                            MB3 indicates the right mouse button. (The A                            buttons can be redefined by the user.)   E           PB1, PB2, PB3,   PB1, PB2, PB3, and PB4 indicate buttons on $           PB4              the puck.  D           SB, SB           SB and SB indicate buttons on the stylus.  D           MACRO-64         MACRO-64 refers to MACRO-64 Assembler for/                            OpenVMS AXP Systems.I         xiv. .  .                    I                                                                         1.I         _________________________________________________________________   I                                                              Introduction2    G               MACRO-64 Assembler for OpenVMS AXP Systems is an assembly B               language for programming Alpha AXP computers. SourceI               programs written in MACRO-64 are translated into object (or3G               binary) code by the MACRO-64 assembler, which produces an4I               object module and, optionally, a listing file. The features H               of the language are introduced in this chapter, as well as3               instructions to invoke the assembler..           1.1 Language FeaturesC  F               MACRO-64 source programs consist of a sequence of sourceC               statements. These source statements may be any of thet               following:  3               o  Alpha AXP native-mode instructionsf  -               o  Direct assignment statements.  %               o  Assembler directives.  0         1.1.1 Alpha AXP Native-Mode Instructions  G               Instructions manipulate data. They perform such functionspD               as addition, data conversion, and transfer of control.G               Instructions are usually followed in the source statement.G               by operands, which can be any kind of data needed for the.C               operation of the instruction. For a brief description.F               of the Alpha instruction set, see Appendix A. For a moreG               detailed description of the Alpha native-mode instruction.E               set, see the Alpha Architecture Reference Manual or thea*               Alpha Architecture Handbook.          I                                                          Introduction 1-1s D  n              &     1.1.2 Direct Assignment Statements  @           Direct assignment statements equate symbols to values.C           For more information on direct assignment statements, see            Section 2.11.m       1.1.3 Assembler Directives  E           Assembler directives guide the assembly process and provide C           tools for using the instructions. For more information on .           assembler directives, see Chapter 5.  @           There are two classes of assembler directives: general4           assembler directives and macro directives.  (     1.1.3.1 General Assembler Directives  A           You can use general assembler directives to perform the.           following operations:   :           o  Store data or reserve memory for data storage  D           o  Control the alignment of parts of the program in memory  D           o  Specify the methods of accessing the sections of memory0              in which the program will be stored  /           o  Specify a procedure in the programd  @           o  Specify the way in which symbols will be referenced  B           o  Specify that a part of the program is to be assembled*              only under certain conditions  :           o  Display informational and diagnostic messages  E           o  Control the assembler options that are used to interprett              the source programg       1.1.3.2 Macro Directives  ?           Macro directives are used to define macros and repeatt?           blocks. They allow you to repeat identical or similartE           sequences of source statements throughout a program withoutzD           rewriting those sequences. Use of macros and repeat blocksC           helps minimize programmer errors and speeds the debuggingw           process.       1-2 Introduction                   0         1.2 Invoking MACRO-64 on OpenVMS Systems  I               To invoke MACRO-64, enter the MACRO command and the /Alpha_iE               AXP command-line qualifier, using the following syntax:f  2               MACRO/Alpha_AXP  file-spec[, . . . ]  D               You must specify the /Alpha_AXP command-line qualifierF               before any other command-line parameters, qualifiers, or"               file specifications.  !               file-spec[, . . . ]   F               If you do not specify a file type for an input file, the;               assembler uses the default file type of .M64.i  G               You can specify one or more source files to be assembled..?               To assemble files individually, separate the file E               specifications with commas. To concatenate and assemblerA               the files as a single input file, separate the filet1               specifications with plus signs (+).   H               Command-line qualifiers control special assembler options.G               Assembler options can apply to the entire MACRO/Alpha_AXP F               command-line, or to the individual file being assembled.E               When the qualifier follows the MACRO/Alpha_AXP command,-E               it applies to all files listed. For more information on 9               command-line qualifiers, see Section 1.2.1..  %         1.2.1 Command-Line Qualifiersb  I               This section describes the command qualifiers used with the.&               MACRO/Alpha_AXP command.  #               /[NO]ALIGNMENT=option.  I               Controls the alignment of code and data. Valid options are:.  I               ___________________________________________________________.I               Option____Function_________________________________________.  B               CODE      Alignment of certain branch target labels.  I               DATA______Natural_alignment_of_data_items._________________   B               If you omit the qualifier from the command line, theD               default options are /NOALIGNMENT=(CODE, DATA). If more  I                                                          Introduction 1-3p t  .              D           than one option is specified, the options must be enclosed2           in parentheses and separated by a comma.              /[NO]DEBUG[=(options)]  5           Specifies DEBUG support. Valid options are:u  E           ___________________________________________________________ E           Option____Function_________________________________________-  7           SYMBOL    Generates debug symbol information.   4           TRACEBACK Generates traceback information.  =           ALL       Generates all previous debug information..  E           NONE______Generates_no_debug_information.__________________s  D           The default qualifier is /NODEBUG. When you specify /DEBUG<           with no options, the default option is /DEBUG=ALL.  .           /[NO]DEFINE=(symbol [=[=]value],...)  @           Performs the same function as direct symbol assignment@           in your source program. That is, the /DEFINE qualifierC           defines a numeric symbol. For additional information, see.           Section 2.11.   B           The Digital Command Language (DCL) converts all input toA           uppercase unless you enclose it within quotation marks.   B           Use a single equal sign between the symbol and the valueC           to define a local symbol. Use two equal signs between the.C           symbol and the value to define a global symbol. The finalpE           value of a global symbol is output to the object module and.D           is available during the linking process. A local symbol is5           only available during the assembly process..  E           You cannot define a lexical string symbol with /DEFINE. ThedD           value you specify for a symbol must be an integer literal.D           You can specify this value using a binary, octal, decimal,@           or hexadecimal radix. The default radix is decimal. ToA           specify an alternate radix, use the format described in D           Section 2.9.1. If you specify an alternate radix, you must:           use MACRO-64 radix syntax, not DCL radix syntax.  C           If you do not specify a value for the symbol, it defaults_           to 1._       1-4 Introduction _  _              F               The simplest form of a /DEFINE definition is as follows:  #                        /DEFINE=TRUEe  H               This definition is equivalent to the following definition:                          TRUE=1   E               You can also specify more than one symbol definition as )               with the following command:a  5                        /DEFINE=(CHIP==21064,UNROLL=4)   I               This definition is equivalent to the following definitions:   "                        CHIP==21064                        UNROLL=4   D               When more than one /DEFINE qualifier is present on theB               MACRO command line or in a single assembly unit, the/               assembler uses only the last one.   1               The default qualifier is /NODEFINE.e  )               /[NO]DIAGNOSTIC[=file-spec]   H               Controls whether diagnostics are created and stored in theE               specified optional file. If a file specification is not E               supplied, the assembler creates a diagnostic file using C               the same name as the source file. For example, if you F               use a source file named XXX.M64, the assembler creates aG               diagnostic file named XXX.DIA. You can use the diagnosticeI               file with other Digital layered products including, but notdB               limited to, the DEC Language-Sensitive Editor (LSE).  5               The default qualifier is /NODIAGNOSTIC.   $               /ENVIRONMENT=[NO]FLOAT  E               Controls whether the assembler generates floating-pointoI               instructions when optimizing code and performing code-label                alignment.  I               Currently, the only floating-point instruction generated byAH               the assembler during optimization and alignment processingC               is FNOP, the floating-point no-operation instruction.iE               If you specify /ENVIRONMENT=NOFLOAT, the assembler does E               not generate any floating-point instructions as part ofi  I                                                          Introduction 1-5     p              ?           optimization and alignment processing. Floating-pointeB           instructions that you specify in your source program are           unaffected.e             /LIBRARY  :           Searches macro libraries in the following order:  >           1. The library designated by the /LIBRARY qualifier.  %           2. The .LIBRARY directives.M  D           3. The MACRO64.MLB library. The assembler searches for theB              MACRO64.MLB macro library in the following locations:E              MACRO64$LIBRARY, ALPHA$LIBRARY, and finally SYS$LIBRARY.A  D           4. The STARLET.MLB library. The assembler searches for theB              STARLET.MLB macro library in the following locations:E              MACRO64$LIBRARY, ALPHA$LIBRARY, and finally SYS$LIBRARY.O  B           In addition, you can place the macro library definitionsA           in the listing file by using the command-line qualifiers           /SHOW=LIBRARY.             /[NO]LIST[=file-spec]n  >           Controls whether a listing is created and optionallyE           provides an output file specification for the listing file.qD           Do not use wildcard characters in this file specification.  E           If you enter the MACRO/Alpha_AXP command interactively, thepE           default qualifier is /NOLIST. The assembler sends output tonE           the current output device rather than to a listing file. IfAE           you execute the MACRO/Alpha_AXP command in a batch job, they%           default qualifier is /LIST.   C           If you do not specify a file specification, the assembler B           creates a listing file using the same name as the sourceD           file. For example, if you use a source file named XXX.M64,=           the assembler creates a listing file named XXX.LIS.s               1-6 Introduction                                  /[NO]MACHINE_CODE   E               Produces a binary machine code listing after the source H               text if a listing file is requested. The default qualifier!               is /NOMACHINE_CODE.                   /NAMES=case_option    F               Specifies the alphabetic casing of identifiers in source1               code statements. Valid options are:a  I               ___________________________________________________________tI               Option____Function_________________________________________   D               UPPER_    Converts all identifiers to upper alphabetic               CASE      case.   D               LOWER_    Converts all identifiers to lower alphabetic               CASE      case.e  I               AS_IS     Causes all identifiers to remain in the case usedmI               __________in_source_statements.____________________________   I               If you use the /NAMES qualifier in a command line, you must F               supply a case_option. If you omit the qualifier from theD               command line, the default option is /NAMES=UPPER_CASE.  %               /[NO]OBJECT[=file-spec]   G               Controls whether an object file is created and optionally @               provides a file specification. Do not use wildcard4               characters in this file specification.  G               If you do not specify a file specification, the assembler F               creates an object file using the same name as the sourceH               file. For example, if you use a source file named XXX.M64,A               the assembler creates an object file named XXX.OBJ.   /               The default qualifier is /OBJECT.n  +               /[NO]OPTIMIZE[=(option-list)]i      I                                                          Introduction 1-7                    D           Specifies optional assembler optimizations. Valid items in           the option-list are:  E           ___________________________________________________________oE           Option____Function_________________________________________   5           SCHEDULE  Specifies instruction scheduling.a  E           PEEPHOLE__Specifies_peepholing.____________________________   =           Specifying /OPTIMIZE with no options is the same as 3           specifying /OPTIMIZE=(PEEPHOLE,SCHEDULE).t  C           The default qualifier is /NOOPTIMIZE. See Section B.7 for '           information on optimizations.d  (           /PREPROCESSOR_ONLY [=filespec]  B           Causes the assembler to output a source file that is the>           result of the input source file after preprocessing.=           Suppresses diagnostic messages and does not producee3           diagnostic (.ANA) or object (.OBJ) files.   <           The default option, /NOPREPROCESSOR_ONLY-MACRO-64,/           assembles your source files normally.   :           If you specify /PREPROCESSOR_ONLY without a fileB           specification argument, the output file name defaults toD           the name of the primary source input file. The output file            type defaults to .ASM.  ?           The following MACRO-64 directives are executed by thet@           preprocessor and screened from the preprocessor output           file:   )              .DISABLE PREPROCESSOR_OUTPUTA(              .ENABLE PREPROCESSOR_OUTPUT              .IF              .ELSE              .ENDC              .IIF               .IF_FALSE              .IF_TRUE               .IF_TRUE_FALSEd              .INCLUDEn              .LIBRARYo              .IRPt       1-8 Introduction n  g                                .IRPC                  .REPEAT                  .ENDR                  .MACRO                   .ENDM                  .MCALLu                  .MDELETE                   .MEXITm                  .NARG                  .NCHR  A               Include files are inserted in place of the .INCLUDE :               directive into the preprocessor output file.  I               Macro definitions and repeat block definitions are screened 0               from the preprocessor output file.  H               Macro expansion lines and repeat block expansion lines areF               inserted in place of the macro invocation line or repeatE               block, respectively, into the preprocessor output file.   F               Lexical string-symbol assignment statements are screened0               from the preprocessor output file.  H               Lines containing lexical operators are replaced with their<               equivalents after lexical operator processing.  E               Lexical line continuations are processed into a single,A               uncontinued line.   C               All other language elements, including directives not I               previously listed, label definitions, direct numeric-symbol G               assignments, and so forth are passed through unchanged to +               the preprocessor output file.   >               For more information, see the description of theF               PREPROCESSOR_OUTPUT option with the .ENABLE directive in               Chapter 5.  "               /[NO]SHOW=(item,...)  A               Modifies the output listing file. This qualifier is G               meaningful only when /LIST is specified. Valid items are:     I                                                          Introduction 1-9i .               E           ___________________________________________________________pE           Option___________Function__________________________________t  ?           BINARY           Lists macro expansions that generatea=                            binary code. BINARY is a subset ofo&                            EXPANSIONS.  ?           CONDITIONALS     Shows sections of code conditionallyr#                            skipped.e  2           EXPANSIONS       Shows macro expansions.  4           INCLUDE          Shows all .INCLUDE files.  E           LIBRARY__________Shows_macro_library_modules.______________a  3           The default option is /SHOW=CONDITIONALS..  %           /[NO]WARNINGS=(option-list)   B           Controls the severity level of messages and diagnostics.           Valid options are:  E           ___________________________________________________________.E           Option____________Function_________________________________   6           WARNINGS          Display/suppress warnings.  <           INFORMATIONALS    Display/suppress informationals.  9           ALL               Display/suppress warnings ando+                             informationals.t  E           NONE______________Display/suppress_nothing.________________c             The default B           options are /WARNINGS=(WARNINGS,INFORMATIONALS). If moreC           than one option is specified, options must be enclosed inv+           parentheses separated by a comma.t                   1-10 Introductionr r  m                    I                                                                         2 I         _________________________________________________________________   I                                  Components of MACRO-64 Source Statementsu    ?               A source program consists of a sequence of sourceiI               statements that the assembler interprets and processes, oneeH               at a time, generating object code or performing a specificF               assembly-time process. A source statement can occupy oneB               source line or can extend onto several source lines.  G               This chapter describes the format of the source statemente+               and the following components:   ,               o  Character set (Section 2.2)  &               o  Numbers (Section 2.3)  .               o  Quoted literals (Section 2.4)  &               o  Symbols (Section 2.5)  /               o  Temporary labels (Section 2.6)   .               o  Label addresses (Section 2.7)  4               o  Terms and expressions (Section 2.8)  .               o  Unary operators (Section 2.9)  0               o  Binary operators (Section 2.10)  <               o  Direct assignment statements (Section 2.11)  8               o  Current location counter (Section 2.12)  #         2.1 Source Statement Formato  C               MACRO-64 source statements can have a maximum of fouro!               fields, as follows:s  A               o  Label field-Symbolically defines a location in a                   program.   I                              Components of MACRO-64 Source Statements 2-1     e              C           o  Operator field-Specifies the action to be performed bymD              the statement; this can be an instruction, an assembler(              directive, or a macro call.  C           o  Operand field-Contains the instruction operands or the B              assembler directive arguments or the macro arguments.  ?           o  Comment field-Contains a comment that explains theiC              meaning of the statement; this does not affect programb              execution.t  B           You can separate statement fields by either a space or aE           tab stop, but Digital recommends that you format statementstA           with the Tab key to ensure consistency and clarity. See            Table 2-1.  E           Table_2-1_Using_Tab_Stops_in_Statement_Fields______________                         Column in                      Which                      FieldE           Field______Begins_____Tab_Stops_to_Reach_Column____________   !           Label      1          0   !           Operator   9          1o  !           Operand    17         2   E           Comment____41_________5_____________________________________  A           The following example shows a typical source statement:_  E           EXP:    .BLKL   50           ; Table stores expected valuesb  ,           Rules for Coding Source Statements  A           The following rules apply for coding source statements:u  A           o  You can continue a single statement on several lines B              by using a hyphen (-)  as the last nonblank characterB              before the comment field, or at the end of line (when"              there is no comment).  ?           o  In most cases, you can continue a statement at anyr?              point. If a symbol name is continued and the first >              character on the second line is a tab or a blank,A              the symbol name is terminated at that character. Forp;              information on using symbols, see Section 2.5.   0     2-2 Components of MACRO-64 Source Statements                   E               o  Blank lines are legal, but they have no significance C                  in the source program except that they terminate ad                   continued line.  C               The following sections describe each of the statementB               fields in detail.e           2.1.1 Label Field.  I               A label is a user-defined symbol that identifies a locationsE               in the program. The symbol is assigned a value equal torH               the location counter where the label occurs. The followingD               rules apply when coding source statements with labels:  F               o  If a statement contains a label, the label must be in-                  the first field on the line.s  H               o  The user-defined symbol name can be up to 31 charactersI                  long and can contain any alphanumeric character, as well H                  as the underscore (_), dollar sign ($),  and period (.)                  characters.  E               o  If a label extends past column 7, Digital recommendsrG                  you place it on a line by itself so that the followingoG                  operator field can start in column 9 of the next line.E  G               o  A label is terminated by a colon (:) or a double colon.                  (::).  I               In the following source statement, EXP: is the label field:x  I               EXP:    .BLKL   50           ; Table stores expected values   B               See Section 2.5.3 for a description of the rules for0               forming user-defined symbol names.  .               There are three types of labels:  H               o  Global labels-Can be referenced by other object modules;                  and are defined using a double colon (::).h  G               o  Local labels-Can be referenced only within the current A                  module and are defined using a single colon (:).o  C               o  Temporary labels-Can be referenced only within the F                  bounds of either two local labels, two global labels,I                  two psects (program sections), or within the bounds of a=I                  temporary label scope, as defined by .ENABLE LOCAL_BLOCKoG                  and .DISABLE LOCAL_BLOCK. Temporary labels are defined C                  using one to five digits followed by a dollar signr  I                              Components of MACRO-64 Source Statements 2-3u ,  e              A              and a single colon ($:). See Section 2.6 for furtheru              information.   E           The following example shows how these labels appear in use:r  E           EXP:    .BLKL   50           ; EXP is a local label used tonL                                        ; identify a 50-word block of storageG           DATA::  .BLKW   25           ; DATA is a global label used touL                                        ; identify a 25-word block of storageI           10$:    .BLKW    5           ; 10$ is a temporary label used tocF                                        ; identify a five word block of1                                        ; storage.o       2.1.2 Operator Field  D           The operator field specifies the action to be performed byB           the statement. This field can contain an instruction, anC           assembler directive, or a macro call. If the operator is:t  C           o  An instruction, MACRO-64 generates the binary code forgD              that instruction in the object module. The instructions&              are listed in Appendix A.  C           o  A directive, MACRO-64 performs certain control actions,E              or processing operations during source program assembly.eA              The assembler directives are described in Chapter 5.e  B           o  A macro call, MACRO-64 expands the macro. Macro calls@              are described in Chapter 4 and in Chapter 5 (.MACROD              directive). Macros supplied with MACRO-64 are described              in Chapter 6.  D           Use either a space or a tab stop to terminate the operatorA           field; however, Digital recommends that you use the tabh/           stop to terminate the operator field.s  B           In the following source statement, .BLKL is the operator           field:  E           EXP:    .BLKL   50           ; Table stores expected values           0     2-4 Components of MACRO-64 Source Statements                            2.1.3 Operand Fieldy  H               The operand field can contain operands for instructions orG               arguments for either assembler directives or macro calls.i  E               Operands for instructions identify the memory locationsYF               or the registers that are used by the machine operation.G               The operand field for a specific instruction must contain F               the correct number and type of operands required by that               instruction.  I               Arguments for a directive must meet the format requirementshG               of that directive. Chapter 5 describes the directives andp,               the format of their arguments.  G               Operands for a macro must meet the requirements specifiedOH               in the macro definition. See the description of the .MACRO%               directive in Chapter 5.   C               Use a comma (,) to separate operands for instructions B               and directives. (See Section 2.8 for a discussion of               expressions.)s  H               The semicolon that starts the comment field terminates theI               operand field. If a line does not have a comment field, the A               operand field is terminated by the end of the line.   B               In the following source statement example, 50 is theB               operand field supplied to the operator field, .BLKL:  H               EXP:    .BLKL   50          ; Table stores expected values           2.1.4 Comment Field/  H               The comment field contains text that explains the function@               of the statement. You can use comments to describeC               algorithms, reasons for selecting particular methods,_G               and parameters passed to routines. Comments do not affectu7               assembly processing or program execution.   G               The comment field must be preceded by a semicolon (;) and I               can contain any printable ASCII character. It is terminatedo%               by the end of the line.   I               A comment can appear on a line by itself. If a comment doeseG               not fit on one line, it can be continued on the next, but_E               the continuation must be preceded by another semicolon.l  I                              Components of MACRO-64 Source Statements 2-5  m  e              B           In the following source statement example, "Table stores>           expected values" is the comment field. Note that the0           comment field begins with a semicolon.  D           EXP:    .BLKL   50          ; Table stores expected values       2.2 Character Set   @           When coding source statements, you need to be aware ofB           what characters are acceptable to the assembler, and howB           the assembler interprets them. The following numbers and3           characters are accepted by the assembler:s  ?           o  The letters of the alphabet, A to Z, uppercase and >              lowercase. By default, the assembler converts allD              lowercase letters to uppercase. This means it considers?              lowercase letters equivalent to uppercase letters.f  @              The assembler can operate in a case-sensitive mode.C              In case-sensitive mode, the assembler does not convert_C              lowercase letters to uppercase letters. On OpenVMS and_D              OpenVMS AXP systems, you can select case-sensitive modeC              from the command line with the /NAMES=AS_IS qualifier._             o  The digits 0 to 9.i  8           o  The special characters listed in Table 2-2.                                    0     2-6 Components of MACRO-64 Source Statements                   I               Table_2-2_Special_Characters_Used_in_MACRO-64_Statements___Y  "                          CharacterI               ___CharacteName________Function____________________________   ?                  _       Underscore  Character in symbol names.e  ?                  $       Dollar      Character in symbol names.                           sign   G                  .       Period      Character in symbol names, currentuI                                      location counter, and decimal point.   <                  :       Colon       Local label terminator.  =                  ::      Double      Global label terminator.T                          colon  I                  =       Equal sign  Local direct assignment operator andbG                                      macro keyword argument terminator.   G                  ==      Double      Global direct assignment operator. #                          equal sign   =                  #       Number      Literal value indicator.I                          sign   ?                  @       At sign     Arithmetic shift operator.L  =                  ;       Semicolon   Comment field indicator.d  G                  +       Plus sign   Unary plus operator and arithmeticE7                                      addition operator.   E                  -       Minus sign  Unary minus operator, arithmetic C                          or          subtraction operator, and lineC<                          hyphen      continuation indicator.  H                  *       Asterisk    Arithmetic multiplication operator.  B                  /       Slash       Arithmetic division operator.  :                  &       Ampersand   Logical AND operator.  C                  !       Exclamation Logical inclusive OR operator.                           point  E                  \       Backslash   Logical exclusive OR and numerictB                                      conversion indicator in macro/                                      arguments.   G                  ^       Circumflex  Unary operators and macro argumentx/                                      delimiter.   I                                                  (continued on next page)i  I                              Components of MACRO-64 Source Statements 2-7e                   ?           Table 2-2 (Cont.) Special Characters Used in MACRO-64 E           __________________Statements_______________________________                         CharacterE           ___CharacteName________Function____________________________i  @              ( )     Parentheses Displacement and register fieldE                                  delimiter in an instruction operand. @                                  Argument delimiter to a lexical*                                  operator.  @              <>      Angle       Argument or expression grouping,                      brackets    delimiters.  A              ?       Question    Created local label indicator in.1                      mark        macro arguments._  =              '       Apostrophe  Macro argument concatenationF+                                  indicator.   :              "       Double      Quoted literal delimiter.                      quote  D              %       Percent     Delimits the beginning of a lexical*                      sign        operator.  C              (space) Space or    Separates source statement fields. >                      tab         Spaces within expressions are3              (tab)               otherwise ignored.   =              ,       Comma       Separates symbolic arguments C                                  within the operand field. MultipleOA                                  expressions in the operand fieldfE           _______________________must_be_separated_by_commas._________       2.3 Numbers_  @           Numbers can be integers or floating-point numbers. The=           following sections describe these types of numbers.S       2.3.1 Integers  ;           You can use integers in any expression, includingi:           expressions in operands and in direct assignment9           statements. For information on expressions, sees           Section 2.8.             FORMAT  
           snn_  0     2-8 Components of MACRO-64 Source Statements i                                sTG               An optional sign: plus sign (+) for positive numbers (the ?               default), or minus sign (-) for negative numbers.                  nnB               A string of numeric characters that is legal for the               specified radix.  G               MACRO-64 interprets all integers in the source program as_F               decimal unless the number is preceded by a radix controlH               operator. For more information on radix control operators,                see Section 2.9.1.  I               Integers must be in the range of -263 to +263-1  for signeda  D               data or in the range of 0 to 264-1  for unsigned data.  G               Negative numbers must be preceded by a minus sign; MACRO-eG               64 translates such numbers into two's complement form. Int:               positive numbers, the plus sign is optional.  $         2.3.2 Floating-Point Numbers  I               You can use a floating-point number in the .DOUBLE, .FLOAT,oE               .F_FLOATING, .D_FLOATING, .G_FLOATING, .S_FLOATING, and I               .T_FLOATING directives. For more information on directives,6F               see Chapter 5. You cannot use a floating-point number inI               an expression or with a unary or binary operator except theeF               unary plus and unary minus. For information on unary andA               binary operators, see Section 2.9 and Section 2.10.   H               You can specify a floating-point number with or without an               exponent.                  FORMAT  5               Floating-point number without exponent:s                 snn                snn.nn               snn.  6               Floating-point number with exponent (E):                 snnEsnne               snn.nnEsnn               snn.Esnn  I                              Components of MACRO-64 Source Statements 2-9b                              ss           An optional sign.s             nn<           A string of decimal digits in the range of 0 to 9.  C           The decimal point can appear anywhere to the right of thecB           first digit. A floating-point number cannot start with aE           decimal point because MACRO-64 treats the number as a user-tB           defined symbol. For information on user-defined symbols,           see Section 2.5.3.       2.4 Quoted Literalsc  @           A quoted literal is a string of characters enclosed inA           double quotes ("  "). Use the following guidelines whena4           specifying characters in a quoted literal:  A           o  Any character except null, carriage return, and form /              feed can appear within the string.   D           o  To include a double quote or backslash in a string, you2              must precede it with a backslash (\).  ?           o  To specify an arbitrary character, you can specify A              "\xhh", where each h represents a single hexadecimal_               digit. For example:                "AB\\CD\"EF\x47"y  ;              This string contains the following characters:                 AB\CD"EFG  C           Also note that the assembler does not convert the case ofh8           alphabetic characters within a quoted literal.  B           Quoted literals can be continued over several lines. Use@           the hyphen (-)  as the line continuation character and=           delimit the string with double quotes. For example:h          1     2-10 Components of MACRO-64 Source Statementst s                 @               .ASCII "Strings are delimited with double quotes."<               .ASCII "The backslash is an escape character."D               .ASCII "Strings can be continued onto multiple lines -&               just as any other line."=               .ASCII "Use two backslashes (\\) to represent -n%               the back-slash itself." 8               .ASCII "Hexidecimal escape sequences use --               lower or upper X: \x00 or \X00"iD               .ASCII "Precede a double quote with a backslash (\") -"               to embed the quote."           2.5 Symbolsr  H               You use symbols in MACRO-64 source statements to representI               an instruction, directive, register name, or value. You caniD               use four types of symbols in MACRO-64 source programs:A               permanent symbols, predefined symbols, user-definedb'               symbols, and macro names.u           2.5.1 Permanent Symbolse  B               Permanent symbols consist of MACRO-64 directives andC               instruction mnemonics. You need not define directives C               before you use them in the operator field of a MACRO-cE               64 source statement. It is also not necessary to define H               instruction mnemonics before using them in the instruction               statements.c            2.5.2 Predefined Symbols  G               Predefined symbols are MACRO-64 register symbols that areeE               not permanently reserved. You can delete the definitionoG               of any of these predefined register symbols. You can alsob/               define your own register symbols..  A               You can express the 32 general registers and the 32tF               floating-point registers of the Alpha AXP processor in a(               source program as follows:  I               ___________________________________________________________                RegisterI               Name____Description________________________________________   )               R0      General register 0.t  I                             Components of MACRO-64 Source Statements 2-11)                 E           ___________________________________________________________            RegisterE           Name____Description________________________________________-  %           R1      General register 1.              .       .t             .       .w             .       .   B           R29 or  General register 29 or frame pointer. If you useD           FP      R29 as a frame pointer, Digital recommends you useD                   the name FP. If you use R29 as a general register,:                   Digital recommends you use the name R29.  B           R30 or  General register 30 or stack pointer. If you useE           SP      R30 as a stack pointer, the name SP is recommended;nD                   if you use R30 as a general register, the name R30!                   is recommended.l  &           R31     General register 31.  ,           F0      Floating-point register 0.             .       .n             .       .              .       .t  E           F31_____Floating-point_register_31.________________________D  C              ________________________ Note ________________________;  =              When MACRO-64 operates in /NAMES=AS_IS mode, all5@              of the previous register symbols are defined in all)              uppercase and all lowercase.   C              ______________________________________________________.  =           To define your own register symbols, use either thetC           .DEFINE_FREG or .DEFINE_IREG directive for floating-pointiB           or integer registers, respectively. For more informationD           about the .DEFINE_FREG or .DEFINE_IREG directives, see the#           description in Chapter 5.   >           You can delete a register symbol definition with theA           .UNDEFINE_REG directive. For more information about the4D           .UNDEFINE_REG directive, see the description in Chapter 5.  E           While an identifier is defined as a register symbol, it cane?           only be used in those contexts that allow a register.O  1     2-12 Components of MACRO-64 Source Statementsd r  d              2         2.5.3 User-Defined Symbols and Macro Names  E               You can use symbols to define labels, or you can equate H               them to a specific value by a direct assignment statement.C               (See Section 2.11.) You can also use these symbols in C               expressions. For more information on expressions, seei               Section 2.8.  E               Use the following rules to create user-defined symbols:   E               o  Use alphanumeric characters, underscores (_), dollar4A                  signs ($), and periods (.).  Any other characterl'                  terminates the symbol.   D               o  The first character of a symbol cannot be a number.  G               o  The symbol must be no more than 31 characters long andc                   must be unique.  8               o  The symbol must not be a register name.  I               o  The symbol cannot be one of the following conditional ors"                  macro directives:  8                  .ELSE            .ENDC            .ENDM  C                  .ENDR            .IF              .IF_FALSE (.IFF)   7                  .IF_TRUE (.IFT)  .IF_TRUE_FALSE   .IIFt)                                   (.IFTF)   8                  .INCLUDE         .IRP             .IRPC  9                  .LIBRARY         .MACRO           .MCALL   8                  .MDELETE         .MEXIT           .NARG  )                  .NCHAR           .REPEAT   1               In addition, by Digital convention:f  E               o  The dollar sign ($) is reserved for names defined bysE                  Digital. This convention ensures that a user-defined A                  name (that does not have a dollar sign) will not E                  conflict with a Digital-defined name (that does haver                   a dollar sign).  D               o  Do not use the period (.) in any global symbol nameF                  because many languages, such as Fortran, do not allow)                  periods in symbol names.0  I                             Components of MACRO-64 Source Statements 2-13                    >           Macro names follow the same rules and conventions asA           user-defined symbols. See the description of the .MACROlE           directive in Chapter 5 for more information on macro names. D           User-defined symbols and macro names do not conflict; thatE           is, you can use the same name for a user-defined symbol and            a macro.  #     2.5.4 Determining Symbol Values   B           The value of a symbol depends on its use in the program.E           MACRO-64 uses a different method to determine the values ofoE           symbols in the operator field than it uses to determine then1           values of symbols in the operand field.   /     2.5.4.1 Using Symbols in the Operator Fieldm  B           A symbol in the operator field can be either a permanent@           symbol or a macro name. MACRO-64 searches for a symbol,           definition in the following order:  .           1. Macro and conditional directives:  0              .ELSE       .ENDC             .ENDM  ;              .ENDR       .IF               .IF_FALSE (.IFF)e  /              .IF_TRUE    .IF_TRUE_FALSE    .IIF                (.IFT)      (.IFTF)  0              .INCLUDE    .IRP              .IRPC  1              .LIBRARY    .MACRO            .MCALL   0              .MDELETE    .MEXIT            .NARG                 .NCHAR      .REPEAT  +           2. Previously defined macro nameso  B           3. Permanent symbols (instructions and other directives)  A           This search order allows most permanent symbols, exceptp<           conditional directives and macro directives, to be?           redefined as macro names. If a symbol in the operatorr@           field is not defined as a macro or a permanent symbol,2           the assembler displays an error message.  1     2-14 Components of MACRO-64 Source StatementsM n                 2         2.5.4.2 Using Symbols in the Operand Field  I               A symbol in the operand field must be either a user-defined :               numeric symbol, a label, or a register name.  I               User-defined numeric symbols and labels can be either localoF               (internal) symbols or global (external) symbols. WhetherG               numeric symbols and labels are local or global depends on .               their use in the source program.  D               You can reference a local numeric symbol or label onlyD               in the module in which it is defined. If local numericB               symbols or labels with the same names are defined inF               different modules, the symbols and labels are completelyG               independent. The definition of a global numeric symbol or,F               label, however, can be referenced from any module in the               program.  I               MACRO-64 treats all user-defined numeric symbols and labels I               as local unless you explicitly declare them to be global bye)               doing one of the following:   H               o  Use the double colon (::) in defining a label. For more:                  information on labels, see Section 2.1.1.  F               o  Use the double equal sign (==) in a direct assignmentE                  statement. For more information on direct assignmentA.                  statements, see Section 2.11.  E               o  Use the .WEAK directive. For more information on the 0                  .WEAK directive, see Chapter 5.  G               You can only use user-defined lexical string symbols with C               the lexical string operators. For more information on E               lexical string operators, see Chapter 3. You can define G               a macro using the same name as a previously defined local H               numeric symbol, global numeric symbol, or a lexical stringH               symbol. However, you cannot define a lexical string symbol7               and a numeric symbol using the same name.   H               In addition, you cannot use the same name for both a localG               and global numeric symbol. You cannot use the same symbolnD               name for both a numeric symbol (local or global) and a&               label (local or global).  I                             Components of MACRO-64 Source Statements 2-15d c  a              +     2.6 Temporary Labels Within Source Code   C           Use temporary labels to identify addresses within a blocka           of source code.              Format             nnnnn$:a             nnnnn 8           A decimal integer in the range of 1 to 65,535.  E           In most cases, you can use temporary labels in the same way_B           you use other labels that you define; however, there are           some differences:_  >           o  Temporary labels cannot be referenced outside the>              temporary label block in which they are declared.  C           o  Temporary labels can be redeclared in another block of               source code.x  D           o  Temporary labels that occur within a psect with the MIXD              or NOMIX attribute do not appear in the debugger symbolA              table; thus, they cannot be accessed by the symboliccE              debugger. For more information on psects, see Chapter 5.s  ;           o  Temporary labels cannot be used in the .END ortC              .PROCEDURE_DESCRIPTOR directives. For more information 2              on the .END directive, see Chapter 5.  =           By convention, temporary labels are positioned likeh>           statement labels: left-justified in the source text.@           Although temporary labels can appear in the program inE           any order, by convention, the temporary labels in any blocka?           of source code should be in increasing numeric order.   >           Temporary labels are useful as branch addresses when@           you use the address only within the block. You can useD           temporary labels to distinguish between addresses that areE           referenced only in a small block of code and addresses that C           are referenced elsewhere in the module. A disadvantage ofuE           temporary labels is that their numeric names do not providesC           any indication of their purpose. Consequently, you shouldrC           not use temporary labels to label sequences of statementssC           that are logically unrelated; you should use user-defined            symbols instead.  1     2-16 Components of MACRO-64 Source Statementss    R              C               Digital recommends that users create temporary labelstE               only in the range of 0$ to 29999$ because the assembleraD               automatically creates temporary labels in the range ofI               30000$ to 65535$ for use in macros. For more information on 0               temporary labels, see Section 4.7.  E               The temporary label block in which a temporary label ise=               valid is delimited by the following statements:r  7               o  A user-defined label: global or local.   G               o  A .PSECT directive. For more information on the .PSECT *                  directive, see Chapter 5.  D                  An example showing the correct and incorrect use of*                  temporary labels follows:  &                  A:    ADDQ R1, R2, R37                        BEQ R3, 2$         ; correct use &                        MULQ R2, R3, R4I                  2$:   ADDQ R1, R4, R5    ; definition of temporary labela3                  B:    BNE R5, 2$         ; illegalo&                  C:    SUBQ R2, R4, R6  D                  In this example, 2$ is a temporary label defined inF                  the block between A: and B:. The forward reference inF                  the second instruction is properly resolved. The lineC                  labeled B: also references 2$, but the label B hasdE                  already closed the range. The temporary label 2$ canoF                  be used later in the program, but its definition must;                  appear within the same block as the label.o  H               o  The .ENABLE and .DISABLE directives, which can extend aH                  local label block beyond user-defined labels and .PSECTD                  directives. For more information on the .ENABLE and4                  .DISABLE directives, see Chapter 5.  G               A temporary label block is usually delimited by two user-SH               defined labels. However, the .ENABLE LOCAL_BLOCK directiveC               starts a local block that is terminated by one of thea               following:  7               o  A second .ENABLE LOCAL_BLOCK directivec  E               o  A .DISABLE LOCAL_BLOCK directive followed by a user- 4                  defined label or a .PSECT directive  I                             Components of MACRO-64 Source Statements 2-17l                   <           Temporary labels can be preserved with the context:           of the program section in which they are defined;           for future reference. For more information on the B           .SAVE_PSECT [LOCAL_BLOCK] and .RESTORE_PSECT directives,           see Chapter 5.       2.7 Label Addresses   ;           In the absence of optimization and automatic datanD           alignment, label addresses are defined to be the psect andC           offset of the current location counter (see Section 2.11)a>           at the point where the label is defined. When eitherC           optimization or automatic data alignment are enabled, the D           following additional considerations apply. See Section B.7C           for information on optimizations and automatic alignment.o  ;     2.7.1 Label Addresses, Optimization, and Code Alignment   B           Optimization and code alignment can affect the addresses@           assigned to labels defined in psects that have the EXEC           and NOMIX attributes. Optimization and code alignment arehD           disabled by default, and can be enabled with the /OPTIMIZED           and /ALIGNMENT command-line qualifiers (see Section 1.2.1)B           and the .ENABLE directive (see Section 5.1). In general,C           the assembler assigns the psect and offset of the current"C           location counter before optimization or alignment of code E           labels. However, the assembler adjusts references to labelsrB           in branch instructions to the address of the label afterC           optimization and code alignment processing. The assemblerX>           does not adjust references to labels where the labelD           reference occurs in an expression with more than one term.+           The following example shows this:   )                   .PSECT CODE, EXE, NOMIX K                   BSR     R0, 10$            ; R0 -> 10$ (postoptimization) J           10$:    LDA     R1, 20$-10$(R0)    ; R1 -> 20$ (preoptimization)                   JMP     (R1)                   [...]            20$:  C           In the previous example, the assembler adjusts the target B           address of the BSR instruction to be the location of 10$A           after optimization and code alignment have taken place. A           Thus, the branch to 10$ functions as expected. However, E           when processing the LDA instruction, the assembler computes E           the offset between 20$ and 10$ before optimization and code   1     2-18 Components of MACRO-64 Source StatementsS o                 F               alignment. Thus, the address of 20$ that is stored in R1F               is the address prior to optimization and code alignment.G               Depending on the sequence of instructions between 10$ and E               20$, the address before optimization and code alignment E               may differ from the address after optimization and codesH               alignment and the JMP instruction may not transfer control&               to the expected address.  I               Note also that the assembler only performs postoptimization F               adjustment of label addresses when the label is the only2               term in the expression. For example:  -                       .PSECT CODE, EXE, NOMIXt'                       .BASE R27,LINKAGE 0                       LDQ     R26, ROUTINE1_ADDR(                       JSR     R26, (R26)0                       LDQ     R26, ROUTINE2_ADDR(                       JSR     R26, (R26)!                       RET     R28                        NOP                        NOP                  ROUTINE1:i#                       RET     (R26)                ROUTINE2:a#                       RET     (R26)u  +                       .PSECT LINKAGE, NOEXE                LINKAGE:               ROUTINE1_ADDR:'                       .ADDRESS ROUTINE1                ROUTINE2_ADDR:)                       .ADDRESS ROUTINE2+0P  H               In the previous example, the assembler adjusts the addressH               stored with the .ADDRESS ROUTINE1 directive to the addressF               of label ROUTINE1 after optimization and code alignment.F               However, since the expression in the .ADDRESS ROUTINE2+0D               directive is not a single term, the assembler adds theF               offset 0 and the address of ROUTINE2 before optimizationA               and code alignment and stores the result. Since theoH               address stored is the address before optimization and codeD               alignment, the second JSR instruction may not transfer6               control to the address that is expected.  I                             Components of MACRO-64 Source Statements 2-19  t                 6     2.7.2 Label Addresses and Automatic Data Alignment  ;           Automatic data alignment can affect the addressesnA           assigned to labels in psects that have the NOEXE or MIXt>           attributes. Automatic data alignment is enabled withA           the .ENABLE ALIGN_DATA directive or the /ALIGNMENT=data @           command-line option. For more information on automaticA           alignment, see Section 5.2. For more information on then-           .ENABLE directive, see Section 5.3.   @           A label that occurs in a statement with a data-storageC           directive is assigned the psect and offset of the storage ?           allocated by the data-storage directive. If the data- E           storage directive requires automatic alignment, the address =           is assigned to the label after automatic alignment.t  @           The same is true of labels that occur in statements by>           themselves and that are followed by a data directive?           in a subsequent statement. However, if a label occurshA           in a statement by itself and is followed by a statement B           that is not a data-storage directive, a macro directive,=           a conditional directive, or a lexical-string symbol @           assignment, the label is assigned the psect and offset>           of the current location counter before any automatic           alignment.  >           The assembler only assigns addresses to labels after=           alignment under the conditions previously described A           and only with automatic alignment. If you place a labellD           before a .ALIGN directive that manually aligns the currentD           location counter, the assembler assigns the address of theE           label before performing the manual alignment. The followingIC           example shows the interaction of label address assignment '           and automatic data alignment:                       1     2-20 Components of MACRO-64 Source Statements                    $                   .ENABLE ALIGN_DATA$                   .PSECT DATA, NOEXEP                   .BYTE   1       ; The byte is stored in psect data at offset 0F               A:  .PRINT "Not aligned" ; Any non-macro, nonconditionalN                                   ; statement, including this .PRINT directiveH                            ; prevents A from being automatically aligned=                                   ; -- A is assigned offset 1lJ               B:                  ; B is automatically aligned to offset 4J               C:  .LONG   2       ; C is automatically aligned to offset 4J               D:  .ALIGN 0        ; The .ALIGN global directive prevents DH                                   ;  from being automatically aligned ---                     ;  D is assigned offset 8oK               E:  .OCTA 3         ; E is automatically aligned to offset 16R  C               Automatic data alignment and label-address assignmentsD               can be an important consideration when calculating theF               difference between two labels. For example, consider theG               following macro, which stores a string preceded by a word 0               that contains the string's length:  ;                       .MACRO VARYING_STRING STRING ?L1, ?L2n)                               .WORD L2-L1o-                           L1: .ASCII "STRING"                            L2:e*                       .ENDM VARYING_STRING  I               If an invocation of the VARYING_STRING macro is followed byiI               a data-storage directive that requires automatic alignment, H               the VARYING_STRING macro will not store the correct string"               length. For example:  /                       .PSECT DATA, NOEXE, .OCTA (                       .ENABLE ALIGN_DATAK                       VARYING_STRING <Time for something sweet!> ; 25 bytes                F:      .OCTA 4   D               In this example, the intention is to make the L2 labelC               generated by the VARYING_STRING macro be assigned the C               offset 27, 2 for the .WORD directive, plus 25 for the E               .ASCII directive. Instead, it is assigned the offset 32dI               along with the label F because the .OCTA directive requiresbE               automatic alignment to offset 32. Therefore, the string C               length is incorrectly stored as 30 rather 25. To make H               this macro work as desired, you must include, in the macroG               definition, a macro directive that is not a data-storage,OG               macro, or conditional directive after the generated labell  I                             Components of MACRO-64 Source Statements 2-21  h  a              A           L2. In the following example, .ALIGN 0 is a good choice A           as it reflects the idea that the preceding label is nota           aligned:  0            .MACRO VARYING_STRING STRING ?L1, ?L2                 .WORD L2-L1b"                L1: .ASCII "STRING"                L2: .ALIGN 0i            .ENDM VARYING_STRING   >           With this change, the generated label L2 is assigned?           the offset 27 before the assembler performs automaticm>           data alignment for the .OCTA directive. As a result,B           the VARYING_STRING macro works as desired and stores the&           correct string length of 25.       2.8 Terms and Expressionsi  -           A term can be any of the following:e             o  A number.             o  A numeric symbol.             o  A label.t  B           o  The current location counter. For more information on<              the current location counter, see Section 2.12.  B           o  Any of the previously noted items preceded by a unary              operator.  C           For more information on unary operators, see Section 2.9.o  C           MACRO-64 evaluates terms as quadword (8-byte) values. The E           current location counter (.)  has the value of the locationa6           counter at the start of the current operand.  @           MACRO-64 considers unary operators part of a term and,A           thus, performs the action indicated by a unary operator =           before it performs the action indicated by a binaryt           operator.   @           Expressions are combinations of terms joined by binaryB           operators and evaluated as quadword (8-byte) values. ForA           more information on binary operators, see Section 2.10. @           MACRO-64 evaluates expressions from left to right withB           no operator precedence rules. However, you can use angleD           brackets (<>)  to change the order of evaluation. Any part  1     2-22 Components of MACRO-64 Source Statements     h              D               of an expression that is enclosed in angle brackets isC               first evaluated to a single value, which is then used E               in evaluating the complete expression. For example, theoG               expressions A*B+C and A*<B+C> are different. In the first.E               case, A and B are multiplied and then C is added to thesD               product. In the second case, B and C are added and theE               sum is multiplied by A. You can also use angle brackets H               to apply a unary operator to an entire expression, such as               -<A+B>.b  A               Expressions fall into four categories: relocatable, I               absolute, external (global), and complex. You can determinel<               the type of expression by the following rules:  C               o  An expression is relocatable if its value is fixedlH                  relative to the start of the psect in which it appears.A                  The current location counter is relocatable in a #                  relocatable psect.t  G               o  An expression is absolute if its value is an assembly-cA                  time constant. An expression whose terms are all F                  numbers is absolute. An expression that consists of aE                  relocatable term minus another relocatable term frommG                  the same psect is absolute, because such an expression 6                  reduces to an assembly-time constant.  G               o  An expression is external if it is not complex, and it I                  contains one or more symbols that are not defined in ther                   current module.  I               o  An expression is complex if it contains a relocatable orcH                  external term or subexpression that is operated upon byF                  an operator other than the plus sign (+) or the minusG                  sign (-). An expression is also complex if it contains H                  more than one term or subexpression that is relocatableI                  or external. An exception to this rule is the differencerF                  between two relocatable subexpressions or terms whereI                  both relocatable values occur in the same psect. In thisp2                  case, the expression is absolute.  F               Complex expressions are constrained to use the following               form:                  FORMAT                  term operator term  I                             Components of MACRO-64 Source Statements 2-23b t                            term:           Term is a relocatable or external subexpression.             operator@           Operator is any of the MACRO-64 operators described in           Section 2.10.r  @           Neither term can itself be a complex subexpression. IfB           you specify a complex expression that does not match the?           correct form, the assembler issues a diagnostic error @           message indicating that the expression is too complex.B           Note also that the assembler does not attempt to reorder@           expressions to make your expressions match the correctE           form. For example, the following expression is too complex:o              .external E1, E2 )            .quad E1+5+E2+6  ; too complex   D           Because the assembler has no precedence rules, it attemptsA           to evaluate the previous expression as <<<E1+5>+E2>+6>.nE           Since <<E1+5>+E2> is itself a complex term, <<<E1+5>+E2>+6>a>           does not match the previous form and is too complex.=           However, you can regroup the expression using angle >           brackets (<>) to match the required form as follows:              .external E1, E2t:            .quad <E1+5>+<E2+6>  ; legal complex expression  C           In this case, both <E1+5> and <E2+6> are simple, externalcD           terms. Since none of the terms are complex, the expression@           matches the correct form and the assembler accepts the           complex expression.t  =           You can use any type of expression in most MACRO-64s@           statements, but restrictions are placed on expressions)           used in the following contexts:              o  .BASE directive.o  1           o  .BLKx storage allocation directives.t  7           o  .IF conditional assembly block directives.c  -           o  .REPEAT repeat block directives.   *           o  Direct assignment statements.  D           o  Lexical string operator arguments. For more information?              on direct assignment statements, see Section 2.11.n  1     2-24 Components of MACRO-64 Source StatementsA I  L              H               See Chapter 5 for descriptions of the directives listed in!               the preceding list.   I               Expressions used in these contexts can contain only symbols H               or labels that have been previously defined in the current               module.h  B               The .BASE directive accepts expressions that containE               external symbols previously declared with the .EXTERNALrG               directive. The other contexts previously described cannot G               accept expressions that contain external symbols. Symbols,G               defined later in the current module cannot be used in any                 of these contexts.  D               Expressions in the .IF conditional directives, .REPEATA               conditional directives, and lexical string operator D               arguments are relocatable. However, expressions in the0               .BLKx directives must be absolute.  D               Expressions cannot contain floating-point numbers. TheD               floating-point data-storage directives accept constantD               values. They do not accept floating-point expressions.E               For more information on the floating-point data-storageg(               directives, see Chapter 5.  A               The following example shows the use of expressions:a  I               A = 2*100                 ; 2*100 is an absolute expressionsL                       .BLKB   A+50      ; A+50 is an absolute expression andI                                         ;   contains no undefined symbolsg<               LAB:    .BLKW   A         ; LAB is relocatableD               HALF = LAB+<A/2>          ; LAB+<A/2> is a relocatableF                                         ;   expression and contains no=                                         ;   undefined symbolsaL               LAB2:   .BLKB   LAB2-LAB  ; LAB2-LAB is an absolute expressionM                                         ;   and contains no undefined symbols   5         2.9 Unary Operators for Terms and Expressions0  C               A unary operator modifies a term or an expression and B               indicates the action to be performed on that term orF               expression. Expressions modified by unary operators mustH               be enclosed in angle brackets. You can use unary operatorsB               to indicate whether a term or expression is positiveC               or negative. If unary plus or minus is not specified, E               the default value is plus. In addition, unary operatorsn  I                             Components of MACRO-64 Source Statements 2-252 a  1              E           perform radix conversion and numeric control operations, asSC           described in the following sections. Table 2-3 summarizes            the unary operators.  E           Table_2-3_Summary_of_Unary_Operators_______________________              Unary   OperatorE           OperatorName________Example___Operation____________________r  E           +       Plus sign   +A        Results in the positive valuer-                                         of A.   ?           -       Minus sign  -A        Results in the negative @                                         (two's complement) value-                                         of A.   @           \       Value of    \symbol   Indicates that the value?                   Escape                of the symbol should be B                                         used. In a string literal,E                                         indicates an escape sequence. 4                                         For example:1                                         "Bob\X0A"   D           ^A or   ASCII       ^A/ABCD/  Specifies an ASCII constant.           ^a  D           ^B or   Binary      ^B11000111Specifies that 11000111 is a6           ^b                            binary number.  ?           ^D or   Decimal     ^D127     Specifies that 127 is aX7           ^d                            decimal number.   E           ^O or   Octal       ^O34      Specifies that 34 is an octal /           ^o                            number.   @           ^X or   Hexadecimal ^XFCF9    Specifies that FCF9 is a;           ^x                            hexadecimal number.t  E           ^C or   Complement  ^C24      Produces the one's complementlE           ^c____________________________value_of_24_(decimal)._______O  !     2.9.1 Radix Control Operatorsn  B           Radix control operators determine the radix of a term orC           expression. MACRO-64 accepts terms or expressions in fouriE           different radixes: binary, decimal, octal, and hexadecimal.i'           The default radix is decimal.e             FORMATSm             ^Bnn ^Dnn ^Onn ^Xnna  1     2-26 Components of MACRO-64 Source Statementst    e                             nnC               A string of characters that is legal in the specified D               radix. The following are the legal characters for each               radix:  I               ___________________________________________________________aI               Format__Radix_Name__Legal_Characters_______________________   )               ^Bnn    Binary      0 and 1A  (               ^Dnn    Decimal     0 to 9  (               ^Onn    Octal       0 to 7  I               ^Xnn____Hexadecimal_0_to_9_and_A_to_F______________________h  C               You can include radix control operators in the source H               program anywhere a numeric value is legal. A radix controlF               operator affects only the term immediately following it,G               causing that term to be evaluated in the specified radix.s               For example:  <               .WORD   ^B00001101              ; Binary radixG               .WORD   ^D123                   ; Decimal radix (default)y;               .WORD   ^O47                    ; Octal radixi  I               Do not place spaces or tabs between the circumflex (^), the D               radix specifier (B, D, O, or X), or the numeric value.  )         2.9.2 Numeric Complement Operator   H               The complement operator (^C) produces the one's complement%               of the specified value.g                 FORMAT                 ^Cterm                 termG               Any term or expression. If an expression is specified, ita1               must be enclosed in angle brackets.n  D               MACRO-64 evaluates the term or expression as an 8-byte9               value before complementing it. For example:a  >               .LONG      ^C^XFF      ; Produces FFFFFF00 (hex)=               .LONG      ^C25        ; Produces complement of :                                      ;   25 (dec) which is7                                      ;   FFFFFFE6 (hex)e  I                             Components of MACRO-64 Source Statements 2-27     -                   2.10 Binary Operatorst  B           In contrast to unary operators, binary operators specify>           actions to be performed on two terms or expressions.B           You can enclose expressions in angle brackets to specifyB           the order of evaluation. Table 2-4 summarizes the binary           operators.  E           Table_2-4_Summary_of_Binary_Operators______________________p                Binary OperatorE           ___OperatoName__________Example_Operation__________________   2              +      Plus sign     A+B     Addition  5              -      Minus sign    A-B     Subtraction   8              *      Asterisk      A*B     Multiplication  2              /      Slash         A/B     Division  :              @      At sign       A@B     Arithmetic shift  ?              &      Ampersand     A&B     Logical AND (product)   :              !      Exclamation   A!B     Logical OR (sum)                     point   E           ___\______Backslash_____A\B_____Logical_XOR_(difference)___a  A           All binary operators have equal priority. You can groupiB           terms or expressions for evaluation by enclosing them in@           angle brackets. The enclosed terms and expressions areA           evaluated first, and remaining operations are performed *           from left to right. For example:  *           .LONG      1+2*3      ; Equals 9*           .LONG      1+<2*3>    ; Equals 7  ?           Note that a 64-bit result is returned from all binary_?           operations. If you use the 64-bit result in a contextc@           requiring less than 64 bits, only the lower-order bitsA           of the result are used. If the truncation causes a lossoD           of significance in a data-storage directive, the assembler$           displays an error message.  ?           The following sections describe the arithmetic shift, B           logical AND, logical inclusive OR, and logical exclusive           OR operators.T  1     2-28 Components of MACRO-64 Source Statementsi o  k              (         2.10.1 Arithmetic Shift Operator  C               Use the arithmetic shift operator (@) to perform leftdG               and right arithmetic shifts of arithmetic quantities. ThesF               first argument is shifted left or right by the number ofD               bit positions that you specify in the second argument.G               If the second argument is positive, the first argument isdI               shifted left and the low-order bits are set to zero. If theuH               second argument is negative, the first argument is shiftedG               right and the high-order bits are set to the value of thefB               original high-order bit (the sign bit). For example:  L                       .LONG   ^B101@4              ; Yields 1010000 (binary)H                       .LONG   1@2                  ; Yields 100 (binary)               A = 4iJ                       .LONG   1@A                  ; Yields 10000 (binary)D                       .LONG   ^X1234@-A            ; Yields 123(hex)  #         2.10.2 Logical AND Operator   G               The logical AND operator (&) takes the logical AND of twoe$               operands. For example:                 A = ^B1010               B = ^B1100D                       .LONG   A&B             ; Yields 1000 (binary)  ,         2.10.3 Logical Inclusive OR Operator  E               The logical inclusive OR operator (!) takes the logicalx8               inclusive OR of two operands. For example:                 A = ^B1010               B = ^B1100D                       .LONG   A!B             ; Yields 1110 (binary)  ,         2.10.4 Logical Exclusive OR Operator  E               The logical exclusive OR operator (\) takes the logicalh9               exclusive OR of two arguments. For example:o                 A = ^B1010               B = ^B1100D                       .LONG   A\B             ; Yields 0110 (binary)  I                             Components of MACRO-64 Source Statements 2-29  u  f              %     2.11 Direct Assignment Statements   =           A direct assignment statement equates a symbol to apB           specific value. Unlike a symbol that you use as a label,D           you can redefine a symbol defined with a direct assignment.           statement as many times as you want.             FORMATSn             symbol=expressiony             symbol==expression             symbol=quoted-literalr             symbol            A user-defined symbol.             expressionC           An expression that does not contain any undefined symbolsoB           or forward references. For more information on terms andA           expressions, see Section 2.8. The result must be either2>           an absolute or relocatable value, whose value can beD           determined at the current point in the assembly. This form#           defines a numeric symbol.s  B           The format with a single equal sign (=)  defines a local>           symbol, and the format with a double equal sign (==)C           defines a global symbol. For more information about localn0           and global symbols, see Section 2.5.4.  =           The following three syntactic rules apply to directe            assignment statements:  >           o  An equal sign (=)  or double equal sign (==) mustA              separate the symbol from the expression that defines>@              its value. Spaces preceding or following the direct=              assignment operators have no significance in the               resulting value.   >           o  Only one symbol can be defined in a single direct"              assignment statement.  D           o  A direct assignment statement can be followed only by a              comment field.   1     2-30 Components of MACRO-64 Source Statementsi                   G               For best results, Digital recommends you place the symbol F               in a direct assignment statement in the label field. For               example:  B               A == 1                  ; The symbol 'A' is globally@                                       ;   equated to the value 1  A               B = A@5                 ; The symbol 'B' is equatede;                                       ;   to 1@5 or 32(dec).  A               C = 127*10              ; The symbol 'C' is equateda6                                       ;   to 1270(dec)  A               D = ^X100/^X10          ; The symbol 'D' is equated 4                                       ;   to 10(hex)                 quoted-literalI               A literal within double quotes. This form defines a lexicalaI               string symbol. You can only use lexical string symbols with '               lexical string operators.c  C               For more information on lexical string operators, seer               Chapter 3.  %         2.12 Current Location Counter   B               The current location counter is a counter kept by an?               assembler to determine the address assigned to ancB               instruction or constant that is being assembled. TheF               symbol for the current location counter, the period (.),G               represents the address of the current byte. MACRO-64 sets G               the current location counter to 0 at the beginning of theRH               assembly and at the beginning of each new program section.  F               Every MACRO-64 source statement that allocates memory inC               the object module increments the value of the current D               location counter by the number of bytes allocated. ForD               example, the directive, .LONG 0 increments the currentG               location counter by 4. However, with the exception of thesD               special form described later in this section, a directI               assignment statement does not increase the current location 5               counter because no memory is allocated.e  C               The current location counter can be explicitly set bycD               a special form of the direct assignment statement. TheH               location counter can be either incremented or decremented.I               This method of setting the location counter is often useful+  I                             Components of MACRO-64 Source Statements 2-31                    B           when defining data structures. Data-storage areas shouldE           not be reserved by explicitly setting the location counter;tD           use the .BLKx directives. For more information on the .BLK#           directive, see Chapter 5.e             FORMAT             .=expression             expression>           An expression that does not contain any undefined or@           external symbols. For more information on expressions,           see Section 2.8.  E           In a relocatable psect, the expression must be relocatable;iC           that is, the expression must be relative to an address innC           the current psect. It also may be relative to the current (           location counter. For example:  :           . = .+40        ; Moves location counter forward  @           When a psect that you defined in the current module isD           continued, the current location counter is set to the last>           value of the current location counter in that psect.  7           In a psect with the EXE and NOMIX attributes:1  4           o  The location counter cannot be changed.  =           o  If optimization is enabled, the location countero9              represents the location before optimization.   ;           In a psect with either the EXE or NOMIX (or both)c           attributes:   1           o  The location counter can be changed.e  A           o  If you store an initial data or instruction value ini?              memory with a data directive such as .BYTE, .WORD,sB              .LONG, or .QUAD or with an instruction statement, youD              can replace that initial value with a different initialE              value later in the assembly by assigning the appropriate >              address value to the current location counter and;              entering another data directive or instructiontD              statement. However, the new value must be the same sizeD              and must start at exactly the same address as the value              it replaces.n  B           For more information on optimization, see Section 2.7.1.  1     2-32 Components of MACRO-64 Source Statementsr T                       I                                                                         3yI         _________________________________________________________________i  I                                                MACRO-64 Lexical Operators     D               This chapter describes the MACRO-64 lexical operators.  -         3.1 Processing with Lexical Operators   D               Lexical operator processing is performed on all sourceH               lines and macro expansion lines before any other assemblerH               processing. Thus, macro invocations, assembler directives,I               and instructions are subject to lexical operator processing 1               before normal assembler processing.   C               Lexical operators are recognized and processed within H               string literals. Lexical operator processing is suppressedF               during macro registration in order that lexical operatorB               evaluation may occur during macro expansion. LexicalC               operator evaluation is also suppressed for a range offE               text that is conditionally excluded with one of the .IF I               directives. In addition, lexical operator processing is notd)               performed within a comment.e  #         3.2 Lexical Operator Syntaxu  F               You invoke a lexical string operator with a percent signH               followed by the lexical operator name, a left parentheses,B               a list of arguments separated by commas, and a rightB               parentheses. The following example shows the lexical               operator syntax:  -               .print "%EDIT(<Fred>,<upcase>)"n  G               Spaces are allowed between syntax elements in the generalnI               lexical operator syntax. For example, the following syntax,_+               including spaces, is allowed:_  2               .print "%EDIT ( <Fred> , <upcase> )"    I                                            MACRO-64 Lexical Operators 3-1l s                 A           Spaces are also allowed between the opening and closing ?           percent signs in a lexical substitution operator. SeeeA           Section 3.4 for information on the lexical substitutionn           operator.   *           .print "% lexical_symbol_name %"  B           Spaces are not allowed between the pair of percent signsC           indicating a lexical escape operator. See Section 3.5 for 5           information on the lexical escape operator.   D           You can specify lexical operator arguments in the same way           as macro arguments:   D           o  A numeric symbol name preceded by a backslash (\). ThisB              construct results in the decimal value of the numeric7              symbol, as shown in the following example:1                   \N  D           o  Any string of characters surrounded by left- and right-?              angle brackets, as shown in the following example:                 <Foo bar thud>   <              You can nest angle brackets (<>).  For example:                <<X+7>*17>   ?           o  Any string of characters surrounded by a delimiteroC              specified after a caret character (^). You cannot nest %              delimiters. For example:r                ^%Foo bar thud%  D           o  Any undelimited string of characters not separated by aD              space, tab, form feed, comma, equal sign, semicolon, or&              end of line. For example:                A+B+C  B           In addition to the formats allowed for a macro argument,E           you can also specify lexical operator arguments as follows:a  A           o  An undelimited string of characters may also contain B              a string of characters enclosed within left and rightC              parentheses. The characters between the left and right E              parentheses may contain space, tab, or comma delimiters.e              For example:e                16( R27 )  "     3-2 MACRO-64 Lexical Operators                   I               o  You can use a lexical operator as an argument to anothero/                  lexical operator. For example:_  F                  %EXTRACT( %LOCATE($,X), %LENGTH(X) - %LOCATE($,X) ,X)  I               Except for the %TYPE lexical operator, a string symbol name F               supplied as a lexical operator argument is replaced with-               the value of the string symbol.r  G               Each lexical operator accepts a given number of argumentsaD               and each argument has a specific type. There are threeE               different types of arguments-string, integer, and name:n  C               o  A string argument can be any arbitrary sequence ofR                  characters.  G               o  An integer argument must be an absolute or relocatable E                  expression that can be resolved at that point in theiF                  assembly. A relocatable expression represents a psectB                  and an offset within that psect. If you specify aD                  relocatable expression for an integer argument, theC                  assembler uses only the value of the offset within A                  the psect. The offset value is determined before @                  optimization and code alignment, but after data                  alignment.c  I               o  The name argument type is used only by the %TYPE lexical F                  operator. The %TYPE lexical operator accepts the nameE                  of a numeric symbol, string symbol, label, psect, or E                  a permanent symbol as its argument. Unlike the other H                  lexical operators, if a string symbol name is specifiedH                  as an argument to %TYPE, the value of the string symbolF                  is not substituted for its name. Instead, information,                  about the name is returned.  E               If you omit a string argument, the default is the emptysE               string. An empty string is a string with no characters. C               If you omit an integer argument or specify an illegal D               expression, the default value is 0. The assembler doesH               not issue diagnostic messages for illegal expressions usedE               as arguments to lexical operators. If you omit the nameaF               argument or specify an illegal name to the %TYPE lexical0               operator, %TYPE returns a 0 value.    I                                            MACRO-64 Lexical Operators 3-3     t              2     3.3 Numeric Symbols and Lexical String Symbols  B           Lexical string symbols are similar in concept and syntaxE           to numeric symbols. MACRO-64 supports numeric symbols using            the following syntax:o  2           numeric_symbol_name = numeric_expression  <           MACRO-64 supports lexical string symbols using the           following syntax:o  9           string_symbol_name = "any string of characters"p  =           The assembler differentiates between numeric symbolcE           assignment and lexical string symbol assignment as follows:,  C           o  In a lexical string symbol assignment, a quoted string 6              literal must appear after the equal sign.  E           o  A lexical string symbol value is specified by the quoted4              string literal.  A           The quotes are not included in the value of the lexicaloC           string symbol. You cannot use the same name for a lexicali2           string symbol, numeric symbol, or label.  C           Like numeric symbols, lexical string symbols are assemblyv>           time variables. After you assign a string value to aC           lexical string symbol, you can reassign a different value /           to that symbol later in the assembly.c  D           You can use lexical string symbols as arguments to lexical@           operators. In particular, you can use a lexical stringD           symbol as an argument to the lexical substitution operator@           (%)  or the %STRING lexical operator to substitute theE           value of the lexical string symbol at any point in the text            of your program.  %     3.4 Lexical Substitution Operatori  D           You can use the lexical substitution operator at any pointB           in your program to cause the assembler to substitute the>           value of a lexical string symbol for the name of theB           symbol. The lexical substitution operator is the percentB           sign (%). Place the lexical substitution operator to theA           left and right of the name of the lexical string symbol 1           that you wish to subsitute, as follows:   "     3-4 MACRO-64 Lexical Operators @                                %lexsym_name%                  For example:  6                    HORSES    = "All the king's horses"3                    MEN       = "all the king's men" .                    .print "%HORSES% and %MEN%"  E               This example defines two lexical string symbols: HORSESlI               and MEN. The third statement displays a message at assembly0G               time. The text of the message specifies that the value of F               the HORSES and MEN lexical string symbols be substitutedI               as indicated. After lexical processing, the third statement                appears as:o  H                    .print "All the king's horses and all the king's men"  #         3.5 Lexical Escape Operator!  H               It is possible to defer the processing of a lexical stringI               operator by using the lexical escape operator, which is theoH               percent sign (%). Since all lexical string operators beginD               with a percent sign, the effect of placing two percentI               signs before the name of the lexical string operator defers H               the evaluation of the lexical string operator. If you wantE               to defer processing of a lexical substitution operator,tG               place two percent signs to the left and two percent signs =               to the right of the lexical string symbol name.e  B               This can be useful when you want the evaluation of aE               lexical string operator that you have used in a default I               macro argument to occur during macro expansion, rather thanbE               during macro definition. Lexical operator processing is F               suppressed during macro registration. Therefore, lexicalF               operator processing is automatically deferred within theF               body of a macro. However, the .MACRO directive line thatF               begins the macro definition is subject to normal lexicalD               operator processing. Sometimes you may need to use theI               value of a lexical string symbol as the default for a macrocD               argument, but you need to use the value of the lexicalG               string symbol that is current when the macro expands, not H               when the macro is defined. Example 3-1 shows an example of;               this, but it does not use an escape operator.e    I                                            MACRO-64 Lexical Operators 3-5     s              D           Example 3-1 Lexical Processing Without the Escape Operator  '               CODE_PSECT_NAME = "CODE1" C               .MACRO CODE_PSECT PSECT_NAME=%string(CODE_PSECT_NAME)r                 .PSECT PSECT_NAME               .ENDM CODE_PSECT               CODE_PSECT'               CODE_PSECT_NAME = "CODE2"                CODE_PSECT  B           Example 3-1 does not process correctly for the following           reasons:  A           o  The lexical operator in the .MACRO directive line istD              processed when the macro is defined, not when the macro              expands.e  <           o  The CODE_PSECT macro always defaults to setting=              the psect to the CODE1 psect because the default ?              for the PSECT_NAME  argument will be set to CODE1, :              not %string(CODE_PSECT_NAME). This is becauseA              %string(CODE_PSECT_NAME) is evaluated when the CODE_ 9              PSECT macro is defined, not when it expands.   B           Example 3-2 is similar to Example 3-1 except it uses the"           lexical escape operator.  =           Example 3-2 Lexical Processing with Escape Operator   '               CODE_PSECT_NAME = "CODE1"tD               .macro CODE_PSECT PSECT_NAME=%%string(CODE_PSECT_NAME)              .psect PSECT_NAME               .endm CODE_PSECT               CODE_PSECT'               CODE_PSECT_NAME = "CODE2"                CODE_PSECT  D           Example 3-2 processes correctly for the following reasons:  E           o  Lexical operator processing of %%string(CODE_PSECT_NAME)iB              is deferred when the CODE_PSECT macro is defined. TheC              default value for the PSECT_NAME argument is stored asn&              %string(CODE_PSECT_NAME).    "     3-6 MACRO-64 Lexical Operators e  t              D               o  During macro expansion, %string(CODE_PSECT_NAME) isE                  evaluated, which results in the current value of theoB                  CODE_PSECT_NAME lexical string symbol as desired.  #         3.6 Using Lexical OperatorsR  I               This section contains two programming examples. Example 3-3l>               shows source statements using lexical operators.F               Example 3-4 shows the same source statements after macro8               expansion and lexical operator processing.  1               Example 3-3 Using Lexical Operators   D                       ; Macro to load a general or floating register.                       .macro LOAD REG LOCATION  L                           ; If the location doesn't specify a base register,L                           ; load relative to the procedure descriptor PD off#                           ; of R27. K                           .if lt, %locate(<(>, LOCATION), %length(LOCATION)r7                               ; base register specifiedf.                               LOC = "LOCATION"                           .elsep;                               ; base register not specified 6                               LOC = "LOCATION-PD(R27)"                           .endcr  F                           ; Use LDQ if a general register is specifiedD                           .if ne, <%type(REG) & MACRO64$TYPE_GENREG>4                               LDQ   REG,%string(LOC)  I                                                  (continued on next page)i                          I                                            MACRO-64 Lexical Operators 3-7e o  .              5           Example 3-3 (Cont.) Using Lexical Operatorst                         .elseeG                           ; Use LDx if a floating register is specified.C                           .if ne <%type(REG) & MACRO64$TYPE_FLTREG> E                               ; Use the appropriate LDx floating loadaD                               ; depending on the first letter of the1                               ; location to load. -                               FTYPES = "FGST"eJ                               .if ge, %locate(%extract(0,1,LOC),FTYPES), -1                                   %length(FTYPES)n*                                   .error -B                    "Unknown floating data type: %extract(0,1,LOC)"(                                   .mexit#                               .endcEG                               LD%extract(0,1,LOCATION) REG,%string(LOC)                            .else &                               .error -J                    "First argument must be a general or floating register"                           .endcr                       .endc                    .endm LOAD                    .psect D,noexe;           pd:     .procedure_descriptor my_routine,my_entryy;                   ; Fill in procedure descriptor details...            BUILD_TIME:u(                   .asciz       "%time()"1           K:      .quad        %repeat(9,<42,>)42t&           GPI:    .g_floating  3.14159)           CIRCLE: .address     FAC_CIRCLEt           TX      = 0t           TY      = 8i           TRADIUS = 16                   .psect X,exe           MY_ENTRY:.                   LOAD  R1,K!                   LOAD  R2,CIRCLE '                   LOAD  F13,TRADIUS(R2)                    LOAD  F11,GPI                    LOAD  F10,K_                   LOAD  K_  E                                              (continued on next page)     "     3-8 MACRO-64 Lexical Operators                   9               Example 3-3 (Cont.) Using Lexical Operators     A               Example 3-4 Source Statements After Macro Expansionr  $                       .psect D,noexe?               pd:     .procedure_descriptor my_routine,my_entryr?                       ; Fill in procedure descriptor details...s               BUILD_TIME: 9                       .asciz       " 9-JUL-1992 17:56:20"e@               K:      .quad        42,42,42,42,42,42,42,42,42,42*               GPI:    .g_floating  3.14159-               CIRCLE: .address     FAC_CIRCLEr               TX      = 0s               TY      = 8                TRADIUS = 16"                       .psect X,exe               MY_ENTRY:m(                       LDQ   R1,K-PD(R27)-                       LDQ   R2,CIRCLE-PD(R27)e+                       LDT   F13,TRADIUS(R2) )                       LDG F11,GPI-PD(R27)I<                       .error "Unknown floating data type: K"T                       .error "First argument must be a general or floating register"                                          I                                            MACRO-64 Lexical Operators 3-9h e  a                   3.7 Lexical Operators   @           This section describes the MACRO-64 lexical operators,C           their return values, and their arguments. Table 3-1 lists D           the lexicals and gives a brief summary of their functions.E           A decimal return value results in the decimal digits of the C           numeric value being substituted for the lexical operator.l  E           Table_3-1_Summary_of_MACRO-64_Lexicals_____________________                        ReturnE           Lexical___Type______Function_______________________________i  ?           %EDIT     String    Lexical operator for editing text &                               strings.  @           %ELEMENT  String    Lexical operator for extracting an>                               element from a list of elements.  ?           %EXTRACT  String    Lexical operator for extracting a B                               range of characters from a string of)                               characters.   <           %FREG     String    Lexical operator for obtaining@                               the floating-point register number7                               associated with a symbol.s  C           %INTEGER  Decimal   Lexical operator to convert the valuehB                               of an expression to a decimal value.  @           %IREG     String    Lexical operator for obtaining theE                               integer register number associated withe'                               a symbol.t  B           %LENGTH   Decimal   Lexical operator for determining the1                               length of a string.   D           %LOCATE   Decimal   Lexical operator for locating a string@                               of text within a another string of#                               text.s  >           %REPEAT   String    Lexical operator for repeating aA                               specified string x number of times.e  @           %STRING   String    Lexical operator for obtaining the?                               value of a lexical string symbol.   E           %TIME     String    Lexical operator for obtaining the dateg<                               and time of the assembly unit.  <           %TYPE     Decimal   Lexical operator for obtainingE           ____________________information_about_a_name.______________t  #     3-10 MACRO-64 Lexical Operatorsh s  h      I                                                MACRO-64 Lexical OperatorsaI                                                     3.7 Lexical Operators1    I         _________________________________________________________________   
         %EDITe  8               Lexical operator for editing text strings.           Format  &               %EDIT  (string1,string2)           Arguments%                 string1,I               The first argument, of type string, specifies the string ton               be edited.                 string2aF               The second argument, of type string, specifies a list of>               edits to perform, which are separated by commas.           Description   E               %EDIT is modeled after the OpenVMS DCL lexical function B               F$EDIT. It is used to perform one or more edits on aG               specified string. %EDIT processes the string of arguments D               from left to right. %EDIT gives precedence to the last@               argument. %EDIT gives precedence to uppercase over               lowercase.  B               The list of edits may contain any combination of the!               following elements:t  I               ___________________________________________________________ I               Element_____Function_______________________________________e  6               COLLAPSE    Removes all tabs and spaces.  G               COMPRESS    Replaces multiple, consecutive tabs or spacesi.                           with a single space.  D               LOWERCASE   Changes uppercase characters to lowercase.  G               TRIM        Removes leading and trailing spaces and tabs.h  I               UPCASE______Changes_lowercase_characters_to_uppercase._____   I                                           MACRO-64 Lexical Operators 3-11                 MACRO-64 Lexical Operators	     %EDITs           Examples                Example 1  H                   .PRINT "%EDIT(< Fred Smith >, <TRIM,COLLAPSE,UPCASE>)"  B              After lexical processing, the statement apears as the              following:   $                   .PRINT "FREDSMITH"                Example 2  =                   .PRINT "%EDIT(<AbCdEfG>,<upcase,lowercase>) =                   .PRINT "%EDIT(<AbCdEfG>,<lowercase,upcase>)e  E              The first source statement produces the string "abcdefg"s@              and the second source statement produces the string=              "ABCDEFG". Each of the edits in the edit list iso7              performed in sequence, from left to right.l                                                #     3-12 MACRO-64 Lexical Operators            I                                                MACRO-64 Lexical Operators I                                                                  %ELEMENTi    I         _________________________________________________________________o           %ELEMENT  E               Lexical operator for extracting elements from a list ofu               elements.i           Format  1               %ELEMENT  (integer,string1,string2)g           Argumentsw                 integer H               The first argument, of type integer, is the element number8               to extract. The first element is number 0.                 string1yF               The second argument, of type string, is the delimiter or0               delimiters that separate elements.                 string2u@               The third argument, of type string, is the list of               elements.            Description   H               %ELEMENT is modeled after the OpenVMS DCL lexical functionH               F$ELEMENT. It is used to extract one element from a stringF               of elements. Note that unlike F$ELEMENT, you may specifyE               multiple delimiters. The result is the specified string F               element. If the specified element number is greater thanH               the number of elements in the list, the delimiter argument               is returned.           Examplem  ;                      .PRINT "%ELEMENT (2, <+-*/>, JOE+FRED-r         TOM*BILL/ERIC)"t  A               After lexical processing, the statement appears as:r  !                      .PRINT "TOM"e    I                                           MACRO-64 Lexical Operators 3-13a n  o           MACRO-64 Lexical Operators     %EXTRACT    E     _________________________________________________________________s       %EXTRACT  D           Lexical operator for extracting a range of characters from!           a string of characters.x  
     Format  .           %EXTRACT  (integer1,integer2,string)  
     Argumentsn             integer1E           The first argument, of type integer, is the offset at which C           to begin the extraction. The first character is at offset            0.             integer2@           The second argument, of type integer, is the number of            characters to extract.             string@           The third argument, of type string, is the string from*           which to extract the characters.       Description   E           %EXTRACT is modeled after VAX MACRO's %EXTRACT macro stringdB           operator and the OpenVMS DCL lexical function F$EXTRACT.E           %EXTRACT is used to extract a specified range of characters            from a string.       Examplee  9                   .PRINT "%EXTRACT(3,4,ABCDEFGHIJKLMNOP)"y  =           After lexical processing, the statement appears as:r                     .PRINT "DEFG"           #     3-14 MACRO-64 Lexical Operatorsr    l      I                                                MACRO-64 Lexical Operators!I                                                                     %FREGg    I         _________________________________________________________________   
         %FREGn  H               Lexical operator for obtaining the floating-point register.               number associated with a symbol.           Format                 %FREG  (symbol)s           Argument                 symbolE               The single argument, of type string, specifies a symboldE               that may or may not be currently defined as a floating-c$               point register symbol.           Description   D               %FREG returns the decimal number of the floating-point@               register when the specified symbol is defined as aF               floating-point register symbol. Otherwise, %FREG returns               32.t           Exampleo  2                     ; Is TARG_REG the same as F31?:                     .IF EQ, <%FREG(TARG_REG)>, <%FREG(31)>  I               If TARG_REG has been defined as floating-point register F5,rH               the statements appear as follows after lexical processing:  2                     ; Is TARG_REG the same as F31?%                     .IF EQ, <5>, <31>s                    I                                           MACRO-64 Lexical Operators 3-15                 MACRO-64 Lexical Operators     %INTEGER    E     _________________________________________________________________e       %INTEGER  D           Lexical operator for converting the value of an expression           to a decimal value.i  
     Format             %INTEGER  (integer)        Argument             integerpD           The single argument, of type integer, is the expression to           be converted.        Description   D           %INTEGER is modeled after the OpenVMS DCL lexical functionE           F$INTEGER. It is used to convert the value of an expressionCB           to a decimal value. The result is its decimal value. YouC           can also use %INTEGER to convert a relocatable expression            to an absolute value.        Example   0                   .PRINT "%INTEGER (<<X+7>*17>)"  =           After lexical processing, if X has the value 3, theT#           statement will appear as:e                     .PRINT "170"                        #     3-16 MACRO-64 Lexical Operators  e  n      I                                                MACRO-64 Lexical Operators I                                                                     %IREGE    I         _________________________________________________________________A  
         %IREGu  H               Lexical operator for obtaining the integer register number'               associated with a symbol.            Format                 %IREG  (symbol)            Argument                 symbolE               The single argument, of type string, specifies a symbol D               that may or may not be currently defined as an integer               register symbol.           DescriptionN  F               %IREG returns the decimal number of the integer registerI               when the specified symbol is defined as an integer register 2               symbol. Otherwise, %IREG returns 32.           Examplew  0                     ; Is SRC_REG the same as SP?9                     .IF EQ, <%IREG(SRC_REG)>, <%IREG(SP)>d  F               If SRC_REG has been defined as integer register R16, theD               statements appear as follows after lexical processing:  0                     ; Is SRC_REG the same as SP?&                     .IF EQ, <16>, <30>                      I                                           MACRO-64 Lexical Operators 3-17e r  t           MACRO-64 Lexical Operators     %LENGTHx    E     _________________________________________________________________        %LENGTHs  B           Lexical operator for determining the length of a string.  
     Format             %LENGTH  (string)t       Argument             stringA           The single argument, of type string, is the string fromn-           which the length is to be computed.        Descriptione  C           %LENGTH is modeled after VAX MACRO's %LENGTH macro stringfA           operator and the OpenVMS DCL lexical function F$LENGTH. B           %LENGTH is used to determine the length of a string. TheC           result is the length of the string expressed as a decimald           number.        Example   9                   .PRINT "%LENGTH(<The quick brown fox>)"(  =           After lexical processing, the statement appears as:                      .PRINT "19"                             #     3-18 MACRO-64 Lexical Operators  e  p      I                                                MACRO-64 Lexical Operators I                                                                   %LOCATE     I         _________________________________________________________________            %LOCATE   C               Lexical operator for locating a string of text withinD%               another string of text.            Format  (               %LOCATE  (string1,string2)           Arguments                  string1 I               The first argument, of type string, is the string for which                %LOCATE searches.                  string2 I               The second argument, of type string, is the string in which &               the search is performed.           Description(  G               %LOCATE is modeled after VAX MACRO's %LOCATE macro stringpE               operator and the OpenVMS DCL lexical function F$LOCATE.tB               %LOCATE is used to locate one string within another.C               The value returned is the decimal offset to the first F               occurrence of the first string within the second string.I               The offset to the first character is 0. If the first string I               cannot be found within the second string, the length of the"(               second string is returned.           Example   <                      .PRINT "%LOCATE (DEF,ABCDEFGHIJKLMNOP)"  A               After lexical processing, the statement appears as:                         .PRINT "3"             I                                           MACRO-64 Lexical Operators 3-19                 MACRO-64 Lexical Operators     %REPEAT     E     _________________________________________________________________o       %REPEATo  =           Lexical operator for repeating a specified string ac$           specified number of times.  
     Format  #           %REPEAT  (integer,string)   
     Arguments              integer>E           The first argument, of type integer, is the number of timessD           to repeat the string. If you specify a negative value, the%           string is repeated 0 times.p             stringB           The second argument, of type string, is the string to be           repeated.        DescriptionR  D           %REPEAT is used to repeat the specified string a specified           number of times.       Example   I                   .PRINT "Never, %REPEAT (3, <ever, >)touch that button!"A  =           After lexical processing, the statement appears as:m  F                   .PRINT "Never, ever, ever, ever, touch that button!"                      #     3-20 MACRO-64 Lexical Operators     e      I                                                MACRO-64 Lexical Operators I                                                                   %STRING     I         _________________________________________________________________            %STRINGa  C               Lexical operator for obtaining the value of a lexicaln               string symbol.           Format                 %STRING  (string)            Argument                 stringG               The single argument is of type string. If the argument isYE               the name of the lexical string symbol, the value of the H               lexical string symbol is returned. Otherwise, the argument$               is returned unchanged.           Descriptione  G               %STRING is modeled after the OpenVMS DCL lexical functionrH               F$STRING. %STRING is generally used to obtain the value ofI               a lexical string symbol, but you can use it with any string F               argument. The lexical substitution operator described in6               Section 3.4 performs a similar function.           Examplei  2                      FOO = "All the king's horses"*                      .PRINT "%STRING(FOO)"  A               After lexical processing, the statement appears as:i  3                      .PRINT "All the king's horses"e                    I                                           MACRO-64 Lexical Operators 3-21_ _  _           MACRO-64 Lexical Operators	     %TIME     E     _________________________________________________________________   	     %TIMEt  A           Lexical operator for obtaining the date and time of the            assembly unit.  
     Format             %TIME  ()f       Description   A           %TIME is modeled after the OpenVMS DCL lexical function B           F$TIME. %TIME is used to obtain the time and date of the@           assembly unit. There are no arguments. The result is aC           string specifying the date and time of the assembly unit.        Exampler  "                   .PRINT "%TIME()"  =           After lexical processing, the statement appears as:   /                   .PRINT " 8-OCT-1991 13:17:57"T                                        #     3-22 MACRO-64 Lexical Operators            I                                                MACRO-64 Lexical OperatorsrI                                                                     %TYPEe    I         _________________________________________________________________T  
         %TYPEi  F               Lexical operator for obtaining information about a name.           Format                 %TYPE  (name)a           Argument                 nameA               The single argument is of type name. Information is @               returned about the name specified in the argument.           Descriptiong  E               %TYPE is modeled after the OpenVMS DCL lexical function A               F$TYPE. %TYPE is used to obtain information about a F               name. The value returned is a numeric value with certain@               bit positions, either 0 or 1, depending on whetherD               the specified name has the corresponding attribute. AsD               described elsewhere, the decimal digits of the numericC               value are substituted for the %TYPE lexical operator.MD               Table 3-2 shows the symbolic names that are predefined!               for each attribute.   I               Table_3-2_%TYPE_Attributes_________________________________p  I               Symbolic_Name______________Attribute________________________  G               MACRO64$TYPE_SYMBOL        Name is a numeric symbol name.t  G               MACRO64$TYPE_PROC_DESC     Name is a procedure descriptor .                                          name.  9               MACRO64$TYPE_LABEL         Name is a label.   B               MACRO64$TYPE_EXTERN        Name is an external name.  =               MACRO64$TYPE_WEAK          Name is a weak name.   9               MACRO64$TYPE_PSECT         Name is a psect..  >               MACRO64$TYPE_MACRO         Name is a macro name.  I                                                  (continued on next page)   I                                           MACRO-64 Lexical Operators 3-23t g              MACRO-64 Lexical Operators	     %TYPEI    E           Table_3-2_(Cont.)_%TYPE_Attributes_________________________n  E           Symbolic_Name______________Attribute_______________________o  D           MACRO64$TYPE_STRING        Name is a lexical string symbol*                                      name.  7           MACRO64$TYPE_OPCODE        Name is an opcode.m  9           MACRO64$TYPE_DIR           Name is a directive.   @           MACRO64$TYPE_GENREG        Name is a general register.  E           MACRO64$TYPE_FLTREG________Name_is_a_floating_register.____   A           A given name may have zero, one, or several attributes.e       Exampler  "                   .macro IS_GR ARGA                     .IF equal, %TYPE(ARG) & <MACRO64$TYPE_GENREG> ;                      .PRINT "ARG is not a general register".                     .ENDC                    .endm IS_GR4                   IS_GR F11   E           Initially, the first line of the IS_GR macro expands as the            following:  ?                   .IF equal, <%TYPE(F11) & MACRO64$TYPE_GENREG>E  =           After lexical processing, the statement appears as:t  9                   .IF equal, <8192 & MACRO64$TYPE_GENREG>   <           In this example, 8192 is the attribute value for a=           floating-point register. This value could change in @           subsequent releases. Use only the predefined attribute?           masks described in Table 3-2. Since the attribute for =           a general register MACRO64$TYPE_GENREG is 4096, the $           expression evaluates as 0.  .                   <8192 & MACRO64$TYPE_GENREG>    #     3-24 MACRO-64 Lexical Operators                          I                                                                         4 I         _________________________________________________________________   I                                                           Macro Arguments_    G               By using macros, you can use a single source statement to D               insert a sequence of source statements into a program.  F               A macro definition contains the source statements of theH               macro. The macro definition may have formal arguments. YouG               can use these formal arguments throughout the sequence ofrE               source statements within the definition. When the macro H               is called, the formal arguments are replaced by the actual.               arguments within the macro call.  G               The macro call is a single source statement consisting offH               the macro name, optionally followed by arguments. When theI               macro is called, the assembler replaces the line containingcD               the macro call with the source statements in the macroC               definition. The assembler replaces any occurrences ofmF               formal arguments in the macro definition with the actualD               arguments specified in the macro call. This process is)               called the macro expansion.l  A               By default, macro expansions are not printed in the.G               assembly listing. To print the macro expansions, you must H               specify the /SHOW=EXPANSIONS qualifier and argument in theF               command line. Note that the examples of macro expansionsH               used in this chapter are listed as they would appear using:               the /SHOW=EXPANSIONS qualifier and argument.  A               Use .SHOW with a symbolic argument of EXPANSIONS in_D               the source text of a program to specify the listing of               expansions.m  C               MACRO-64 provides specific directives for controllingTG               macro execution. For information on these directives, see                Table 5-2.  @               This chapter describes macro arguments and created               temporary labels.t  I                                                       Macro Arguments 4-1o y  i                   4.1 Using Macro Argumentss  @           Macros have two types of arguments: actual and formal.E           Actual arguments are the text given in the macro call afterrB           the name of the macro. Formal arguments are specified byE           name in the macro definition; that is, after the macro namexB           in the .MACRO directive. Actual arguments in macro callsD           and formal arguments in macro definitions can be separated*           by commas (,),  tabs, or spaces.  A           The number of actual arguments in the macro call can benA           less than or equal to the number of formal arguments in-D           the macro definition. If the number of actual arguments isD           greater than the number of formal arguments, the assembler$           displays an error message.  @           Formal and actual arguments normally maintain a strictE           positional relationship. That is, the first actual argumenta?           in a macro call replaces all occurrences of the first >           formal argument in the macro definition. This strictD           positional relationship can be overridden by using keywordE           arguments. For more information on using keyword arguments,            see Section 4.3.  A           An example of a macro definition using formal argumentsr           follows:  '           .MACRO  STORE  ARG1,ARG2,ARG3 C           .LONG   ARG1                     ; ARG1 is first argument C           .WORD   ARG3                     ; ARG3 is third argumentgD           .BYTE   ARG2                     ; ARG2 is second argument           .ENDM   STORE   <           The following two examples show possible calls and5           expansions of the macro previously defined:R  7           STORE   3,2,1                    ; Macro call @           .LONG   3                        ; 3 is first argument@           .WORD   1                        ; 1 is third argumentA           .BYTE   2                        ; 2 is second argument   7           STORE   X,X-Y,Z                  ; Macro call @           .LONG   X                        ; X is first argument@           .WORD   Z                        ; Z is third argumentC           .BYTE   X-Y                      ; X-Y is second argumenta       4-2 Macro Arguments     a                        4.2 Using Default Values  E               Default values are values that are defined in the macrogB               definition. They are used when no value for a formal6               argument is specified in the macro call.  E               Default values are specified in the .MACRO directive asu               follows:  2               formal-argument-name = default-value  H               An example of a macro definition specifying default values               follows:  6               .MACRO  STORE   ARG1=12,ARG2=0,ARG3=1000               .LONG   ARG1               .WORD   ARG3               .BYTE   ARG2               .ENDM   STORE   B               The following three examples show possible calls and9               expansions of the macro defined previously:r  =               STORE                   ; No arguments suppliedM               .LONG   12               .WORD   1000               .BYTE   0   C               STORE   ,5,X            ; Last two arguments supplied_               .LONG   12               .WORD   X                .BYTE   5r  ?               STORE   1               ; First argument suppliedi               .LONG   1                .WORD   1000               .BYTE   0   #         4.3 Using Keyword Arguments   A               Keyword arguments allow a macro call to specify the G               arguments in any order. In this case, the macro call must G               specify the same formal argument names that appear in the I               macro definition. Keyword arguments are useful when a macrosH               definition has more formal arguments than necessary in the               call.r  I                                                       Macro Arguments 4-3?                   C           In any one macro call, it is good practice to specify thesE           arguments as either all positional arguments or all keywordp@           arguments. For example, the following macro definition$           specifies three arguments:  (           .MACRO  STORE   ARG1,ARG2,ARG3           .LONG   ARG1           .WORD   ARG3           .BYTE   ARG2           .ENDM   STORE   ?           The following macro call specifies keyword arguments:_  /           STORE   ARG3=27+5/4,ARG2=5,ARG1=SYMBL            .LONG   SYMBL            .WORD   27+5/4           .BYTE   5   C           Because the keywords are specified in the macro call, theeD           arguments in the macro call need not be given in the order3           they were listed in the macro definition.o  A           Positional and keyword arguments may be mixed. Usually,tC           positional arguments are placed before keyword arguments.V           For example:  /           .MACRO  STORE   ARG1,ARG2,ARG3=27+5/4t           .LONG   ARG1           .BYTE   ARG2           .WORD   27+5/4           .ENDM   STORE   C              ________________________ Note ________________________T  >              Keyword arguments are not counted when positionalB              arguments are parsed. This means that when positional>              and keyword arguments are used in the same macro,@              one argument can be specified twice. The last value0              specified for the argument is used.  C              _______________________________________________________             4-4 Macro Arguments_ _  _              "         4.4 Using String Arguments  E               If an actual argument is a string containing characterstD               that the assembler interprets as separators (such as aC               tab, space, or comma), the string must be enclosed by C               delimiters. String delimiters for macro arguments are B               usually paired angle brackets (<>). A quoted literalC               enclosed in double quotes ("") is also a valid string                argument.e  9               The assembler also interprets any characterdF               (except A, B, C, D, O, or X) after an initial circumflexG               (^) as a delimiter. Note that ^B, ^D, ^O, and ^X are usedoI               as radix control operators rather than argument delimiters. D               ^A is used as the ASCII operator and ^C is used as theH               complement operator. To pass an angle bracket as part of aG               string, you can use the circumflex form of the delimiter.e  F               The following are examples of delimited macro arguments:  *               <HAVE THE SUPPLIES RUN OUT?>"               <LAB:    CLR     R4>  F               "A quoted literal is taken as a single parameter value."  2               ^%ARGUMENT IS <LAST,FIRST> FOR CALL%*               ^?EXPRESSION IS <5+3>*<4+2>?  H               In the last two examples, the initial circumflex indicatesF               that the percent sign (%) and question mark (?)  are theC               delimiters. Note that only the left-hand delimiter isa'               preceded by a circumflex.c  D               The assembler interprets a string argument enclosed byF               delimiters as one actual argument and associates it withE               one formal argument. If a string argument that containstE               separator characters is not enclosed by delimiters, thedH               assembler interprets it as successive actual arguments and=               associates it with successive formal arguments.o  H               For example, the following macro definition has one formal               argument:.  '               .MACRO DOUBLE_ASCII STRNGT               .ASCII  "STRNG"o               .ASCII  "STRNG" "               .ENDM   DOUBLE_ASCII  I                                                       Macro Arguments 4-5t    t              D           The following two macro calls demonstrate actual arguments&           with and without delimiters:  "           DOUBLE_ASCII <A B C D E>           .ASCII  "A B C D E"            .ASCII  "A B C D E"R  !           DOUBLE_ASCII  A B C D E_A           %MACRO64-E-TOOMNYARGS, Too many arguments in macro call   E           Note that the assembler interprets the second macro call as E           having five actual arguments instead of one actual argument(           with spaces.  >           When a macro is called, the assembler removes normalC           delimiters around a string before associating it with theeC           formal arguments. However, a quoted literal within doublesD           quotes is treated as a single token and retains its double           quote delimiters.t  C           If a string contains a semicolon (;),  the string must befD           enclosed by delimiters; otherwise, the semicolon will mark@           the start of the comment field. Further, if the stringC           contains a semicolon, you cannot continue the line unlessi)           the string is a quoted literal.t  E           You can nest macro invocations, that is, a macro definition A           can contain a call to another macro. If, within a macro%D           definition, another macro is called and is passed a stringD           argument, you must delimit the argument so that the entire?           string is passed to the second macro as one argument.R  ?           The following macro definition contains a call to thee-           DOUBLE_ASCII macro defined earlier:_  4                   .MACRO     CNTDA LAB1,LAB2,STR_ARGH           LAB1:   .BYTE      LAB2-LAB1-1            ; Length of 2*string,                     DOUBLE_ASCII   <STR_ARG>&              ; Call DOUBLE_ASCII macro           LAB2:                     .ENDM    CNTDA  ?           Note that the argument in the call to DOUBLE_ASCII iseD           enclosed in angle brackets even though it does not containB           any separator characters. The argument is thus delimitedB           because it is a formal argument in the definition of theB           macro CNTDA and will be replaced with an actual argument0           that may contain separator characters.       4-6 Macro Arguments                    H               The following example calls the macro CNTDA, which in turn+               calls the macro DOUBLE_ASCII:   .               CNTDA  ST,FIN,<LEARN YOUR ABC'S>&               ST:     .BYTE   FIN-ST-15                       DOUBLE_ASCII <LEARN YOUR ABC'S>_0                       .ASCII  "LEARN YOUR ABC'S"0                       .ASCII  "LEARN YOUR ABC'S"               FIN:  >               In addition to nested macro invocations, you canB               also nest macro definitions. That is, you can define<               one macro within another. In this example, the<               INNER_MACRO_DEF macro is not defined until the<               OUTER_MACRO_DEF macro is invoked and expanded:  ,                       .macro OUTER_MACRO_DEF0                           .macro INNER_MACRO_DEF!                               ... /                           .endm INNER_MACRO_DEFw+                       .endm OUTER_MACRO_DEFt  @               You can use this capability to define a macro that               redefines itself:   "                       .macro SETUP                            A = 75                            B = 92                            C = 87                           D = 0 !                           E = -12t                            F = 42&                           .macro SETUP:                               ; Setup is done - do nothing%                           .endm SETUPa!                       .endm SETUP   B               In this example, the SETUP macro defines a number ofI               assembly constants. After the SETUP macro has been expandedLH               once, its work is done. Subsequent expansions of the setupH               macro need not take any action. Therefore, the SETUP macroG               redefines itself to a macro whose expansion includes onlytC               a comment statement. As described elsewhere, when you D               redefine a macro, the original version of the macro isI               automatically deleted. If that macro is currently expandingoG               (as would be the case with the previous SETUP macro), the   I                                                       Macro Arguments 4-7     b              A           new definition is immediately associated with the macroEA           name. However, the old definition is retained until all @           pending expansions complete normally. When all pending>           expansions complete, the old version of the macro isB           deleted. Thus, the SETUP macro may be invoked any numberB           of times in the assembly unit. Since the first expansionC           redefines itself, the expansion of the SETUP macro has no 9           effect other than the first time it is invoked.m  E           Another way to pass string arguments in nested macros is to_:           enclose the macro argument in nested delimiters.  C              ________________________ NOTE ________________________   @              Each time you use the delimited argument in a macro>              call, the assembler removes the outermost pair of=              delimiters before associating it with the formal @              argument. This method is not recommended because itA              requires that you know how deeply a macro is nested.   C              ______________________________________________________i  D           The following macro definition also contains a call to the           DOUBLE_ASCII macro:a  1                  .MACRO  CNTDA2 LAB1,LAB2,STR_ARGcE           LAB1:  .BYTE   LAB2-LAB1-1             ; Length of 2*stringiJ                  DOUBLE_ASCII  STR_ARG           ; Call DOUBLE_ASCII macro           LAB2:G                  .ENDM   CNTDA2i  C           Note that the argument in the call to DOUBLE_ASCII is not %           enclosed in angle brackets.   7           The following example calls the macro CNTDA2:_  :                  CNTDA2 BEG,TERM,<<MIND YOUR P'S AND Q'S>>E           BEG:   .BYTE   TERM-BEG-1              ; Length of 2*stringo6                  DOUBLE_ASCII  <MIND YOUR P'S AND Q'S>*                  ; Call DOUBLE_ASCII macro0                  .ASCII  "MIND YOUR P'S AND Q'S"0                  .ASCII  "MIND YOUR P'S AND Q'S"           TERM:c  E           Note that even though the call to DOUBLE_ASCII in the macro C           definition is not enclosed in delimiters, the call in theaC           expansion is enclosed because the call to CNTDA2 containse7           nested delimiters around the string argument.        4-8 Macro Argumentse c  c              "         4.5 Argument Concatenation  F               The argument concatenation operator, the apostrophe ('),I               concatenates a macro argument with constant text or anotherrI               argument. Apostrophes can either precede or follow a formale0               argument name in the macro source.  C               If an apostrophe precedes the argument name, the textmC               before the apostrophe is concatenated with the actual G               argument when the macro is expanded. For example, if ARG1cF               is a formal argument associated with the actual argument=               TEST, then ABCDE'ARG1 is expanded to ABCDETEST.o  D               If an apostrophe follows the formal argument name, theH               actual argument is concatenated with the text that followsG               the apostrophe when the macro is expanded. The apostrophet<               itself does not appear in the macro expansion.  C               To concatenate two arguments, separate the two formaltH               arguments with two successive apostrophes. Two apostrophesI               are needed because each concatenation operation discards ane,               apostrophe from the expansion.  F               An example of a macro definition that uses concatenation               follows:  )                       .MACRO CONCAT   A,Bm               A''B:   .WORD 0 "                       .ENDM CONCAT  @               Note that two successive apostrophes are used when=               concatenating the two formal arguments A and B.r  ?               An example of a macro call and expansion follows:l  !                       CONCAT  X,Ym               XY:     .WORD 0   -         4.6 Passing Numeric Values of Symbols   H               When a symbol is specified as an actual argument, the nameD               of the symbol, not the numeric value of the symbol, isG               passed to the macro. You can pass the value of the symbol I               by inserting a backslash (\) before the symbol in the macromH               call. The assembler passes the characters representing theG               decimal value of the symbol to the macro. For example, iffG               the symbol COUNT has a value of 2 and the actual argumentt  I                                                       Macro Arguments 4-9d t                 C           specified is \COUNT, the assembler passes the string 2 tohD           the macro; it does not pass the name of the symbol, COUNT.  E           Passing numeric values of symbols is especially useful withTE           the apostrophe (')  concatenation operator for creating newg           symbols.  E           An example of a macro definition for passing numeric valuese           of symbols follows:e                     .MACRO WORD nf           WORD'n: .WORD n                    .ENDM WORD  C           The following example shows a possible call and expansionG*           of the macro previously defined:  2                  X = 1       ; Start counting at 1                  WORD \X           WORD1: .WORD 1  &     4.7 Using Created Temporary Labels  C           Temporary labels are often very useful in macros. You canxC           create a macro definition that specifies temporary labels C           within it, but these temporary labels might be duplicated B           elsewhere in the temporary label block, possibly causingD           errors. However, the assembler can create temporary labelsB           in the macro expansion that will not conflict with otherE           temporary labels. These labels are called created temporarys           labels.   ?           Created temporary labels range from 30000$ to 65535$. @           Each time the assembler creates a new temporary label,@           it increments the numeric part of the label name by 1.E           Consequently, no user-defined temporary labels should be ini(           the range of 30000$ to 65535$.  C           A created temporary label is specified by a question markfC           (?)  in front of the formal argument name. When the macroiB           is expanded, the assembler creates a new temporary label?           if the corresponding actual argument is blank. If theoC           corresponding actual argument is specified, the assembler:B           substitutes the actual argument for the formal argument.       4-10 Macro Arguments    W              F               The following example is a macro definition specifying a&               created temporary label:  6                       .MACRO  POSITIVE        ARG1,?L1%                       BGE     ARG1,L1 '                       NEGQ    ARG1,ARG1 &               L1:    .ENDM    POSITIVE  C               The following three calls and expansions of the macro I               defined previously show both created temporary labels and a +               user-defined temporary label:   "                       POSITIVE  R0'                       BGE     R0,30000$L#                       NEGQ    R0,R0                30000$:   "                       POSITIVE  R5'                       BGE     R5,30001$o#                       NEGQ    R5,R5                30001$:y  &                       POSITIVE  R7,10$$                       BGE     R7,10$#                       NEGQ    R7,R7                10$:  H               For more information on temporary labels, see Section 2.6.                                  I                                                      Macro Arguments 4-11                          I                                                                         5sI         _________________________________________________________________l  I                                             MACRO-64 Assembler Directivesa    ?               MACRO-64 directives enable you to control certainCE               aspects of the assembly process. This chapter describesRA               the MACRO-64 assembler directives. It describes thehE               various functional categories of directives, as well as I               a detailed description of each directive. It also discusses B               the effects of automatic data alignment on assembler               directives.l           5.1 Program Sections  F               MACRO-64 allows you to divide your program into sectionsI               called psects using the .PSECT directive. Psects are usefulbI               for organizing your program, and for low-level control overdE               the linking process. More importantly, each psect fallsA9               into one of the following three categories:   H               o  CODE psects can contain only instructions. They containH                  no data. Psects in this category have the EXE and NOMIX"                  psect attributes.  C               o  DATA psects can contain only data. They contain noiE                  instructions. Psects in this category have the NOEXE &                  and NOMIX attributes.  F               o  MIXED psects can contain instructions, data, or both.C                  Psects in this category have the MIX attribute. In_@                  addition, they may have either the EXE or NOEXE                  attribute.   2               MACRO-64 categorizes psects because:  I               o  There is a significant performance compromise associatedsF                  with mixing instructions and data in the same programC                  section within the Alpha AXP architecture. This istG                  because the Alpha AXP architecture typically maintainslB                  separate memory caches for instructions and data.  I                                         MACRO-64 Assembler Directives 5-1n h  c              @           o  If you mix instructions and data, it is likely thatC              instructions will migrate into the data cache and thatoE              data will migrate into the instruction cache. While thiseA              situation still yields correct results, the benefits ?              of the instruction and data caches are diminished.eA              Placing data in the instruction stream can also haverD              detrimental effects on the instruction pipeline and theD              multiple instruction-issue capabilities that most Alpha               AXP systems employ.  E           Since a code psect can contain only instructions and cannoteB           contain arbitrary data, instructions you place in a CODEA           psect can be analyzed by the assembler optimizer and byx@           the symbolic debugger. Since a mixed psect can containB           arbitrary data as well as instructions, instructions youB           place in a mixed psect are not analyzed by the assembler=           optimizer or by the symbolic debugger. Instead, thesE           assembler internally converts instructions in a mixed psecta/           to an equivalent data representation.   E           Because of the compromises associated with mixed psects, byaC           default the assembler creates psects with the NOMIX psecteB           attribute. If you need to place data in a psect that hasD           the EXE attribute, or if you need to place instructions inE           a psect that has the NOEXE attribute, you must also specify @           the MIX attribute in the psect's definition. Note thatD           unlike the other psect attributes, the MIX psect attributeE           is an assembly-time attribute. The MIX psect attribute does C           not appear in the psect definitions in your object modulen5           and it does not affect the linking process.   ?           You can use all assembler directives and instructions>B           within mixed psects. While many assembler directives can@           be used within both code and data psects, data-storageC           directives cannot be used in code psects and instructionsb>           and instruction-storage directives cannot be used in@           data psects. If you place instructions or instruction-C           storage directives in a data psect, or if you place data-mD           storage directives in a code psect, the assembler issues aE           diagnostic message. Section 5.3 indicates the applicabilitys8           of each directive within code and data psects.        %     5-2 MACRO-64 Assembler Directives                    B               In summary, code psects may contain only storage forI               instructions and storage created by instruction directives.cB               Data psects may contain only storage created by dataE               directives. Mixed psects may contain either storage fordE               instructions or data or both. There are no restrictionsoF               on the use of data directives in a mixed psect. However,F               the assembler converts instructions you place in a mixedH               psect to a data representation. Therefore, instructions inF               a mixed psect are not analyzed as instructions by eitherH               the assembler optimizer or the symbolic debugger. For moreC               information on the .PSECT directive, see Section 5.3.   $         5.2 Automatic Data Alignment  E               The assembler can optionally align your data on natural D               boundaries. While disabled by default, this feature isE               enabled with the /ALIGNMENT=DATA command-line qualifiertC               or the .ENABLE ALIGN_DATA directive. (See Section 1.2iE               and Section 5.3.) A natural boundary is an address thatoE               is evenly divisibly by the size of the scalar data type C               being accessed. The MACRO-64 automatic data alignmentiG               feature can automatically align word, longword, quadword,tE               and octaword data to a natural boundary. Accessing data D               on a natural boundary can be significantly faster thanD               an unaligned access. For more information on accessingE               data on aligned and unaligned boundaries, see the Alpha ,               Architecture Reference Manual.  C               When the MACRO-64 automatic data alignment feature is C               enabled, the assembler automatically aligns all data-aB               storage directives to a natural boundary. To achieveE               alignment, the assembler pads with 0 bytes as necessaryiC               before allocating the storage for the data directive.rA               Labels that occur before the data-storage directiveiE               are defined to be the address of the data storage after E               alignment. For more information, see Section 2.7.1. The H               directive descriptions in Section 5.3 indicate those data-D               storage directives that are affected by automatic data               alignment.            I                                         MACRO-64 Assembler Directives 5-3                         5.3 Directives  A           The general assembler directives provide facilities for E           performing eleven types of functions. Table 5-1 lists these B           types of functions and their directives. Some directivesA           are only applicable within data psects (psects with the @           NOEXE and NOMIX attributes). Other directives are only@           applicable within code psects (psects with the EXE andA           NOMIX attributes). All directives are applicable within C           psects that contain either data and code, or both (psectsp=           with the MIX attribute). For information on the MIXSB           assembly-time psect and any associated restrictions, seeB           the description of the .PSECT directive in this chapter.  B           Table 5-1 shows how each directive can be applied within           data or code psects.  E           Table_5-1_Summary_of_General_Assembler_Directives__________   E           Category____________Directives[1]_________Psect_Application   7           Listing control     .TITLE                Allt0           directives          .SUBTITLE (.SBTTL)$                               .IDENT#                               .LISTe$                               .NLIST#                               .SHOWt%                               .NOSHOW #                               .PAGEo  7           Message display     .PRINT                Ally#           directives          .WARNt$                               .ERROR  7           Assembler option    .ENABLE (.ENABL)      Allf/           directives          .DISABLE (.DSABL)t  E           [1]The_alternate_form,_if_any,_is_given_in_parentheses.____g  E                                              (continued on next page)i          %     5-4 MACRO-64 Assembler Directives_ _  _              I               Table_5-1_(Cont.)_Summary_of_General_Assembler_Directives__n  I               Category____________Directives[1]_________Psect_Application   F               Data-storage        .BYTE                 NOEXE (or MIX)'               directives          .WORDe.                                   .SIGNED_BYTE.                                   .SIGNED_WORD'                                   .LONG_*                                   .ADDRESS/                                   .CODE_ADDRESS 5                                   .LOCAL_CODE_ADDRESST'                                   .OCTA.'                                   .QUADf(                                   .ASCII(                                   .ASCIC(                                   .ASCID(                                   .ASCIZ6                                   .F_FLOATING (.FLOAT)-                                   .D_FLOATINGl+                                   (.DOUBLE) -                                   .G_FLOATINGD-                                   .S_FLOATING -                                   .T_FLOATING   D                                   .INSTRUCTION          EXE (or MIX)  ;               Location control    .ALIGN                All .               directives          .BEGIN_EXACT,                                   .END_EXACT  I               [1]The_alternate_form,_if_any,_is_given_in_parentheses.____l  I                                                  (continued on next page)                       I                                         MACRO-64 Assembler Directives 5-5  r  r              E           Table_5-1_(Cont.)_Summary_of_General_Assembler_Directives__h  E           Category____________Directives[1]_________Psect_Applicationc  B                                                     NOEXE (or MIX)#                               .EVENe"                               .ODD#                               .BLKA.#                               .BLKBe#                               .BLKD #                               .BLKFc#                               .BLKG #                               .BLKLn#                               .BLKO #                               .BLKQi#                               .BLKS #                               .BLKTA#                               .BLKWs  7           Program sectioning  .PSECT                All 1           directives          .SAVE_PSECT (.SAVE)f,                               .RESTORE_PSECT(                               (.RESTORE)  7           Symbol control      .DEFINE_FREG          All *           directives          .DEFINE_IREG0                               .EXTERNAL (.EXTRN)+                               .UNDEFINE_REGs#                               .WEAKc  7           Conditional         .IF                   Allr.           assembly block      .IF_FALSE (.IFF)#           directives          .ENDCc#                               .ELSE -                               .IF_TRUE (.IFT) ,                               .IF_TRUE_FALSE%                               (.IFTF)e"                               .IIF  7           Source inclusion    .INCLUDE              AllmE           [1]The_alternate_form,_if_any,_is_given_in_parentheses.____n  E                                              (continued on next page)W    %     5-6 MACRO-64 Assembler Directivess    b              I               Table_5-1_(Cont.)_Summary_of_General_Assembler_Directives__   I               Category____________Directives[1]_________Psect_Applicationa  ;               Linkage control     .BASE                 All ;                                   .END                  All F                                   .LINKAGE_PAIR         NOEXE (or MIX)F                                   .LOCAL_LINKAGE_PAIR   NOEXE (or MIX)-                                   .PROCEDURE_a,                                   DESCRIPTOR3                                   .LOCAL_PROCEDURE_ ,                                   DESCRIPTORI               [1]The_alternate_form,_if_any,_is_given_in_parentheses.____   I               ___________________________________________________________u  I               The macro directives provide facilities for performing five(G               categories of functions. Table 5-2 lists these categories I               and their associated directives. See Chapter 4 for detailed B               information on macro arguments and string operators.  I               Table_5-2_Summary_of_Macro_Directives______________________m  E                                                    Application in EXElI               Category_________Directives[1]_______or_NOEXE_Psects_______   6               Macro            .MACRO              All$               definition       .ENDM'               directives       .LIBRARY %                                .MCALLc  6               Macro deletion   .MDELETE            All               directiveo  6               Macro exit       .MEXIT              All               directive   6               Repeat block     .REPEAT (.REPT)     All#               directives       .IRP $                                .IRPC$                                .ENDR  6               Counting         .NARG               All$               directive        .NCHRI               [1]The_alternate_form,_if_any,_is_given_in_parentheses.____e  I               ___________________________________________________________t  I                                         MACRO-64 Assembler Directives 5-7a s  o              B           The remainder of this chapter describes both the general@           assembler directives and the macro directives, showingB           their formats and giving examples of their use. For easeD           of reference, the directives are presented in alphabetical           order.                                                                                %     5-8 MACRO-64 Assembler Directivesh c  l      I                                                      Assembler Directives I                                                                  .ADDRESS     I         _________________________________________________________________E           .ADDRESS  '               Address storage directive            Format  $               .ADDRESS  address-list           Parameter                  address-listH               A list of symbols or expressions, separated by commas (,),5               which MACRO-64 interprets as addresses.s           Descriptionb  G               .ADDRESS stores successive quadwords (8 bytes) containing0I               addresses in the object module. Digital recommends that you H               use .ADDRESS rather than .QUAD for storing address data to;               provide additional information to the linker.y  
         Notes   E               o  You can only use this directive within data or mixed A                  psects (psects that have either the NOEXE or MIX D                  attributes). For more information, see Section 5.1.  G               o  If automatic data alignment is enabled, this directivecG                  aligns the current (64-bit) boundary before allocating                   storage.   F               o  You can define a 32-bit address item using macros and2                  the .LONG directive. For example:  '                  .macro address_32 itemi                      .long itemd!                  .endm address_32t           Example                    .ADDRESS A,B,C    I                                         MACRO-64 Assembler Directives 5-9c e  h           Assembler Directives
     .ALIGN    E     _________________________________________________________________h  
     .ALIGN  .           Location counter alignment directive  
     Format  +           .ALIGN  integer [,fill-specifier]l  +           .ALIGN  keyword [,fill-specifier]        Parameters             integeroA           An integer in the range 0 to 9. The location counter isrD           aligned at an address that is the value of 2 raised to the           power of the integer.              keywordkC           One of five keywords that specify the alignment boundary.oC           The location counter is aligned to an address that is thes0           next multiple of the following values:  E           ___________________________________________________________ E           Keyword___Size_(in_Bytes)__________________________________a             BYTE      20 = 1             WORD      21 = 2             LONG      22 = 4             QUAD      23 = 8             OCTA      24 = 16 E           ___________________________________________________________              [,fill-specifier]oB           Any expression that resolves to an assembly-time integer@           value containing no forward references. The filling isB           done per byte, regardless of the alignment. If the valueD           you specify is not in the range of 0 to 255, the assembler>           issues a diagnostic message and truncates the value.  &     5-10 MACRO-64 Assembler Directives h  c      I                                                      Assembler DirectivesnI                                                                    .ALIGN                Description   @               .ALIGN aligns the location counter to the boundary:               specified by either an integer or a keyword.  
         Notes   I               o  If .ALIGN is specified in a psect with the EXE and NOMIXtI                  attributes, the fill-specifier is ignored. The assembleriH                  aligns the psect to the requested boundary padding with*                  NOP or FNOP instructions.  E               o  If .ALIGN is specified in a psect that does not have E                  the EXE attribute and a fill-specifier is specified, I                  the assembler aligns the psect to the requested boundarysI                  padding, with byte locations using the fill-specifier assB                  the initial value for the generated byte padding.  D               o  If the fill-specifier expression encounters a valueD                  that is too large to fit in a boundary specified byH                  the keyword, the data is truncated and an informational&                  message is displayed.  G               o  The alignment that you specify in .ALIGN cannot exceed.E                  the alignment of the psect in which the alignment is H                  attempted (see the description of .PSECT). For example,B                  if you are using the BYTE psect alignment and youD                  specify .ALIGN with a word or larger alignment, the5                  assembler displays an error message.            Examples                    Example 1  5                    .PSECT A,QUAD  ; Begin at quadwordt0                 B::.BYTE 4        ; Data is byte0                    .ALIGN QUAD    ; Next data is9                 C::.WORD 6        ; also quadword alignedM                    Example 2  *                    .PSECT A,EXE,NOMIX,OCTA,                 L1::TRAPB:        ; offset 0;                    .ALIGN OCTA    ; NOP padding bytes 4..15 .                     TRAPB:         ; offset 16  I                                        MACRO-64 Assembler Directives 5-11p t  W           Assembler Directives
     .ALIGN                  Example 3  )                 .PSECT A,NOEXE,NOMIX,OCTAt1              L1:.WORD 5        ; byte offset 0..1b=                 .ALIGN QUAD,2  ; fill specifier initial valuen4                                ; of 2 for bytes 2..72                 .WORD 6        ; byte offsets 8..9                                                                            &     5-12 MACRO-64 Assembler Directives t  m      I                                                      Assembler DirectiveshI                                                                    .ASCIC     I         _________________________________________________________________a           .ASCIC  4               Counted ASCII string storage directive           Format  $               .ASCIC  quoted-literal           Parameter                  quoted-literal;               An ASCII string delimited with double quotes.o           Descriptionr  F               .ASCIC performs the same function as .ASCII, except thatE               .ASCIC inserts a count byte before the string data. The H               count byte contains the length of the string in bytes. TheH               length given includes any bytes of nonprintable charactersF               specified using the backslash (\) operator, but excludesI               the count byte. See Section 2.4 for a description of how toe&               specify quoted literals.  @               .ASCIC is useful in copying text because the count<               indicates the length of the text to be copied.  
         Notes   E               o  You can only use this directive within data or mixeduA                  psects (psects that have either the NOEXE or MIXeD                  attributes). For more information, see Section 5.1.  F               o  This directive also accepts VAX MACRO syntax. See theC                  VAX MACRO and Instruction Set Reference Manual for                   details.e           Examplea  C                 .ASCIC "MY STRING"  ; In the listing, this becomes:o-                                     ; .BYTE 9 8                                     ; .ASCII \MY STRING\    I                                        MACRO-64 Assembler Directives 5-13     a           Assembler Directives
     .ASCID    E     _________________________________________________________________h  
     .ASCID  :           String-descriptor ASCII string storage directive  
     Format              .ASCID  quoted-literal  
     Parameterg             quoted-literal@           An ASCII string delimited with double quotes. For more<           information on how to specify quoted literals, see           Section 2.4.       Description   D           .ASCID performs the same function as the .ASCII directive,?           except that .ASCID inserts a string descriptor before @           the string data. The descriptor format is identical toB           that defined for OpenVMS AXP and OpenVMS VAX. The string.           descriptor has the following format:            	     Notesa  B           o  String descriptors are used in calling certain system              routines.  :           o  The string-length field is two bytes in size.  >           o  Descriptor information (2 bytes) is always set to              ^X010E.  C           o  The pointer field is a 32-bit pointer to the string (4               bytes).      &     5-14 MACRO-64 Assembler Directives a  i      I                                                      Assembler Directives.I                                                                    .ASCID     F               o  If natural alignment is enabled (using .ENABLE ALIGN_G                  DATA), the descriptor is quadword aligned. This allowseH                  you to access the entire descriptor (2 data words and a:                  longword address) on a quadword boundary.  E               o  You can only use this directive within data or mixed A                  psects (psects that have either the NOEXE or MIX D                  attributes). For more information, see Section 5.1.  F               o  This directive also accepts VAX MACRO syntax. See theC                  VAX MACRO and Instruction Set Reference Manual forT                  details.            Examples                    Example 1  M                 .DESCR1:   .ASCID "ARGUMENT FOR CALL"     ; String descriptor                     Example 2  P                 .DESCR2:   .ASCID "SECOND ARGUMENT"  ; Another string descriptor                                              I                                        MACRO-64 Assembler Directives 5-15  R              Assembler Directives
     .ASCII    E     _________________________________________________________________   
     .ASCII  (           ASCII string storage directive  
     Format              .ASCII  quoted-literal       Parameters             quoted-literal7           An ASCII string delimited with double quotes.r       Description_  @           .ASCII stores the ASCII value of each character in theB           ASCII string or the value of each byte expression in theC           next available byte. See Section 2.4 for a description of )           how to specify quoted literals.   	     Notest  A           o  You can only use this directive within data or mixed =              psects (psects that have either the NOEXE or MIX @              attributes). For more information, see Section 5.1.  B           o  This directive also accepts VAX MACRO syntax. See the?              VAX MACRO and Instruction Set Reference Manual for               details.        Examples                .ASCII "MY STRING"                     &     5-16 MACRO-64 Assembler Directives C         I                                                      Assembler Directives I                                                                    .ASCIZ     I         _________________________________________________________________            .ASCIZ  <               Zero-terminated ASCII string storage directive           Format  $               .ASCIZ  quoted-literal           Parameter                  quoted-literal;               An ASCII string delimited with double quotes.            Description   F               .ASCIZ performs the same function as .ASCII, except thatF               .ASCIZ appends a null byte as the final character of theC               string. When a list or text string is created with an F               .ASCIZ directive, you need only perform a search for theI               null character in the last byte to determine the end of the I               string. See Section 2.4 for a description of how to specify                quoted literals.  
         Notes_  E               o  You can only use this directive within data or mixed A                  psects (psects that have either the NOEXE or MIX D                  attributes). For more information, see Section 5.1.  F               o  This directive also accepts VAX MACRO syntax. See theC                  VAX MACRO and Instruction Set Reference Manual for                   details.            Example   5                 .ASCIZ "MY STRING"    ; Equivalent toB?                                       ; .ASCII "MY STRING \x00"             I                                        MACRO-64 Assembler Directives 5-17P T              Assembler Directives	     .BASE     E     _________________________________________________________________   	     .BASE   !           Base register directivey  
     Format  &           .BASE  Rn [,base_expression]       Parameters             Rn@           One of the base registers, R0 through R30, FP, and SP.             base_expression D           The base address, which is optional, and can be one of the           following:  #           o  An absolute expression_  %           o  A relocatable expression   #           o  An external expression   >           An expression must not contain forward references orC           implicit external symbols. An implicitly defined externalF>           symbol is a symbol that the assembler defaults to anD           external symbol. This occurs when the assembler encountersE           references to a symbol, but does not encounter a definition D           for the symbol or an .EXTERNAL directive that declares the           symbol.        Description   B           The .BASE directive is used to inform the assembler that=           a specified base register contains a specified basesB           address. Later in your program, the assembler allows youC           to implicitly reference the specified base register. When D           the assembler knows which base addresses are stored in oneD           or more base registers, it can convert an expression to anD           offset from one of the base registers previously specifiedD           in a .BASE directive. .BASE provides a convenient and moreE           readable shorthand for accessing memory and constant values E           using base registers. .BASE also makes it easier for you to C           change your register assignments if you later modify your_           code.   &     5-18 MACRO-64 Assembler Directives    f      I                                                      Assembler DirectivesrI                                                                     .BASEi    E               The base expression is optional. If the base expression E               is specified, this base address value is assumed by the_H               assembler to be in the specified register, Rn. If the baseG               expression is omitted, the contents of the specified base_D               register, Rn, is considered undefined until a new base>               expression is associated with the base register.  B               R31 is defined to always contain 0, according to theF               architecture definition. Therefore, R31 is known to be aH               predefined base register containing 0. For every assembly,<               the assembler assumes the following statement:                     .BASE R31, 0  C               Because the contents of R31 cannot change, you cannot.-               specify a base address for R31.   E               You can use the .BASE directive to implicitly referenceeH               base registers. You can also automatically compute offsetsE               from a base address known to be in a register to a base 9               address you use in an instruction argument.   B               Most of the memory format Alpha AXP instructions areG               defined such that one of their arguments must have a baserF               register and an offset. If the assembler encounters onlyI               an expression with no base register, the assembler attemptsbE               to find a base register that contains a base address or H               constant within a 16-bit signed offset of the value of theI               expression. If it finds such a base register, the assemblerrE               computes an offset that, when added to the value of the G               base register, results in a value equal to the expression_4               specified in the instruction argument.           Examples                    Example 1  +                 .EXTERNAL COMM_AREA       1 +                 .BASE R1, COMM_AREA       2 /                 CURR_LINE       = COMM_AREA + 0e/                 CURR_COLUMN     = COMM_AREA + 4-/                 CURR_MODE       = COMM_AREA + 8oD                 LDA     R4, 17                  ; LDA R4, 17(R31)  3D                 LDL     R2, CURR_LINE           ; LDL R2, 0(R1)    4?                 LDL     R3, CURR_COLUMN         ; LDL R3, 4(R1)s?                 STL     R4, CURR_MODE           ; STL R4, 8(R1)i  I                                        MACRO-64 Assembler Directives 5-19s r  i           Assembler Directives	     .BASEp    ;              1  This statement declares an external symbol, <                 COMM_AREA. COMM_AREA is a global symbol that?                 represents the base address of a three-longwordcE                 communication area that is used by different routinesn                 in the program.   >              2  This statement informs the assembler that baseA                 register R1 contains the base address, COMM_AREA, E                 of this communication area. The next three statements ?                 define variables within the communication area.   <              3  The first instruction shows how you can loadC                 registers with constant values in the range -32,768t>                 to +32,767 by implicitly using R31 as the base                 register.h  <              4  The last three statements show how the .BASEA                 directive allows you to implicitly reference base D                 registers and automatically compute offsets. In eachE                 of these instructions, the second argument is definedu9                 to require an offset and a base register.   B                 Since no base register is specified, the assemblerC                 attempts to imply the base register and compute theaE                 offset based upon information given in previous .BASEh                 directives.f  D                 In the last three instructions, the address argument@                 is within -32,768 to +32,767 of the base addressE                 known to be in R1 (that is, COMM_AREA). Therefore, R1 D                 is selected as the base register. The assembler alsoA                 computes the correct offset from the base address_A                 known to be in R1 to the address specified in thee%                 instruction argument.                 Example 2  C              The assembler performs a sequential search through thenE              list of possible base registers, R0 through R31. It useseE              the first definition possible if multiple base registers $              are valid. For example:                     .BASE R5, 3000                   :i                   LDQ  R10, 100   B              The assembler outputs the LDQ instruction as follows:  &     5-20 MACRO-64 Assembler Directives           I                                                      Assembler DirectiveshI                                                                     .BASEt    '                      LDQ  R10, -200(R5)   G                  Both R31 and R5 are defined as base registers that can F                  be used in constructing the instruction argument. R31H                  always contains 0. In this example, R5 is also known toG                  contain the constant 300. The assembler uses the first F                  base register, starting at R0 and progressing to R31,G                  which provides a known value within -32,768 to +32,767aE                  of the specified argument value. Since the assembleriH                  considers R5 before it considers R31, R5 is used rather                  than R31.                                                                    I                                        MACRO-64 Assembler Directives 5-21p f              Assembler Directives     .BEGIN_EXACT    E     _________________________________________________________________        .BEGIN_EXACT  +           Exact instruction block directive   
     Format             .BEGIN_EXACT       Descriptioni  B           An exact instruction block suppresses code optimizationsC           (SCHEDULE and PEEPHOLE) regardless if these optimizationsn?           are enabled for the assembly unit. Unlike .ENABLE andeC           .DISABLE, which can be used to enable or disable specificeB           optimizations for the entire assembly unit, .BEGIN_EXACTA           and .END_EXACT allow you to suppress optimization for aEC           specified range of instructions. Instructions outside thetA           specified range remain subject to any optimizations you            have enabled.2  	     Notes   C           o  This directive cannot appear in a psect with the NOEXEf"              and NOMIX attributes.  A           o  Although this directive is accepted by the assembler;C              in a psect with the MIX attribute, it has no effect ineC              these psects since no code optimizations are in affectN              for MIX psects.  C           o  .BEGIN_EXACT must be paired with a matching .END_EXACT 2              to close the exact instruction block.  B           o  .BEGIN_EXACT and .END_EXACT instruction blocks can be@              nested. The outermost level of the .BEGIN_EXACT and>              matching .END_EXACT directives delimit the actualB              exact instruction block from which code optimizations@              are suppressed. Nesting .BEGIN_EXACT and .END_EXACTB              instruction blocks can be useful in macro definitionsD              where the macro expansion requires an exact instructionE              sequence. Nested .BEGIN_EXACT and .END_EXACT instructionnD              blocks allow a macro to be invoked both from within and1              without the exact instruction block.   &     5-22 MACRO-64 Assembler Directives C  s      I                                                      Assembler DirectivesCI                                                              .BEGIN_EXACTi    B               o  .BEGIN_EXACT does not affect automatic alignment.G                  Automatic alignment is enabled with the .ENABLE ALIGN_gC                  CODE and .ENABLE ALIGN_DATA directives or with thec;                  /ALIGN=(CODE,DATA) command-line qualifier.            Examples  G               The following example shows an instruction sequence priord               to optimization:  ,                      addf f7, f8, f9     ; 1,                      addf f2, f3, f4     ; 2,                      addl r5, r6, r7     ; 3,                      addl r8, r9, r10    ; 4  H               The assembler optimizes the previous example to a sequence<               similar to the following instruction sequence:                                :,                      addf f7, f8, f9     ; 1,                      addl r5, r6, r7     ; 3,                      addf f2, f3, f4     ; 2,                      addl r8, r9, r10    ; 4                              :  D               If you choose to suppress optimization in the previous=               example, enclose the four instructions with the E               .BEGIN_EXACT and .END_EXACT directives, as shown in thes                following example:  !                      .BEGIN_EXACT_,                      addf f7, f8, f9     ; 1,                      addf f2, f3, f4     ; 2,                      addl r5, r6, r7     ; 3,                      addl r8, r9, r10    ; 4                      .END_EXACT                   I                                        MACRO-64 Assembler Directives 5-23  o  t           Assembler Directives	     .BLKx     E     _________________________________________________________________   	     .BLKx   -           Block storage allocation directivesA  
     Format             .BLKA  [expression]              .BLKB  [expression]o             .BLKD  [expression]              .BLKF  [expression]d             .BLKG  [expression]              .BLKL  [expression]r             .BLKO  [expression]              .BLKQ  [expression]              .BLKS  [expression]              .BLKT  [expression]              .BLKW  [expression]   
     Parameter              expression@           An integer expression specifying the amount of storageA           to be allocated. All the symbols in the expression must =           be defined at the current point in the assembly andv?           the expression must be an absolute expression. If the A           expression is omitted, a default value of 1 is assumed.        Description   A           MACRO-64 has the following 11 block storage directives:(  E           ___________________________________________________________aE           DirectiveReserves_Storage_for:______Bytes_Allocated________t  E           .BLKA    Addresses (quadwords)      8 * value of expressionb  A           .BLKB    Byte data                  Value of expressiona  &     5-24 MACRO-64 Assembler Directives    t      I                                                      Assembler DirectivesnI                                                                     .BLKxO  I               ___________________________________________________________nI               DirectiveReserves_Storage_for:______Bytes_Allocated________   I               .BLKD    Double-precision           8 * value of expressioni*                        floating-point data"                        (quadwords)  I               .BLKF    Single-precision           4 * value of expression *                        floating-point data"                        (longwords)  I               .BLKG    G_floating data            8 * value of expression_"                        (quadwords)  I               .BLKL    Longword data              4 * value of expressionr  ?               .BLKO    Octaword data              16 * value ofa<                                                   expression  I               .BLKQ    Quadword data              8 * value of expression   I               .BLKS    S_floating data            4 * value of expression "                        (longwords)  I               .BLKT    T_floating data            8 * value of expressiono"                        (quadwords)  I               .BLKW____Word_data__________________2_*_value_of_expression   H               Each directive reserves storage for a different data type.G               The value of the expression determines the number of dataiE               items for which MACRO-64 reserves storage. For example,CH               .BLKL 4 reserves storage for 4 longwords of data and .BLKBF               2 reserves storage for 2 bytes of data. The total numberG               of bytes reserved is equal to the length of the data type 0               times the value of the expression.  
         Notes   B               o  If automatic data alignment is enabled, the .BLKxE                  directives align the current location counter to one A                  of the alignments listed in the following table:e        I                                        MACRO-64 Assembler Directives 5-25a e              Assembler Directives	     .BLKx   E              ________________________________________________________ E              DirectivAlignment_______________________________________t  /              .BLKA   Quadword (64-bit) boundaryi                .BLKB   None   /              .BLKD   Quadword (64-bit) boundary   /              .BLKF   Longword (32-bit) boundaryo  /              .BLKG   Quadword (64-bit) boundarya  /              .BLKL   Longword (32-bit) boundary   0              .BLKO   Octaword (128-bit) boundary  /              .BLKQ   Quadword (64-bit) boundaryr  /              .BLKS   Longword (32-bit) boundaryo  /              .BLKT   Quadword (64-bit) boundary   E              .BLKW___Word_(16-bit)_boundary__________________________   C           o  You can only use these directives within psects having E              either the NOEXE or MIX attributes. For more information (              on psects, see Section 5.1.       Example                     .PSECT A,NOEXE G              B:: .BLKW  10             ; 10 words (20 bytes) of storage J                  .BLKQ   5             ; 5 quadwords (40 bytes) of storage  D                  .BLKW                 ; 1 word (2 bytes) of storage                    &     5-26 MACRO-64 Assembler Directives _  _      I                                                      Assembler Directives I                                                                     .BYTEe    I         _________________________________________________________________r  
         .BYTE,  $               Byte storage directive           Format  $               .BYTE  expression-list           Parameter                  expression-list ?               One or more expressions separated by commas. Each E               expression is first evaluated as a quadword expression;tG               then the value of the expression is truncated to fit in amI               byte. The value of each expression should be in the range 0 G               to 255 for unsigned data or in the range -128 to +127 for                signed data.           Descriptiono  D               .BYTE generates successive bytes of binary data in the               object module.  
         Notes   @               o  The assembler displays a warning message if the>                  expression is outside the range -128 to -255.  I               o  The assembler will truncate the most significant bits ofeH                  an integer or external value that is too large to store                  in eight bits.   E               o  You can only use this directive within data or mixedsA                  psects (psects that have either the NOEXE or MIX D                  attributes). For more information, see Section 5.1.           Examples  <                 A:      .BYTE   5       ; Stores 5 in a byte        I                                        MACRO-64 Assembler Directives 5-27  i  f           Assembler Directives     .CODE_ADDRESSn    E     _________________________________________________________________e       .CODE_ADDRESS   (           Code address storage directive  
     Format  "           .CODE_ADDRESS  name-list  
     Parameter              name-list >           A list of symbols separated by commas. These symbols>           should reference either a procedure descriptor name,D           such as a routine name, or an externally defined procedure           descriptor.e       Description   B           .CODE_ADDRESS causes the code addresses of the specifiedC           identifiers to be placed at the current psect and currentaE           location counter. The specified identifier should reference 6           a procedure descriptor defined in the image.  	     Notes   A           o  You can only use this directive within data or mixed =              psects (psects that have either the NOEXE or MIXs@              attributes). For more information, see Section 5.1.  C           o  If automatic data alignment is enabled, this directiven>              aligns the current location counter to a quadword9              (64-bit) boundary before allocating storage.        Examplep                .CODE_ADDRESS A              &     5-28 MACRO-64 Assembler Directives e         I                                                      Assembler Directives I                                                               .D_FLOATINGh    I         _________________________________________________________________            .D_FLOATING          .DOUBLE   .               Floating-point storage directive           Format  5               .D_FLOATING  floating-point-number-lists  1               .DOUBLE  floating-point-number-liste           Parametere  (               floating-point-number-listE               A comma-separated list of floating-point constants. ThefF               constants cannot contain any operators except unary plusD               or unary minus. For more information on floating-point)               numbers, see Section 2.3.2.e           Descriptionp  @               .D_FLOATING evaluates the specified floating-pointD               constants and stores the results in the object module.F               .D_FLOATING generates 64-bit, double-precision floating-H               point data (1 bit of sign, 8 bits of exponent, and 55 bitsB               of fraction). See the description of .F_FLOATING forD               information on storing single-precision floating-pointG               numbers and the descriptions of .G_FLOATING, .S_FLOATING, F               and .T_FLOATING for descriptions of other floating-point               constants.  
         Notes   C               o  Double-precision floating-point numbers are alwaysr                  rounded.i  >               o  The alternate form of .D_FLOATING is .DOUBLE.  E               o  You can only use this directive within data or mixedmA                  psects (psects that have either the NOEXE or MIXnD                  attributes). For more information, see Section 5.1.  G               o  If automatic data alignment is enabled, this directivetB                  aligns the current location counter to a quadword=                  (64-bit) boundary before allocating storage.n  I                                        MACRO-64 Assembler Directives 5-29t                Assembler Directives     .D_FLOATING     @           o  The Alpha AXP architecture supports only conversion              operations for thet(              D floating-point data type.       Exampleh  !              .D_FLOATING  3.1E+02                                                                             &     5-30 MACRO-64 Assembler Directives n  b      I                                                      Assembler Directives I                                                              .DEFINE_FREG     I         _________________________________________________________________s           .DEFINE_FREG  =               Define floating-point register symbol directivee           Format  )               .DEFINE_FREG  regsym regnumo           Parameters                 regsym$               A MACRO-64 identifier.                 regnumI               An assembly-time expression or a currently defined registera               symbol.            Descriptiont  A               The identifier you specify as the first argument toeD               .DEFINE_FREG becomes a floating-point register symbol.E               Thereafter, it cannot be used as a MACRO-64 identifier.tD               Specifically, the user-defined register symbol is onlyE               allowed where a register is allowed. In this sense, thenG               user-defined register symbol is reserved until the end of0G               the assembly unit or until you delete its definition (seet5               .UNDEFINE_REG), whichever occurs first.l  B               The second argument to .DEFINE_FREG can be either anF               integer expression or a currently defined floating-pointB               register symbol. An integer expression indicates theC               register number to assign to the register symbol. ThemF               expression can contain no forward or external referencesI               and must be in the range of 0 to 31. Alternatively, you can D               define a register symbol in terms of another currentlyC               defined register symbol. A currently defined register B               symbol is a predefined register symbol or a registerH               symbol that you have previously defined. In this case, theE               new register symbol you specify with the first argument C               receives the current value of the register symbol you /               specify with the second argument.e    I                                        MACRO-64 Assembler Directives 5-31r 3  R           Assembler Directives     .DEFINE_FREG      	     Notes   D           o  You cannot define a floating-point register in terms of0              an integer register and vice versa.  D           o  You cannot redefine a currently defined register symbolE              with a different register number. To redefine a registerGB              symbol, you must first delete the old definition with)              the .UNDEFINE_REG directive.t       Example                     .DEFINE_s3     IREG A0     16      ; A0 is integer register 16                   .DEFINE_s4     IREG A1     R17     ; A1 is integer register 17,G                                              ;  defined in terms of theaN                                              ;  predefined R17 register symbol                  .DEFINE_ 5     IREG PTR    A0      ; PTR is integer register 16, G                                              ;  defined in terms of the ;                                              ;  previously-      defined A0 register 6                                              ;  symbol                  .DEFINE_f4     FREG $F0    0       ; $F0 is floating register 0                  .DEFINE_c5     FREG $F1    F1      ; $F1 is floating register 1,tG                                              ;  defined in terms of theoM                                              ;  predefined F1 register symbol                   .DEFINE_d8     FREG RADIUS $F1     ; RADIUS is floating register 1,G                                              ;  defined in terms of thecF                                              ;  previously defined $F1?                                              ;  register symbol                   .DEFINE_a3     IREG X1     R5      ; X1 is integer register 5, G                                              ;  defined in terms of the M                                              ;  predefined R5 register symbole                  .DEFINE_n        &     5-32 MACRO-64 Assembler Directives B  N      I                                                      Assembler DirectiveseI                                                              .DEFINE_FREG     8         IREG X1     5       ; 2nd definition is the sameJ                                                 ;  value, so no diagnostic:                                                 ;  results                     .DEFINE_:         IREG X1     7       ; Warning: redefinition with aB                                                 ;  different value                     .DEFINE_=         IREG X2     F5      ; Error: cannot define an integerCI                                                 ;  register in terms of a D                                                 ;  floating register  ?                     LDQ         R1, (PTR)       ; LDQ R1, (R16) ?                     LDG         RADIUS, (A1)    ; LDG F1, (R17)a                                                                I                                        MACRO-64 Assembler Directives 5-33u e              Assembler Directives     .DEFINE_IREG    E     _________________________________________________________________8       .DEFINE_IREG  2           Define integer register symbol directive  
     Format  %           .DEFINE_IREG  regsym regnumd       Parameters             regsym            A MACRO-64 identifier.             regnumE           An assembly-time expression or a currently defined registeru           symbol.        Description   =           The identifier you specify as the first argument to :           .DEFINE_IREG becomes an integer register symbol.A           Thereafter, it cannot be used as a MACRO-64 identifier. @           Specifically, the user-defined register symbol is onlyA           allowed where a register is allowed. In this sense, the C           user-defined register symbol is reserved until the end of C           the assembly unit or until you delete its definition (seee1           .UNDEFINE_REG), whichever occurs first._  >           The second argument to .DEFINE_IREG can be either anD           integer expression or a currently defined integer register>           symbol. An integer expression indicates the registerA           number to assign to the register symbol. The expression C           can contain no forward or external references and must be B           in the range of 0 to 31. Alternatively, you can define a@           register symbol in terms of another, currently definedC           register symbol. A currently defined register symbol is anB           predefined register symbol or a register symbol that youA           have previously defined. In this case, the new register A           symbol you specify with the first argument receives the C           current value of the register symbol you specify with the            second argument.    &     5-34 MACRO-64 Assembler Directives o         I                                                      Assembler Directives I                                                              .DEFINE_IREGe      
         Notes_  D               o  You cannot define an integer register in terms of a8                  floating-point register and vice versa.  H               o  You cannot redefine a currently defined register symbolI                  with a different register number. To redefine a register F                  symbol, you must first delete the old definition with-                  the .UNDEFINE_REG directive.            Example_  3               Refer to the example in .DEFINE_FREG.                                                               I                                        MACRO-64 Assembler Directives 5-35o                Assembler Directives     .DISABLE    E     _________________________________________________________________        .DISABLE
     .DSABL  /           Disable assembler functions directive   
     Format  !           .DISABLE  argument-listK             .DSABL  argument-list   
     Parametero             argument-list(C           One or more of the symbolic arguments listed in Table 5-3aB           under the description of .ENABLE. You can use either the>           long or the short form of the symbolic arguments. IfB           you specify multiple arguments, separate them by commas,           spaces, or tabs.       DescriptionK  E           .DISABLE disables the specified assembler function. See the 6           description of .ENABLE for more information.  3           The alternate form of .DISABLE is .DSABL.                                   &     5-36 MACRO-64 Assembler Directives _  u      I                                                      Assembler Directives I                                                                     .ELSE     I         _________________________________________________________________C  
         .ELSEB  2               Conditional assembly block directive           Format                 .ELSE2           Descriptiona  @               A conditional assembly block is a series of sourceF               statements that is assembled only if a certain conditionE               is met. .IF starts the conditional block and .ENDC endstG               the conditional block; each .IF must have a correspondingtD               .ENDC. The .IF directive contains a condition test andC               one or two arguments. The condition test specified iseF               applied to the arguments. If the test is met, all MACRO-G               64 statements between .IF and .ELSE are assembled. If the I               test is not met, the statements between .ELSE and .ENDC are                assembled.  F               Conditional blocks can be nested; that is, a conditionalD               block can be inside another conditional block. In thisE               case, the statements in the inner conditional block are G               assembled only if the condition is met for both the outerrH               and inner block. For more information, see the description#               of the .IF directive.i  
         Notes   ?               o  You cannot use the .ELSE directive in the sameW:                  conditional block as the .IF_x directive.  @               o  The .ELSE directive is similar to the .IF_FALSEI                  directive. However, you can only use .ELSE once within a G                  conditional block. .IF_FALSE can be used any number ofS.                  times in a conditional block.            I                                        MACRO-64 Assembler Directives 5-37w s  0           Assembler Directives	     .ELSEW           Example1  A           Here is an example of a conditional assembly directive:e  E              .IF EQUAL  ALPHA+1        ; Assemble block if ALPHA+1=0.                 .                .A              .ELSE                     ; Assemble when .IF=false.B                .                .              .ENDC                                                                  &     5-38 MACRO-64 Assembler Directives           I                                                      Assembler DirectiveslI                                                                   .ENABLE     I         _________________________________________________________________            .ENABLE          .ENABL  2               Enable assembler functions directive           Format  $               .ENABLE  argument-list  #               .ENABL  argument-listr           Parameter                  argument-list H               One or more of the symbolic arguments listed in Table 5-3.G               You can use either the long form or the short form of the !               symbolic arguments.   C               If you specify multiple arguments, separate them withn&               commas, spaces, or tabs.  I               Table_5-3_.ENABLE_and_.DISABLE_Symbolic_Arguments__________n  *                                    Default!                             ShortsI               Long_Form_____Form___ConditioFunction______________________s  I                                                  (continued on next page)                               I                                        MACRO-64 Assembler Directives 5-39  B              Assembler Directives     .ENABLE     E           Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__f  &                                Default                         Short_E           Long_Form_____Form___ConditioFunction______________________R  @           ALIGN_CODE           DisabledThe code alignment optionC                                        aligns certain branch targetl=                                        labels. The ALIGN_CODEmA                                        option is disabled for the,B                                        assembly unit if any one of=                                        the following is true:D  >                                        o  /NOALIGNMENT=CODE isB                                           specified on the command/                                           line.   @                                        o  .DISABLE ALIGN_CODE isA                                           specified in the source 2                                           program.  D                                        o  The /ALIGNMENT=CODE option7                                           is defaulted.i  :                                        See Section B.7 forC                                        information on optimizationsb?                                        and automatic alignment.A  E                                              (continued on next page)                                 &     5-40 MACRO-64 Assembler Directives e         I                                                      Assembler Directives I                                                                   .ENABLE     I               Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__d  *                                    Default!                             ShortsI               Long_Form_____Form___ConditioFunction______________________e  G               ALIGN_DATA           DisabledWhen ALIGN_DATA is disabled,aF                                            the data-storage directivesF                                            put each succeeding item onB                                            the next byte boundary.  F                                            When ALIGN_DATA is enabled,F                                            the data-storage directivesF                                            put each succeeding item onF                                            natural boundaries (such asD                                            words on word boundaries,@                                            longwords on longwordH                                            boundaries) and add pad bytes8                                            as necessary.  E                                            Accessing data on anythingtH                                            other than natural boundariesG                                            usually incurs a significantt?                                            performance penalty.n  D                                            You can enable or disableD                                            the ALIGN_DATA option forF                                            specific ranges within yourH                                            program. For more informationG                                            on automatic data alignment,aE                                            see Section 5.2. Also, see F                                            Section B.7 for informationI                                            on optimizations and automatics5                                            alignment.   I                                                  (continued on next page)I                  I                                        MACRO-64 Assembler Directives 5-41  0  C           Assembler Directives     .ENABLE     E           Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__   &                                Default                         Short E           Long_Form_____Form___ConditioFunction_______________________  E           FLOAT                Enabled Controls whether the assemblert?                                        generates floating-pointRC                                        instructions when optimizing E                                        code and performing code-label 1                                        alignment.r  D                                        Currently, the only floating-B                                        point instruction generated>                                        by the assembler duringA                                        optimization and alignment >                                        processing is FNOP, theB                                        floating-point no-operationB                                        instruction. If you specifyD                                        .DISABLE FLOAT, the assembler<                                        does not generate anyB                                        floating-point instructionsB                                        as part of optimization and<                                        alignment processing.  @                                        The initial value of this=                                        option is specified bynA                                        the /ENVIRONMENT=[NO]FLOATrD                                        command-line option. The lastC                                        value of the FLOAT option attE                                        the end of assembly determinesdB                                        whether FLOAT is enabled or0                                        DISABLED.  E                                              (continued on next page)                     &     5-42 MACRO-64 Assembler Directives           I                                                      Assembler Directives I                                                                   .ENABLEt    I               Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__o  *                                    Default!                             Short.I               Long_Form_____Form___ConditioFunction______________________   F               GLOBAL        GBL    Enabled When GLOBAL is enabled, theF                                            assembler implicitly treatsE                                            any undefined symbol as an.E                                            external reference defined D                                            in another module. If theE                                            GLOBAL option is disabled, A                                            the assembler issues a7H                                            warning and implicitly treatsE                                            the undefined symbol as an H                                            external reference assumed toH                                            be defined in another module.G                                            The last value of the GLOBAL H                                            option at the end of assemblyH                                            determines whether the GLOBALI                                            option is enabled or disabled.   I                                                  (continued on next page)                                             I                                        MACRO-64 Assembler Directives 5-43s    c           Assembler Directives     .ENABLE     E           Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__   &                                Default                         Short1E           Long_Form_____Form___ConditioFunction______________________;  C           LOCAL_BLOCK   LSB    DisabledUsed to override the default C                                        assembler behavior to define B                                        a temporary label block. (A@                                        temporary label is of theA                                        form n$ where n representsFC                                        a number.) A temporary label A                                        block is usually delimitedoC                                        by two user-defined local or B                                        global labels. However, theD                                        .ENABLE LOCAL_BLOCK directiveC                                        defines the start of a block C                                        that is terminated by one of 5                                        the following:   A                                        o  A second .ENABLE LOCAL_ :                                           BLOCK directive.  @                                        o  A .DISABLE LOCAL_BLOCK?                                           directive followed by A                                           a user-defined local oruC                                           global label, or a .PSECT_4                                           directive.  E                                              (continued on next page)l                              &     5-44 MACRO-64 Assembler Directives    a      I                                                      Assembler Directives I                                                                   .ENABLE     I               Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__h  *                                    Default!                             Short I               Long_Form_____Form___ConditioFunction______________________   H               PEEPHOLE             DisabledPeephole optimization reducesB                                            the strength of certainF                                            instructions and eliminatesG                                            instructions where possible.)A                                            The PEEPHOLE option isII                                            disabled for the assembly uniteI                                            if any one of the following ise0                                            true:  E                                            o  /NOOPTIMIZE=PEEPHOLE isfF                                               specified on the command3                                               line.o  B                                            o  .DISABLE PEEPHOLE isE                                               specified in the source 6                                               program.  D                                            o  The PEEPHOLE option is8                                               defaulted.  >                                            See Section B.7 forG                                            information on optimizations C                                            and automatic alignment.   I                                                  (continued on next page)                             I                                        MACRO-64 Assembler Directives 5-45  f  t           Assembler Directives     .ENABLE     E           Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__   &                                Default                         Short E           Long_Form_____Form___ConditioFunction______________________   ?           PREPROCESSOR_        Enabled When PREPROCESSOR_OUTPUT ?           OUTPUT                       is enabled, the MACRO-64 B                                        preprocessor processes yourD                                        source statements and outputsA                                        to the preprocessor-output_A                                        file. If the PREPROCESSOR_AA                                        OUTPUT option is disabled,tA                                        your source statements aretD                                        processed as before. However,D                                        output of these statements toC                                        the preprocessor-output file 5                                        is suppressed.   D                                        Neither .ENABLE PREPROCESSOR_:                                        OUTPUT nor .DISABLE=                                        PREPROCESSOR_OUTPUT isi<                                        passed through to the@                                        preprocessor-output file.;                                        These two directives @                                        have no effect unless you=                                        specify /PREPROCESSOR_ @                                        ONLY on the command line.@                                        For more information, see=                                        the description of the B                                        /PREPROCESSOR_ONLY command-C                                        line qualifier in Chapter 1.s  E                                              (continued on next page)t                      &     5-46 MACRO-64 Assembler Directives a  l      I                                                      Assembler DirectivescI                                                                   .ENABLEt    I               Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__m  *                                    Default!                             ShortII               Long_Form_____Form___ConditioFunction______________________D  A               SCHEDULE             DisabledInstruction schedulingc@                                            optimization reordersI                                            instructions to more optimallysB                                            utilize the instructionA                                            pipeline. The SCHEDULE E                                            option is disabled for the.F                                            assembly unit if any one ofA                                            the following is true:   E                                            o  /NOOPTIMIZE=SCHEDULE isoF                                               specified on the command3                                               line.k  B                                            o  .DISABLE SCHEDULE isE                                               specified in the sourceC6                                               program.  D                                            o  The SCHEDULE option is8                                               defaulted.  >                                            See Section B.7 forG                                            information on optimizations;I               _____________________________and_automatic_alignment.______            Description   F               .ENABLE enables the specified assembly function. .ENABLED               and its negative form, .DISABLE, control the following"               assembler functions:  ,               o  Creating local label blocks  I               o  Specifying that undefined symbol references are external_                  references   E               o  Enabling or disabling specific optimizations for thet                  assembly unit    I                                        MACRO-64 Assembler Directives 5-47r                Assembler Directives     .ENABLE     B           You can enable one or more specific optimization optionsE           with either the .ENABLE directive or the /OPTIMIZE command- C           line qualifier, or both. For more information on command-i?           line qualifiers, see Section 1.2. See Section B.7 for A           information on optimizations. If you explicitly disablem<           one or more specific optimization options with theE           .DISABLE directive, those optimization options are disabled_=           regardless of the command-line options you specify.   	     Notes   5           o  The alternate form of .ENABLE is .ENABL.        Examples                Example 1  ?              The following example shows the ALIGN_DATA option:                 .PSECT A, NOEXE3              .ENABLE ALIGN_DATA  ; Align on naturaln5                                  ; natural boundaries "              A: .BYTE 1          ;4              B: .QUAD 1000       ; B is allocated at7                                  ; a natural boundary - 8                                  ; specifically at A + 7"              .DISABLE ALIGN_DATA ;"              C: .BYTE 2          ;4              D: .QUAD 1001       ; D is allocated at:                                  ; an unaligned boundary -5                                  ; specifically C + 1i                Example 2  D              The following example shows the GLOBAL option disabled:                .DISABLE GLOBAL<              .ADDRESS X         ; Assembler issues a warning              .END             &     5-48 MACRO-64 Assembler Directives           I                                                      Assembler Directives I                                                                   .ENABLE                       Example 3  C                  The following example shows the LOCAL_BLOCK option                   enabled:   )                       .ENABLE LOCAL_BLOCK   $                       .PSECT A,NOEXE                 A1::I                 5$:   .PROCEDURE_DESCRIPTOR PROC_1   ; Temporary label 5$                        .blkb 32                 A2::F                       .address 5$         ; By default the declarationF                                           ; of A2 would have ended theE                                           ; temporary label block and E                                           ; made this reference to 5$ K                                           ; illegal.  However, this default_H                                           ; behavior has been overriddenN                                           ; by the use of .ENABLE LOCAL_BLOCK.  *                       .DISABLE LOCAL_BLOCK                       .END                    Example 4  I                  The following example shows an unoptimized and optimized D                  list of instructions with the SCHEDULE and PEEPHOLE!                  options enabled:u  )                 .ENABLE PEEPHOLE,SCHEDULE 3                 .psect A,EXE,QUAD     ; unoptimized                  TRAPB                   A::ADDF F1,F2,F3                     ADDF F4,F5,F6                     ADDL R1,R2,R3                     ADDL R4,R5,R6  G                  This example shows the optimized list of instructions:   )                 .ENABLE PEEPHOLE,SCHEDULE 1                 .psect A,EXE,QUAD     ; optimized                   A::ADDF F1,F2,F3                     ADDL R1,R2,R3                     ADDF F4,F5,F6                     ADDL R4,R5,R6  I                                        MACRO-64 Assembler Directives 5-49                 Assembler Directives     .ENABLE     <              The following example shows a repeat block that@              initializes a block of 1000 longwords to the values?              of 0 through 999. The .DISABLE PREPROCESSOR_OUTPUTYC              directive suppresses from the preprocessor output filetB              those statements that are incompatible with the OSF/1              Assembler.o  )              .DISABLE PREPROCESSOR_OUTPUT                I=0i              .REPEAT 1000 +                 .ENABLE PREPROCESSOR_OUTPUTa!                 .LONG %INTEGER(I) ,                 .DISABLE PREPROCESSOR_OUTPUT                 I = I + 1               .ENDR                                                            &     5-50 MACRO-64 Assembler Directives           I                                                      Assembler Directives I                                                                      .END     I         _________________________________________________________________            .END  ,               Assembly termination directive           Format                 .END  [label]            Parameter                  label F               The procedure descriptor name that specifies the routineC               (called the transfer address) where program executionC0               begins. This argument is optional.           Descriptionn  D               .END terminates the source program. No additional textH               should occur beyond this point in the current source file,H               or in any additional source files specified in the commandH               line for this assembly. If any additional text does occur,D               the assembler ignores it. The additional text does notF               appear in the listing file nor does it affect the object               file.   
         Notesn  F               o  When an executable image consisting of several objectA                  modules is linked, only one object module shouldiD                  be terminated by an .END directive that specifies aE                  transfer address. All other object modules should be D                  terminated by .END directives that do not specify aI                  transfer address. If an executable image contains either G                  no transfer address or more than one transfer address, 6                  the linker displays an error message.  D               o  For more information, see the .PROCEDURE_DESCRIPTOR                  directive.s          I                                        MACRO-64 Assembler Directives 5-51                 Assembler Directives     .END           Example                   .                .                .<              .PROCEDURE_DESCRIPTOR TRANSFER1,code_address_T1                .                .                .I              .END TRANSFER1        ; TRANSFER1 is module transfer addressS                                                                    &     5-52 MACRO-64 Assembler Directives M  O      I                                                      Assembler Directives I                                                                     .ENDC     I         _________________________________________________________________n  
         .ENDCi  '               End conditional directive            Format                 .ENDC            Description   G               .ENDC terminates the conditional range started by the .IF H               directive. See the description of .IF for more information               and examples.                                                             I                                        MACRO-64 Assembler Directives 5-53                 Assembler Directives	     .ENDM     E     _________________________________________________________________   	     .ENDM   (           End macro definition directive  
     Format             .ENDM  [macro-name]l  
     Parameter              macro-nameE           The name of the macro whose definition is to be terminated. E           The macro name is optional; if specified, it must match the B           name defined in the matching .MACRO directive. The macroC           name should be specified so that the assembler can detect 2           any improperly nested macro definitions.       Description   D           .ENDM terminates the macro definition. See the description@           of .MACRO for an example that uses an .ENDM directive.  	     Notes   D           o  If .ENDM is encountered outside a macro definition, the1              assembler displays an error message.n                                  &     5-54 MACRO-64 Assembler Directives           I                                                      Assembler DirectiveseI                                                                     .ENDRS    I         _________________________________________________________________   
         .ENDR   (               End repeat range directive           Format                 .ENDRA           Descriptione  G               .ENDR indicates the end of a repeat range. It must be themC               final statement of every repeat block. A repeat blockmD               consists of any range of text beginning with the .IRP,H               .IRPC, or .REPEAT directive. For more information, see theH               description for the .IRP, .IRPC, or .REPEAT directives for9               examples of how to use the .ENDR directive.s  
         Notes   D               o  If .ENDR is encountered outside a repeat block, the5                  assembler displays an error message.e                                            I                                        MACRO-64 Assembler Directives 5-55d n  t           Assembler Directives     .END_EXACT    E     _________________________________________________________________        .END_EXACT  /           End exact instruction block directive   
     Format             .END_EXACT       Description   =           .END_EXACT delimits the end of an exact instruction C           block. An exact instruction block suppresses the SCHEDULE ?           and PEEPHOLE optimizations for the specified range of C           instructions regardless if code optimizations are enabledl            for the assembly unit.  C           For more information on the .END_EXACT directive, see the D           description of the .BEGIN_EXACT directive in this chapter.                                                  &     5-56 MACRO-64 Assembler Directives           I                                                      Assembler Directives I                                                                    .ERRORL    I         _________________________________________________________________u           .ERROR                 Error directive            Format  $               .ERROR  quoted-literal           Parameter                  quoted-literalF               A string of characters, between a pair of double quotes,G               displayed during assembly. For more information on quotedc(               literals, see Section 2.4.           Descriptioni  H               .ERROR causes the assembler to display an error message onH               the terminal or batch log file and in the listing file (if               there is one).  D               Using .ERROR prevents an output object file from being               produced.   
         Notesu  I               o  .PRINT, .WARN, and .ERROR are directives used to display B                  messages. You can use them to display informationE                  indicating unexpected or important conditions within                   the assembly.  F               o  This directive also accepts VAX MACRO syntax. See theC                  VAX MACRO and Instruction Set Reference Manual forr                  details.            Example   *                 .ERROR "Illegal Arguments"                 ^ G                 %MACRO64-E-GENERROR, Generated ERROR: Illegal ArgumentsS@                 at line number 3 in file DISK$:[TEST]ERROR.M64;2    I                                        MACRO-64 Assembler Directives 5-57c i  e           Assembler Directives	     .EVEN     E     _________________________________________________________________   	     .EVEN   3           Even location counter alignment directivef  
     Format             .EVENv       Description   >           .EVEN ensures that the current value of the locationB           counter is even by adding 1 if the current value is odd.C           If the current value is already even, no action is taken._  	     Notes   A           o  You can only use this directive within data or mixed =              psects (psects that have either the NOEXE or MIX @              attributes). For more information, see Section 5.1.                                                &     5-58 MACRO-64 Assembler Directives           I                                                      Assembler Directives I                                                                 .EXTERNALU    I         _________________________________________________________________e           .EXTERNAL          .EXTRN  1               External symbol attribute directive            Format  $               .EXTERNAL  symbol-list  !               .EXTRN  symbol-list            Parameteru                 symbol-list 9               A list of symbol names separated by commas.            Descriptionh  @               .EXTERNAL indicates that the specified symbols areC               external; that is, the symbols are defined in another_               object module.  
         Notes   ;               o  The alternate form of .EXTERNAL is .EXTRN.            Examplet  D                      .EXTERNAL B    ; B is defined in another module                         .                          .e                         . ?                 A::  .ADDRESS B    ; Its address is stored here                     I                                        MACRO-64 Assembler Directives 5-59o t  ,           Assembler Directives     .F_FLOATINGd    E     _________________________________________________________________L       .F_FLOATING 
     .FLOAT  *           Floating-point storage directive  
     Format  1           .F_FLOATING  floating-point-number-listx  ,           .FLOAT  floating-point-number-list  
     Parametert  $           floating-point-number-listE           A list of one or more floating-point constants separated by E           commas. For more information on floating-point numbers, see C           Section 2.3.2. The constants cannot contain any operators +           except unary plus or unary minus.        Description   <           .F_FLOATING evaluates the specified floating-pointB           constant(s) and stores the results in the object module.C           .F_FLOATING generates 32-bit, single-precision, floating- D           point data (1 bit of sign, 8 bits of exponent, and 23 bitsA           of fractional significance). See the description of .D_ >           FLOATING for information on storing double-precision>           floating-point constants and the descriptions of .G_B           FLOATING, S_FLOATING, and T_FLOATING for descriptions of)           other floating-point constants.f  	     Notes   9           o  The alternate form of .F_FLOATING is .FLOAT.   A           o  You can only use this directive within data or mixed =              psects (psects that have either the NOEXE or MIXm@              attributes). For more information, see Section 5.1.  C           o  If automatic data alignment is enabled, this directive C              aligns the current location counter to a longword (32- 5              bit) boundary before allocating storage.   &     5-60 MACRO-64 Assembler Directives    E      I                                                      Assembler Directives I                                                               .F_FLOATING                Example   &                 .F_FLOATING 1.0,3.0E+2                                                                                  I                                        MACRO-64 Assembler Directives 5-61N E              Assembler Directives     .G_FLOATINGr    E     _________________________________________________________________e       .G_FLOATINGl  ,           G_floating-point storage directive  
     Format  1           .G_FLOATING  floating-point-number-list   
     ParameterE  $           floating-point-number-list>           A comma-separated list of one or more floating-pointD           constants. For more information on floating-point numbers,=           see Section 2.3.2. The constants cannot contain any 5           operators except unary plus or unary minus.        Description   <           .G_FLOATING evaluates the specified floating-pointD           constants and stores the results in the object module. .G_C           FLOATING generates 64-bit data (1 bit of sign, 11 bits oftD           exponent, and 52 bits of fraction). See the description ofA           .D_FLOATING for information on storing double-precisioni>           floating-point constants and the descriptions of .F_B           FLOATING, S_FLOATING, and T_FLOATING for descriptions of)           other floating-point constants.A  	     Notesx  A           o  You can only use this directive within data or mixede=              psects (psects that have either the NOEXE or MIX @              attributes). For more information, see Section 5.1.  C           o  If automatic data alignment is enabled, this directive >              aligns the current location counter to a quadword9              (64-bit) boundary before allocating storage.        Example                  .G_FLOATING  2.0E-3      &     5-62 MACRO-64 Assembler Directives           I                                                      Assembler Directives I                                                                    .IDENT     I         _________________________________________________________________l           .IDENT  &               Identification directive           Format  $               .IDENT  quoted-literal           Parameteri                 quoted-literalE               A 1- to 31-character string, within double quotes, that F               identifies the module, such as a string that specifies aF               version number. For more information on quoted literals,               see Section 2.4.           Descriptioni  G               .IDENT provides a means of identifying the object module. H               This identification is in addition to the name assigned toH               the object module with .TITLE. You can specify a characterI               string in .IDENT to label the object module. This string is H               printed in the header of the listing file and also appears#               in the object module.   
         Notes   F               o  If a source module contains more than one .IDENT, theF                  last directive given establishes the character stringE                  that forms part of the object module identification..  F               o  This directive also accepts VAX MACRO syntax. See theC                  VAX MACRO and Instruction Set Reference Manual for                   details._           Example   $                 .IDENT "Module Name"          I                                        MACRO-64 Assembler Directives 5-63e p  s           Assembler Directives     .IF     E     _________________________________________________________________        .IFs  .           Conditional assembly block directive  
     Format  $           .IF  condition argument(s)              .              .              .             range               .              .              .             .ENDC        Parameters             condition @           A specified condition that must be met if the block is?           to be included in the assembly. The condition must bee@           separated from the argument by a comma, space, or tab.B           Table 5-4 lists the conditions that can be tested by the*           conditional assembly directives.             argument(s) >           One or more symbolic arguments or expressions of the;           specified conditional test. If the argument is ang>           expression, it cannot contain any undefined symbols.B           The assembler converts relocatable arguments to absolute@           arguments by discarding the relocatable portion of theD           expression and using only the offset from the beginning of<           the psect. Arguments must be separated by a comma.             rangeID           The block of source code that is conditionally included in           the assembly.A        &     5-64 MACRO-64 Assembler Directives T  R      I                                                      Assembler Directives I                                                                       .IF     I         Table_5-4_Condition_Tests_for_Conditional_Assembly_Directives____   Q                                                                         Condition L         Condition         Complement                         Number     ThatQ                           Condition              Argument    of         AssemblesyM         Test              Test                   Type        Arguments  Block /                    Short                  Short          LongI         Form_______Form___Long_Form_______Form___________________________r  S         EQUAL      EQ     NOT_EQUAL       NE     Expression  1 or       Expression-aL                                                              2[1]       1 isP                                                                         equal toS                                                                         expression-dP                                                                         2 or notP                                                                         equal toS                                                                         expression- J                                                                         2.  S         GREATER    GT     LESS_EQUAL      LE     Expression  1 or       Expression- L                                                              2[1]       1 isO                                                                         greater.L                                                                         thanS                                                                         expression- L                                                                         2 orL                                                                         lessO                                                                         than or6P                                                                         equal toS                                                                         expression- J                                                                         2.  I         [1]If_the_second_argument_is_omitted,_comparison_is_made_against_   
         0.  I                                                  (continued on next page)                   I                                        MACRO-64 Assembler Directives 5-65                 Assembler Directives     .IF     >     Table 5-4 (Cont.) Condition Tests for Conditional AssemblyE     __________________Directives______________________________________  M                                                                     ConditiontH     Condition         Complement                         Number     ThatM                       Condition              Argument    of         AssembleseI     Test              Test                   Type        Arguments  Block +                Short                  Short      LongE     Form_______Form___Long_Form_______Form___________________________s  O     LESS_      LT     GREATER_EQUAL   GE     Expression  1 or       Expression-_H     THAN                                                 2[1]       1 isH                                                                     lessH                                                                     thanO                                                                     expression-iH                                                                     2 orK                                                                     greatertK                                                                     than or L                                                                     equal toO                                                                     expression- F                                                                     2.  J     DEFINED    DF     NOT_DEFINED     NDF    Symbolic    1          SymbolF                                                                     isK                                                                     defined J                                                                     or notL                                                                     defined.  L     BLANK      B      NOT_BLANK       NB     Macro       1          ArgumentL                                                                     is blankJ                                                                     or notJ                                                                     blank.  M     IDENTICAL  IDN    DIFFERENT       DIF    Macro       2          ArgumentsrG                                                                     are,K                                                                     identi-rJ                                                                     cal orK                                                                     differ-eH                                                                     ent.E     [1]If_the_second_argument_is_omitted,_comparison_is_made_against_b       0.E     __________________________________________________________________  &     5-66 MACRO-64 Assembler Directives           I                                                      Assembler DirectivesTI                                                                       .IFn               Description.  @               A conditional assembly block is a series of sourceG               statements that are assembled only if a certain conditionsI               is met. A .IF starts the conditional block and a .ENDC endsuG               the conditional block; each .IF must have a correspondinghD               .ENDC. The .IF directive contains a condition test andC               one or two arguments. The condition test specified is6H               applied to the arguments. If the test is met, all MACRO-64I               statements between .IF and .ENDC are assembled. If the test G               is not met, the statements are not assembled. Optionally,_F               you can use the .ELSE directive (or a combination of theG               .IFF, .IFT, and .IFTF directives) to specify an alternatedF               series of statements to assemble if the test is not met.  E               You can nest conditional blocks; that is, a conditional D               block can be inside another conditional block. In thisE               case, the statements in the inner conditional block are G               assembled only if the condition is met for both the outer                and inner block.  
         Notest  I               o  The assembler displays an error message if the followingeG                  directives occur outside a conditional assembly block: C                  .ENDC, .ELSE, .IF_FALSE, .IF_TRUE, .IF_TRUE_FALSE.s  D               o  MACRO-64 permits a nesting depth of 100 conditionalH                  assembly levels. If a statement attempts to exceed thisE                  nesting level depth, the assembler displays an errort                  message.s  G               o  The effect of logical expressions can only be achievednG                  by using several levels of .IF directives. See Example                   5.u  F               o  Lowercase string arguments are converted to uppercaseG                  before being compared, unless the string is surrounded$E                  by double quotes or /NAMES=AS_IS is specified on the                   command line.  I               o  The assembler displays an error message if .IF specifies_H                  any of the following: a condition test other than thoseF                  in Table 5-4, an illegal argument, or a null argument/                  specified in an .IF directive.   I                                        MACRO-64 Assembler Directives 5-67  t  c           Assembler Directives     .IFr           Examples                Example 1  D              Here is an example of a conditional assembly directive:  H              .IF EQUAL  ALPHA+1        ; Assemble block if ALPHA+1=0. DoH                .                       ;   not assemble if ALPHA+1 not=0                .                .              .ENDC                Example 2  C              Nested conditional directives take the following form:s  (              .IF   condition argument(s)(              .IF   condition argument(s)                .                .                .              .ENDC              .ENDC                Example 3  D              The following conditional directives can govern whether9              assembly of the specified range is to occur:                 .IF DEFINED  SYM1              .IF DEFINED  SYM2                .                .                .              .ENDC              .ENDC  ?              In this example, if the outermost condition is note?              satisfied, no deeper level of evaluation of nestedt>              conditional statements within the program occurs.B              Therefore, both SYM1 and SYM2 must be defined for the-              specified range to be assembled.     &     5-68 MACRO-64 Assembler Directives           I                                                      Assembler Directives I                                                                       .IF                       Example 4  I                  An alternate series of statements can be specified using                   .ELSE._  B                 .IF EQUAL A,B        ; Assemble if A is equal to BF                 .ELSE                ; Assemble if A is not equal to B                 .ENDC                                                                           I                                        MACRO-64 Assembler Directives 5-69                 Assembler Directives     .IFn                  Example 5  D              The following example demonstrates the use of .ELSE and              nesting:c  >              .IF LESS_THAN X,Y  ; Assemble if X is less than Y>                 .IF DEFINED Z   ; Assemble if Z is defined and3                                 ;  X is less than YsB                 .ELSE           ; Assemble if Z is not defined and3                                 ;  X is less than Y                  .ENDC(M              .ELSE              ; Assemble if X is greater than or equal to YcC                 .IF DEFINED Z   ; Assemble if Z is defined and X isn=                                 ;  greater than or equal to Ys                 .ENDCf              .ENDC                                                          &     5-70 MACRO-64 Assembler Directives    o      I                                                      Assembler Directives I                                                                     .IF_x     I         _________________________________________________________________i  
         .IF_xe  6               Subconditional assembly block directives           Format                 .IF_FALSE                  .IF_TRUE                 .IF_TRUE_FALSE           Descriptionr  G               For compatibility with VAX MACRO, MACRO-64 provides three 3               directives for use within .IF blocks:   I               ___________________________________________________________ I               Directive_______Function___________________________________N  D               .IF_FALSE       If the condition of the assembly blockC                               tests false, the program includes the6A                               source code following the .IF_FALSEsE                               directive and continuing up to the next_G                               subconditional directive or to the end ofs=                               the conditional assembly block.n  D               .IF_TRUE        If the condition of the assembly blockI                               tests true, the program includes the source G                               code following the .IF_TRUE directive and F                               continuing up to the next subconditionalH                               directive or to the end of the conditional-                               assembly block.t  H               .IF_TRUE_FALSE  Regardless of whether the condition of theE                               assembly block tests true or false, the F                               source code following the .IF TRUE_FALSEF                               directive (and continuing up to the nextG                               subconditional directive or to the end of_I               ________________the_assembly_block)_is_always_included.____t  G               The implied argument of a subconditional directive is thewD               condition test specified when the conditional assembly@               block was entered. A conditional or subconditionalE               directive in a nested conditional assembly block is nott  I                                        MACRO-64 Assembler Directives 5-71d                Assembler Directives	     .IF_xs    @           evaluated if the preceding (or outer) condition in the?           block is not satisfied (see Example 3 and Example 4).   @           A conditional block with a subconditional directive isE           different from a nested conditional block. If the condition E           in the .IF is not met, the inner conditional blocks are not_E           assembled, but a subconditional directive can cause a block            to be assembled.  	     Notesd  <           o  If a subconditional directive appears outside aB              conditional assembly block, the assembler displays an              error message.t  A           o  The alternate forms of .IF_FALSE, .IF_TRUE, and .IF_u2              TRUE_FALSE are .IFF, .IFT, and .IFTF.  B           o  You cannot use .ELSE in the same conditional block as              .IF_x.        Examples                Example 1  /              Assume that symbol SYM is defined:a                                      &     5-72 MACRO-64 Assembler Directives a  t      I                                                      Assembler Directives I                                                                     .IF_x     K                    .IF DEFINED   SYM     ; Tests TRUE since SYM is defined.eJ                      .                   ;   Assembles the following code.                      .                      .E                    .IF_FALSE             ; Tests FALSE since previous D                      .                   ;   .IF was TRUE.  Does notI                      .                   ;   assemble the following code.                       .K                    .IF_TRUE              ; Tests TRUE since SYM is defined. J                      .                   ;   Assembles the following code.                      .                      .C                    .IF_TRUE_FALSE        ; Assembles following code =                      .                   ;   unconditionally.o                      .                      .K                    .IF_TRUE              ; Tests TRUE since SYM is defined. C                      .                   ;   Assembles remainder ofeH                      .                   ;   conditional assembly block.                      .                    .ENDC                    Example 2  I                  Assume that symbol X is defined and that symbol Y is not                   defined:d  I                    .IF DEFINED  X        ; Tests TRUE since X is defined. N                    .IF DEFINED  Y        ; Tests FALSE since Y is not defined.M                    .IF_FALSE             ; Tests TRUE since Y is not defined. J                      .                   ;   Assembles the following code.                      .                      .N                    .IF_TRUE              ; Tests FALSE since Y is not defined.L                      .                   ;   Does not assemble the following2                      .                   ;   code.                      .                    .ENDC                    .ENDC            I                                        MACRO-64 Assembler Directives 5-73                 Assembler Directives	     .IF_x                   Example 3  E              Assume that symbol A is defined and that symbol B is not               defined:o  E                 .IF DEFINED  A       ; Tests TRUE since A is defined. F                   .                  ;   Assembles the following code.                   .                    . F                 .IF_FALSE            ; Tests FALSE since A is defined.H                   .                  ;   Does not assemble the following.                   .                  ;   code.                   .oC                 .IF NOT_DEFINED B    ; Nested conditional directiveo:                   .                  ;   is not evaluated.                   .Q                   .e                 .ENDCs                 .ENDC                 Example 4  @              Assume that symbol X is not defined but symbol Y is              defined:   J                 .IF DEFINED  X       ; Tests FALSE since X is not defined.H                   .                  ;   Does not assemble the following.                   .                  ;   code.                   . C                 .IF DEFINED  Y       ; Nested conditional directive :                   .                  ;   is not evaluated.                   .                    . <                 .IF_FALSE            ; Nested subconditionalD                   .                  ;   directive is not evaluated.                   .                    . <                 .IF_TRUE             ; Nested subconditionalD                   .                  ;   directive is not evaluated.                   .                    .                  .ENDC                  .ENDC     &     5-74 MACRO-64 Assembler Directives i         I                                                      Assembler Directives I                                                                      .IIF     I         _________________________________________________________________6           .IIF  <               Immediate conditional assembly block directive           Format  7               .IIF  condition [,]argument(s), statementx           Parameters                 condition F               One of the legal condition tests defined for conditionalH               assembly blocks in Table 5-4 (see the description of .IF).E               The condition must be separated from the arguments by a I               comma, space, or tab. If the first argument can be a blank,sG               the condition must be separated from the arguments with a-               comma.                 argument(s) I               An expression or symbolic argument (described in Table 5-4) F               associated with the immediate conditional assembly blockD               directive. If the argument is an expression, it cannotD               contain any undefined symbols. For more information onC               terms and expressions, see Section 2.8. The assembler E               converts relocatable arguments to absolute arguments by F               discarding the relocatable portion of the expression andH               using only the offset from the beginning of the psect. TheH               arguments must be separated from the statement by a comma.                 statement ?               The statement to be assembled if the condition is                satisfied.           Description   E               .IIF provides a means of writing a one-line conditional @               assembly block. The condition to be tested and theH               conditional assembly block are expressed completely withinD               the line containing the .IIF directive. No terminating5               .ENDC statement is required or allowed.       I                                        MACRO-64 Assembler Directives 5-75                 Assembler Directives     .IIF      	     Notesi  <           o  The assembler displays an error message if .IIF?              specifies a condition test other than those listedoB              in Table 5-4, which the assembler considers valid, an2              illegal argument, or a null argument.       Example   E           In the following example, the symbol EXAM is defined within            the source program:   (              .IIF DEFINED EXAM, BR ALPHA  6           This directive generates the following code:                BR    ALPHA                                                      &     5-76 MACRO-64 Assembler Directives           I                                                      Assembler Directives I                                                                  .INCLUDE     I         _________________________________________________________________r           .INCLUDE  +               Include source file directive            Format  &               .INCLUDE  quoted-literal           Parameter                  quoted-literalF               The name of the source file to be included within doubleB               quotes. If a logical name exists that is the same asF               the source file name, specify the .M64 file extension toG               override the logical name. For more information on how to 7               specify quoted literals, see Section 2.4._           Description   C               .INCLUDE indicates that the current input source file D               should be suspended and that the specified file shouldF               be used. When that file ends, the original source stream;               resumes, starting at the line after .INCLUDE.i  
         Notesr  B               o  The assembler issues an error message if the file*                  nesting level exceeds 50.           Examplek  $                 .INCLUDE "file1.m64"                      I                                        MACRO-64 Assembler Directives 5-77a    o           Assembler Directives     .INSTRUCTION    E     _________________________________________________________________s       .INSTRUCTION             Instruction directivem  
     Format  "           .INSTRUCTION  expression  
     Parameter              expression?           An absolute expression in the range of -2147483648 to D           2147483647. For more information on terms and expressions,@           see Section 2.8. The expression cannot be relocatable,           external, or complex.        Description   E           The specified value is stored at the current location as an D           instruction. You can use .INSTRUCTION to specify arbitrary?           instructions. Similar to .LONG, .INSTRUCTION stores arA           longword (32 bits) of data. Unlike .LONG, the assemblerhE           considers .INSTRUCTION an instruction and allows its use in            code psects.  	     Notesr  ;           o  You can only use this directive within code oruA              mixed psects (psects that have either the EXE or MIX,@              attributes). For more information, see Section 5.1.  B           o  If automatic data alignment is enabled within a mixed>              psect, this directive aligns the current location;              counter to a longword (32-bit) boundary before                allocating storage.  E           o  You can use this directive to store arbitrary, longword, ;              assembly-time constant data in a code section.l          &     5-78 MACRO-64 Assembler Directives e  r      I                                                      Assembler Directives I                                                              .INSTRUCTIONE               Example                    .INSTRUCTION 7                                                                                  I                                        MACRO-64 Assembler Directives 5-79                 Assembler Directives     .IRP    E     _________________________________________________________________        .IRP  .           Indefinite repeat argument directive  
     Format  &           .IRP  symbol,<argument list>                .              .              .           ranger                .              .              .           .ENDR        Parameters             symbolB           A formal argument that is successively replaced with the?           specified actual arguments enclosed in angle brackets B           (<>).  If no formal argument is specified, the assembler$           displays an error message.             <argument list>FC           A list of actual arguments enclosed in angle brackets and B           used in expanding the indefinite repeat range. An actualB           argument can consist of one or more characters. MultipleB           arguments must be separated by a legal separator (comma,B           space, or tab). If no actual arguments are specified, no           action is taken.             range ?           The block of source text to be repeated once for eachNA           occurrence of an actual argument in the list. The rangerD           can contain macro definitions and repeat ranges. .MEXIT isE           legal within the range and causes the current and remainingr$           repetitions to be aborted.      &     5-80 MACRO-64 Assembler Directives           I                                                      Assembler Directives I                                                                      .IRPD               Description   D               .IRP replaces a formal argument with successive actualG               arguments specified in an argument list. This replacementcC               process occurs during the expansion of the indefiniteIG               repeat block range. The .ENDR directive specifies the end                of the range.i  H               .IRP is similar to a macro definition with only one formalI               argument. At each successive expansion of the repeat block, G               this formal argument is replaced with successive elementstE               from the argument list. The directive and its range aregI               coded in line within the source program. This type of macro G               definition and its range do not require calling the macro D               by name, as do other macros described in this section.  D               .IRP can appear either inside or outside another macroG               definition, indefinite repeat block, or repeat block (seetC               the description of .REPEAT). The rules for specifyingeG               .IRP arguments are the same as those for specifying macro                arguments.           Example   1               The macro definition is as follows:s  :                 .macro CHECK_PROCEDURE_KIND PROCEDURE_KINDB                     OK = 0      ; Assume procedure_kind is unknownB                     .irp REFERENCE_KIND,BOUND,NULL, REGISTER,STACKI                         .if identical, <PROCEDURE_KIND>, <REFERENCE_KIND> <                             OK = 1 ; Procedure_kind is known<                             .mexit ; No need to look further                         .endcn                     .endre;                     .if eq, OK  ; If unknown procedure kind G                         .error "Unknown procedure kind: PROCEDURE_KIND"                      .endcb*                 .endm CHECK_PROCEDURE_KIND  -                 CHECK_PROCEDURE_KIND REGISTERl+                 CHECK_PROCEDURE_KIND FOOZLE_      I                                        MACRO-64 Assembler Directives 5-81_ _  _           Assembler Directives     .IRP    @           The macro call and expansion of the previously defined           macro is as follows:  *              CHECK_PROCEDURE_KIND REGISTER?                  OK = 0      ; Assume procedure kind is unknown 1                  .if identical,<REGISTER>,<BOUND>                   .endc0                  .if identical,<REGISTER>,<NULL>                  .endc4                  .if identical,<REGISTER>,<REGISTER>5                      OK = 1 ; Procedure kind is knownk5                      .mexit ; No need to look further 8                  .if eq, OK  ; If unknown procedure kind                  .endc  (              CHECK_PROCEDURE_KIND FOOZLE?                  OK = 0      ; Assume procedure kind is unknown /                  .if identical,<FOOZLE>,<BOUND>                   .endc.                  .if identical,<FOOZLE>,<NULL>                  .endc2                  .if identical,<FOOZLE>,<REGISTER>                  .endc/                  .if identical,<FOOZLE>,<STACK>                   .endc8                  .if eq, OK  ; If unknown procedure kind<                      .error "Unknown procedure kind: FOOZLE"                  .endc  A           In this example the CHECK_PROCEDURE_KIND macro uses theoE           .IRP directive to iterate over a list of reference keywords C           to determine if its argument matches one of the referenceiB           keywords. If a match is not found, the macro displays an           error message.                      &     5-82 MACRO-64 Assembler Directives o  i      I                                                      Assembler Directives7I                                                                     .IRPCa    I         _________________________________________________________________i  
         .IRPC   3               Indefinite repeat character directivea           Format  $               .IRPC  symbol,<STRING>                    .                  .                  .               rangen                    .                  .                  .               .ENDR            Parameters                 symbolF               A formal argument that is successively replaced with theF               specified characters enclosed in angle brackets (<>). IfH               no formal argument is specified, the assembler displays an               error message.                 <STRING>E               A sequence of characters enclosed in angle brackets andmC               used in the expansion of the indefinite repeat range. D               Although the angle brackets are required only when theA               string contains separating characters, their use isi)               recommended for legibility.                  range C               The block of source text to be repeated once for each B               occurrence of a character in the list. The range canD               contain macro definitions and repeat ranges. .MEXIT is%               legal within the range.e          I                                        MACRO-64 Assembler Directives 5-83. F  E           Assembler Directives	     .IRPC            Description   D           .IRPC is similar to .IRP except that .IRPC permits single-C           character substitution rather than argument substitution. ?           On each iteration of the indefinite repeat range, theYD           formal argument is replaced with each successive characterD           in the specified string. The .ENDR directive specifies the           end of the range.A  E           .IRPC is similar to a macro definition with only one formal ?           argument. At each expansion of the repeat block, this E           formal argument is replaced with successive characters from E           the actual argument string. The directive and its range aresD           coded in line within the source program and do not require$           calling the macro by name.  A           .IRPC can appear either inside or outside another macro C           definition, indefinite repeat block, or repeat block (see "           description of .REPEAT).       ExampleF  -           The macro definition is as follows:d  #                  .macro X_COUNT ARG                       COUNT = 0#                      .irpc CH,<ARG>LC                          .iif identical,<CH>,<X>, COUNT = COUNT + 1                       .endr                  .endm X_COUNT  ;           The macro call and expansion of the macro defined #           previously is as follows:E                      &     5-84 MACRO-64 Assembler Directives           I                                                      Assembler DirectivesdI                                                                     .IRPCN    '                     X_COUNT XXFOOXBARXX !                         COUNT = 0v.                         .irpc CH,<XXFOOXBARXX>F                             .iif identical,<CH>,<X>, COUNT = COUNT + 1                         .endrlE                             .iif identical,<X>,<X>, COUNT = COUNT + 1 E                             .iif identical,<X>,<X>, COUNT = COUNT + 1 E                             .iif identical,<F>,<X>, COUNT = COUNT + 1 E                             .iif identical,<O>,<X>, COUNT = COUNT + 1 E                             .iif identical,<O>,<X>, COUNT = COUNT + 1eE                             .iif identical,<X>,<X>, COUNT = COUNT + 1 E                             .iif identical,<B>,<X>, COUNT = COUNT + 1eE                             .iif identical,<A>,<X>, COUNT = COUNT + 1 E                             .iif identical,<R>,<X>, COUNT = COUNT + 1 E                             .iif identical,<X>,<X>, COUNT = COUNT + 1mE                             .iif identical,<X>,<X>, COUNT = COUNT + 1   0                         .print "%integer(COUNT)"7                 %MACRO64-I-GENPRINT, Generated PRINT: 5D  G               This example uses the .IRPC directive to iterate over thedC               characters in the argument to the X_COUNT macro. EacheD               time an argument character is X, the variable COUNT isD               incremented. After the X_COUNT macro has expanded, theE               example uses the %INTEGER() lexical operator to display !               the value of COUNT.o                                      I                                        MACRO-64 Assembler Directives 5-85i l              Assembler Directives     .LIBRARY    E     _________________________________________________________________        .LIBRARY  !           Macro library directiveC  
     Format  5           .LIBRARY  quoted-literal1 [quoted-literal2]        Parameters             quoted-literal1 A           A string enclosed within double quotes that is the file.D           specification of a macro library. If a logical name existsC           and it is the same as the macro library name, specify the D           .MLB file extension to override the logical name. For more:           information on quoted literals, see Section 2.4.             quoted-literal2 ?           An optional string enclosed within double quotes that B           specifies a search list of file specifications where theD           assembler should look for the specified macro library. TheC           assembler successively processes the search list in left- C           to-right order and attempts to locate the specified macroaE           library in each location specified in the search list until A           the macro library is found. If the macro library is not5B           found, the assembler issues a diagnostic message. If youA           omit the second argument to the .LIBRARY directive, the,>           assembler uses the following search list by default:  -           o  The current device and directoryi  C           o  The device and directory specified by the logical namee)              MACRO64$LIBRARY (if defined)   C           o  The device and directory specified by the logical name '              ALPHA$LIBRARY (if defined)g  C           o  The device and directory specified by the logical namem              SYS$LIBRARY  ?           Logical names may be defined as OpenVMS search lists.e    &     5-86 MACRO-64 Assembler Directives f  .      I                                                      Assembler DirectiveslI                                                                  .LIBRARYa               Descriptiont  D               .LIBRARY adds a name to the macro library list that isB               searched whenever a .MCALL or an undefined opcode isD               encountered. The libraries are searched in the reverseB               order in which they were specified to the assembler.  E               If you omit any information from the macro-library-namesF               file description, default values are assumed. The deviceB               defaults to your current default disk; the directoryG               defaults to your current default directory; the file typeu               defaults to MLB.           Examplel  &                 .LIBRARY "MY_MACROS" 1                 .LIBRARY "PROJ_o3         MACROS" "PROJ:[MACRO],PROJ:[DEVELOPMENT]" 2   I               1  The first statement adds the macro library MY_MACROS.MLBAE                  to the macro library list. The assembler first looksCI                  for MY_MACROS.MLB in the current directory. If not found D                  there, the assembler next looks in the directory orE                  directories indicated by the MACRO64$LIBRARY logical_@                  name if it is defined. If not found there or ifC                  MACRO64$LIBRARY is not defined, the assembler nextoC                  looks in the directory or directories indicated by D                  the ALPHA$LIBRARY logical name if it is defined. IfH                  not found there or if ALPHA$LIBRARY is not defined, theE                  assembler next looks in the directory or directories H                  indicated by the SYS$LIBRARY logical name. If not foundB                  there, the assembler issues a diagnostic message.  <               2  The second statement adds the macro libraryI                  PROJ_MACROS.MLB to the macro library list. The assembleruD                  first looks for PROJ_MACROS.MLB in the PROJ:[MACRO]H                  directory. If not found there, the assembler next looksI                  in the PROJ:[DEVELOPMENT] directory. If not found there,a;                  the assembler issues a diagnostic message.           I                                        MACRO-64 Assembler Directives 5-87"                Assembler Directives     .LINKAGE_PAIR     E     _________________________________________________________________v       .LINKAGE_PAIR              Linkage directive_  
     Format             .LINKAGE_PAIR  name   
     Parameter              name@           The name of the procedure descriptor, possibly definedB           in a different module of the routine to which linkage is           required.        Description   A           .LINKAGE_PAIR causes a linkage pair to be stored at the B           current location counter. A linkage pair consists of twoB           quadwords. The first quadword is the code entry point ofA           the routine indicated by the specified identifier. (See ?           .CODE_ADDRESS.) The second quadword is the address of B           the procedure descriptor of the routine indicated by theB           specified identifier. The second quadword is also calledB           the procedure value. The specified name should referenceB           a procedure descriptor that is either defined within the?           assembly unit or that becomes defined at the time theh           program is linked.  	     Notes   A           o  You can only use this directive within data or mixedI=              psects (psects that have either the NOEXE or MIX @              attributes). For more information, see Section 5.1.  C           o  If automatic data alignment is enabled, this directivenE              aligns the current location counter to an octaword (128-y5              bit) boundary before allocating storage.i          &     5-88 MACRO-64 Assembler Directives b         I                                                      Assembler DirectivessI                                                             .LINKAGE_PAIR                Example                    .LINKAGE_ :         PAIR A     ; Code address A followed by address of<                                     ; procedure descriptor A                                                                              I                                        MACRO-64 Assembler Directives 5-89_ _  _           Assembler Directives	     .LIST     E     _________________________________________________________________y  	     .LISTt             Listing directive   
     Format              .LIST  [argument-list]  
     Parameter              argument-list E           One or more of the symbolic arguments defined in Table 5-7.l?           (See the .SHOW directive for this table.) You can usefB           either the long form or the short form of the arguments.A           If multiple arguments are specified, separate them withs"           commas, spaces, or tabs.       Description   D           .LIST is equivalent to .SHOW. See the description of .SHOW           for more information.e                                            &     5-90 MACRO-64 Assembler Directives t  e      I                                                      Assembler DirectivespI                                                       .LOCAL_CODE_ADDRESS     I         _________________________________________________________________n           .LOCAL_CODE_ADDRESSn  2               Local code address storage directive           Format  ,               .LOCAL_CODE_ADDRESS  name-list           Parametern                 name-listu@               A list of symbols separated by commas. Each symbolF               references a procedure descriptor defined in the current               module.            Descriptionr  B               .LOCAL_CODE_ADDRESS causes the code addresses of theE               specified identifiers to be placed at the current psecteI               and current location counter. The specified identifier musteI               reference a procedure descriptor defined within the module.nG               The .LOCAL_CODE_ADDRESS directive, rather than the .CODE_ G               ADDRESS directive, must be used with procedure descriptor I               names that are local (as opposed to global) to the assembly                unit.c  
         Notesn  E               o  You can only use this directive within data or mixeddA                  psects (psects that have either the NOEXE or MIXhD                  attributes). For more information, see Section 5.1.  G               o  If automatic data alignment is enabled, this directiveeB                  aligns the current location counter to a quadword=                  (64-bit) boundary before allocating storage.a           Example   +                 .PROCEDURE_DESCRIPTOR P1,C1i                 .BLKQ 1c;                 .LOCAL_CODE_ADDRESS P1       ; Code addressEG                                              ; of P1...address of C1...m>                                              ; is stored here.  I                                        MACRO-64 Assembler Directives 5-91                 Assembler Directives     .LOCAL_LINKAGE_PAIR     E     _________________________________________________________________        .LOCAL_LINKAGE_PAIRU  !           Local linkage directive   
     Format  #           .LOCAL_LINKAGE_PAIR  nameD  
     Parameter              nameD           The name of a procedure descriptor of the routine to whichA           linkage is required. The specified procedure descriptor 0           must be defined in the current module.       Descriptionk  C           .LOCAL_LINKAGE_PAIR causes a linkage pair to be stored at_D           the current location counter. A linkage pair consists of aC           code address and the address of the specified identifier. B           The specified name must reference a procedure descriptor3           that is defined within the assembly unit.   	     Notes   A           o  You can only use this directive within data or mixedn=              psects (psects that have either the NOEXE or MIX @              attributes). For more information, see Section 5.1.  C           o  If automatic data alignment is enabled, this directivetE              aligns the current location counter to an octaword (128-i5              bit) boundary before allocating storage.        Examplef  )              .PROCEDURE_DESCRIPTOR P1,CA1                .                .                .               .LOCAL_LINKAGE_1     PAIR P1        ; Code address CA1 followed bynM                                            ; procedure descriptor address P1.N  &     5-92 MACRO-64 Assembler Directives m  r      I                                                      Assembler Directives I                                               .LOCAL_PROCEDURE_DESCRIPTOR     I         _________________________________________________________________   #         .LOCAL_PROCEDURE_DESCRIPTORl  5               Procedure descriptor labeling directive            Format  ;               .LOCAL_PROCEDURE_DESCRIPTOR  pd-name, ca-namep           Parameters                 pd-name G               The name of the procedure descriptor. This name can be up D               to 31 characters long. It cannot be a temporary label.                 ca-nametB               The name of the code address that corresponds to theC               procedure descriptor. This name must be defined later F               in the program as a label in a psect that has either theF               EXE or MIX attribute, or both. This name can be up to 31>               characters long. It cannot be a temporary label.           Description   B               .LOCAL_PROCEDURE_DESCRIPTOR defines a bivalued localG               identifier that is used to represent a local routine. ThevF               first value is the procedure value, which is the addressG               of the procedure descriptor. This value is defined as the E               current location counter at the point where you use the H               .LOCAL_PROCEDURE_DESCRIPTOR directive. The second value isH               the code address, which is the code entry-point address ofI               the procedure. This value is defined by the second argumentaI               to the .LOCAL_PROCEDURE_DESCRIPTOR directive. No storage iss               allocated.  
         Notes   H               o  See the OpenVMS Calling Standard for a full description*                  of procedure descriptors.  H               o  You must specify .LOCAL_PROCEDURE_DESCRIPTOR before the2                  code of the routine it describes.    I                                        MACRO-64 Assembler Directives 5-93  g              Assembler Directives     .LOCAL_PROCEDURE_DESCRIPTORc    A           o  See Section 6.7 for a description of the $PROCEDURE_ A              DESCRIPTOR and $ROUTINE library macros. These macrossC              define the procedure identifier and define the storage *              for the procedure descriptor.  A           o  You can only use this directive within data or mixed =              psects (psects that have either the NOEXE or MIX =              attributes). For more information on psects, seet              Section 5.1.i  C           o  If automatic data alignment is enabled, this directive C              aligns the current location counter to a quadword (64- D              bit) boundary before defining the procedure identifier.       Examplef  /              .LOCAL_PROCEDURE_DESCRIPTOR LP1,C1r                                                        &     5-94 MACRO-64 Assembler Directives           I                                                      Assembler DirectiveshI                                                                     .LONG     I         _________________________________________________________________r  
         .LONG   (               Longword storage directive           Format  $               .LONG  expression-list           Parametero                 expression-listf:               One or more expressions separated by commas.           Description   G               .LONG generates successive longwords (4 bytes) of data in G               the object module. The assembler truncates on the left of<+               an integer or external value..  
         Notes   E               o  You can only use this directive within data or mixed A                  psects (psects that have either the NOEXE or MIX D                  attributes). For more information, see Section 5.3.  G               o  If automatic data alignment is enabled, this directive G                  aligns the current location counter to a longword (32- 9                  bit) boundary before allocating storage.O  F               o  You can define a 32-bit address item using macros and2                  the .LONG directive. For example:  '                  .macro address_32 item                   .long itemt!                  .endm address_32            Example   =                 .LONG 4     ; Places 4 in 4 bytes of storage.         I                                        MACRO-64 Assembler Directives 5-95  f  e           Assembler Directives
     .MACRO    E     _________________________________________________________________   
     .MACRO  $           Macro definition directive  
     Format  3           .MACRO  macro-name [formal-argument-list]N              .              .              .             range               .              .              .             .ENDM  [macro-name]        Parameters             macro-nameC           The name of the macro to be defined; this name can be anyt0           legal symbol up to 31 characters long.             formal-argument-listA           The symbols, separated by commas, to be replaced by the -           actual arguments in the macro call.o             range @           The source text to be included in the macro expansion.       Descriptioni  E           .MACRO begins the definition of a macro. It gives the macromC           name and a list of formal arguments. The .MACRO directivelD           is followed by the source text to be included in the macroA           expansion. The .ENDM directive specifies the end of the            range.  E           Macro names do not conflict with user-defined symbols. Both C           a macro and a user-defined symbol can have the same name._    &     5-96 MACRO-64 Assembler Directives           I                                                      Assembler DirectivesrI                                                                    .MACRO     B               When the assembler encounters a .MACRO directive, itD               adds the macro name to its macro name table and storesD               the source text of the macro (up to the matching .ENDMG               directive). No other processing occurs until the macro isn               expanded.a  D               The symbols in the formal argument list are associatedE               with the macro name and are limited to the scope of therD               definition of that macro. For this reason, the symbolsE               that appear in the formal argument list can also appeare'               elsewhere in the program.   4               For more information, see Section 4.1.  
         Notes   I               o  If a macro has the same name as an Alpha AXP opcode, thehG                  macro is used instead of the instruction. This featuret>                  allows you to temporarily redefine an opcode.  E               o  You can redefine a macro by using a .MACRO directive F                  with the same name as in a previous macro definition.G                  Therefore, the previous macro definition is implicitlyyD                  deleted and the new macro definition supersedes theI                  previous definition. See the .MDELETE directive for more /                  information on macro deletion.e  E               o  You can nest a macro definition within another macroBE                  definition. The inner macro is not defined until thee(                  outer macro is invoked.  F               o  You can nest a macro invocation so that one macro canD                  invoke another. The assembler supports nested macroC                  invocations to a depth of 1000. If a macro invokes H                  itself, either directly or indirectly, it is recursive.G                  Recursive macros must specify a basis-step in order toeG                  avoid infinite recursion. A basis-step is a macro exithH                  condition that will eventually cause the macro to exit,:                  which ends the recursion (see Example 3).            I                                        MACRO-64 Assembler Directives 5-97e d  u           Assembler Directives
     .MACRO           Examples                Example 1  E              This example shows how macro definitions and invocations A              may be nested. It also shows examples of the various A              forms of parameter passing. See Section 4.1 for moreT.              information on parameter passing.  !              .MACRO OP1 A,B=R4,?Cr#              C:      ADDL R2, B, R3o              .MACRO OP'B                      TRAPB              .ENDM OP'B #                      ADDL A, R2, R3e                      OP'Br"                      .MDELETE OP'B              .ENDM OP1  ?              When OP1 is invoked "OP1 R0", the text expands to:u  $              33000$: ADDL R2, R4, R3              .MACRO OPR4                      TRAPB              .ENDM$                      ADDL R0, R2, R3                      OPR4P"                      .MDELETE OPR4  C              Processing this text will cause OPR4 to be expanded toe+              TRAPB; the final text will be:o  #              33000$: ADDL R2, R4 R3 $                      ADDL R0, R2, R3                      TRAPB                  &     5-98 MACRO-64 Assembler Directives i  e      I                                                      Assembler Directives I                                                                    .MACRO                       Example 2  @                  The following example shows macro redefinition:  !                 .MACRO INITIALIZE ;                    .MACRO INITIALIZE   ;Redefine to nothingd#                    .ENDM INITIALIZEl                    X=0                    Y=1                    Z=-1                   .ENDM INITIALIZE  C                  Note that while the redefined version of the macro F                  immediately supersedes the previous definition in anyF                  subsequent invocation, the invocation of the original2                  definition expands to completion.                    Example 3  6                  This example shows a recursive macro:  "                 .MACRO FACTORIAL NA                    .IF EQUAL <N>,0      ;Basis step; stop at zero                        F=1a                    .ELSE%                       FACTORIAL <N-1>i!                       F = F * <N>                     .ENDC                 .ENDM FACTORIAL                                 I                                        MACRO-64 Assembler Directives 5-99. h  e           Assembler Directives
     .MCALL    E     _________________________________________________________________e  
     .MCALL             Macro call directive  
     Format  !           .MCALL  macro-name-list   
     Parameter              macro-name-listtD           A list of macros to be defined for this assembly. Separate&           the macro names with commas.       Descriptione  C           .MCALL specifies the names of the system and user-defined E           macros that are required to assemble the source program buto-           are not defined in the source file.r  @           If any named macro is not found upon completion of theD           search (that is, if the macro is not defined in any of theD           macro libraries), the assembler displays an error message.  	     Notese  D           o  Using the .MCALL directive is optional unless the macroB              name is the same as an opcode or assembler directive.E              The assembler automatically searches for a library macroEC              when it encounters an identifier that is not an opcode A              or directive in the opcode field. If your macro name D              is the same as an opcode or directive, you must use theD              .MCALL directive. You can also use the .MCALL directiveA              in your program to document which macros are used by               your program.       Example   A              .MCALL TRAPB       ; Substitute macro in library for_3                                 ; TRAPB instruction       '     5-100 MACRO-64 Assembler Directives     a      I                                                      Assembler DirectiveseI                                                                  .MDELETEl    I         _________________________________________________________________e           .MDELETE  &               Macro deletion directive           Format  '               .MDELETE  macro-name-listt           ParameterS                 macro-name-list G               A list of macros whose definitions are to be deleted. You <               can separate the macros with commas or spaces.           Description   C               .MDELETE deletes the definitions of specified macros.   D               .MDELETE completely deletes the macro. If you delete aE               macro that is currently expanding (such as a macro that_I               deletes itself), the macro name is immediately removed fromsH               the macro name table and the macro is marked for deletion.?               When the macro finishes expanding, it is deleted.            Example                    .MACRO FOO%                 .PRINT "In macro FOO"p                 .ENDM FOO                  FOO                  .MDELETE FOO                        I                                       MACRO-64 Assembler Directives 5-101c e  d           Assembler Directives
     .MEXIT    E     _________________________________________________________________e  
     .MEXIT             Macro exit directive  
     Format             .MEXIT       DescriptionL  ?           .MEXIT terminates a macro expansion before the end ofR=           the macro. Termination is the same as if .ENDM were C           encountered. You can also use the directive within repeat E           blocks. .MEXIT is useful in conditional expansion of macrossC           and repeat blocks because it bypasses the complexities oftE           nested conditional directives and alternate assembly paths.   	     Notesi  @           o  When .MEXIT occurs in a repeat block, the assembler?              terminates the current repetition of the range and >              suppresses further expansion of the repeat range.  E           o  When macros or repeat blocks are nested, .MEXIT exits toO0              the next higher level of expansion.  D           o  If .MEXIT occurs outside a macro definition or a repeat<              block, the assembler displays an error message.       Examples                Example 1  ;              The following macro definition uses the .MEXIT E              directive to exit the current macro when it has finishede6              processing a particular kind of argument:              '     5-102 MACRO-64 Assembler Directives     C      I                                                      Assembler Directives I                                                                    .MEXITh    2                         .macro STORE REG, LOCATION4                             .if identical,<REG>,<FP>1                                 STQ REG, LOCATIONr&                                 .mexit!                             .endcl4                             .if identical,<REG>,<SP>1                                 STQ REG, LOCATION &                                 .mexit!                             .endchC                             .if identical,<%extract(0,1,<REG>)>,<R>t1                                 STQ REG, LOCATION &                                 .mexit!                             .endc C                             .if identical,<%extract(0,1,<REG>)>,<F> 1                                 STT REG, LOCATION.&                                 .mexit!                             .endc H                             .error "Register argument is not a register"#                         .endm STOREa                      Example 2  H                  In this example, the STORE macro (as defined in ExampleH                  1) attempts to recognize its REG argument as either FP,H                  SP, an integer register (a register with R as its firstG                  letter), or a floating-point register (a register withtG                  F as its first letter). The following example show twoA/                  expansions of the STORE macro:   '                         STORE R1, 0(SP)O3                             .if identical,<R1>,<FP>_!                             .endc 3                             .if identical,<R1>,<SP>c!                             .endc C                             .if identical,<%extract(0,1,<R1>)>, <R>a1                             .if identical,<R>,<R> -                                 STQ R1, 0(SP)r&                                 .mexit            I                                       MACRO-64 Assembler Directives 5-103m                Assembler Directives
     .MEXIT    )                      STORE 24(SP), 16(SP)c4                          .if identical,<24(SP)>,<FP>                          .endc4                          .if identical,<24(SP)>,<SP>                          .endcC                          .if identical,<%extract(0,1,<24(SP)>)>,<R> .                          .if identical,<2>,<R>                          .endcC                          .if identical, <%extract(0,1<24(SP)>)>,<F>e.                          .if identical,<2>,<F>                          .endcE                          .error "Register argument is not a register"   B              The first call of the STORE macro stores R1 at 0(SP).A              The STORE macro determines to do an integer store bye@              recognizing the letter R as the first letter of theE              register name. After it has done so, it abandons furthera?              expansion of the macro using the .MEXIT directive.A>              The second invocation attempts to store 24(SP) atA              16(SP). Since the STORE macro cannot identify 24(SP)lA              as a legitimate register in any of the four forms it B              recognizes, the STORE macro does not attempt to storeB              the REG argument, and does not abandon expansion withC              the .MEXIT directive. Instead, the STORE macro expandsi-              and issues a diagnostic message.e                                        '     5-104 MACRO-64 Assembler Directivesd r  i      I                                                      Assembler DirectiveseI                                                                     .NARGg    I         _________________________________________________________________   
         .NARGt  +               Number of arguments directive            Format                 .NARG  symbola           Parameteri                 symbolF               A symbol that is assigned a value equal to the number of5               positional arguments in the macro call.            Descriptionr  E               .NARG determines the number of arguments in the currente               macro call.m  H               .NARG counts all the positional arguments specified in theI               macro call, including null arguments (specified by adjacentsF               commas). The value assigned to the specified symbol doesG               not include any keyword arguments or any formal arguments '               that have default values._  
         Notes_  I               o  If .NARG appears outside a macro, the assembler displayso"                  an error message.           Examples                 Example 1   1               The macro definition is as follows:f  I                 .MACRO  CNT_ARG A1,A2,A3,A4,A5,A6,A7,A8,A9=DEF9,A10=DEF10iG                 .NARG   COUNTER         ; COUNTER is set to no. of ARGS @                 .WORD   COUNTER         ; Store value of COUNTER                 .ENDM   CNT_ARGn      I                                       MACRO-64 Assembler Directives 5-105s h  d           Assembler Directives	     .NARG                Example 2h  @           The macro calls and expansions of the macro previously!           defined are as follows:   7              CNT_ARG TEST,FIND,ANS   ; COUNTER will = 3 D              .NARG   COUNTER         ; COUNTER is set to no. of ARGS=              .WORD   COUNTER         ; Store value of COUNTERg  7              CNT_ARG                 ; COUNTER will = 0eD              .NARG   COUNTER         ; COUNTER is set to no. of ARGS=              .WORD   COUNTER         ; Store value of COUNTER   A              CNT_ARG TEST,A2=SYMB2,A3=SY3      ; COUNTER will = 1lD              .NARG   COUNTER         ; COUNTER is set to no. of ARGS=              .WORD   COUNTER         ; Store value of COUNTEReH                                      ; Keyword arguments are not counted  7              CNT_ARG ,SYMBL,,        ; COUNTER will = 4_D              .NARG   COUNTER         ; COUNTER is set to no. of ARGS=              .WORD   COUNTER         ; Store value of COUNTERtA                                      ; Null arguments are countedg                                              '     5-106 MACRO-64 Assembler Directives     a      I                                                      Assembler DirectivesiI                                                                     .NCHR     I         _________________________________________________________________e  
         .NCHR   ,               Number of characters directive           Format  $               .NCHR  symbol,<string>           Parameters                 symbolF               A symbol that is assigned a value equal to the number of;               characters in the specified character string.i                 <string>G               A sequence of printable characters. Delimit the character.F               string with angle brackets (<>) (or a character precededB               by a circumflex (^)) only if the specified characterF               string contains a legal separator (comma, space, or tab)               or a               semicolon (;).           Description   F               .NCHR determines the number of characters in a specifiedE               character string. It can appear anywhere in an MACRO-64 F               program and is useful in calculating the length of macro               arguments.  
         Notesl  H               o  You can use the %LENGTH lexical operator instead of the!                  .NCHR directive.o           Examples                    Example 1  4                  The macro definition is as follows:        I                                       MACRO-64 Assembler Directives 5-107i    t           Assembler Directives	     .NCHRo    B              .MACRO   CHAR    MESS                  ; Define MACROA              .NCHR    CHRCNT,<MESS>      ; Assign value to CHRCNT A              .WORD    CHRCNT                        ; Store value F              .ASCII   "MESS"                        ; Store characters<              .ENDM    CHAR                          ; Finish                Example 2  C              The macro calls and expansions of the macro previouslyo$              defined are as follows:  F              CHAR     <HELLO>                        ; CHRCNT will = 5M              .NCHR    CHRCNT,<HELLO>                 ; Assign value to CHRCNToC              .WORD    CHRCNT                          ; Store valuenH              .ASCII   "HELLO"                         ; Store characters  L              CHAR     <14, 75.39  4>                 ; CHRCNT will = 12(dec)M              .NCHR    CHRCNT,<14, 75.39  4>          ; Assign value to CHRCNTBC              .WORD    CHRCNT                          ; Store valuehH              .ASCII   "14, 75.39  4"                  ; Store characters                                                  '     5-108 MACRO-64 Assembler Directivesr p  t      I                                                      Assembler DirectiveseI                                                                    .NLIST.    I         _________________________________________________________________            .NLIST  )               Listing exclusion directivee           Format  %               .NLIST  [argument-list]            Parameter                  argument-listeH               One or more of the symbolic arguments listed in Table 5-7.F               (See the .SHOW directive for this table.) Use either theB               long form or the short form of the arguments. If youD               specify multiple arguments, separate them with commas,               spaces, or tabs.           Description   E               .NLIST is equivalent to .NOSHOW. See the description ofr)               .SHOW for more information.e                                            I                                       MACRO-64 Assembler Directives 5-109                 Assembler Directives     .NOSHOW     E     _________________________________________________________________        .NOSHOWP  %           Listing exclusion directive   
     Format  "           .NOSHOW  [argument-list]  
     Parameter3             argument-list C           One or more of the symbolic arguments listed in Table 5-7 B           in the description of .SHOW. Use either the long form orB           the short form of the arguments. If you specify multiple@           arguments, separate them with commas, spaces, or tabs.       Description   <           .NOSHOW specifies listing control options. See the4           description of .SHOW for more information.                                              '     5-110 MACRO-64 Assembler Directives            I                                                      Assembler Directives I                                                                     .OCTA     I         _________________________________________________________________O  
         .OCTA   (               Octaword storage directive           Format  $               .OCTA  expression-list           Parameter                  expression-list G               A list of constant values separated by commas. Each valuetG               results in a 64-bit value being sign-extended to 128 bitss(               and stored in an octaword.           Descriptionu  A               .OCTA generates 128 bits (16 bytes) of binary data.n  
         Notesc  H               o  The low quadword contains the specified constant value.  E               o  The high quadword contains the sign extension of the E                  specified constant value. That is, the high quadword F                  contains 0 if the specified value is positive, and itE                  contains all bits set to 1 if the specified value is                   negative.  E               o  You can only use this directive within data or mixedMA                  psects (psects that have either the NOEXE or MIXeD                  attributes). For more information, see Section 5.1.  G               o  If automatic data alignment is enabled, this directive I                  aligns the current location counter to an octaword (128- 9                  bit) boundary before allocating storage.n              I                                       MACRO-64 Assembler Directives 5-111e                Assembler Directives	     .OCTAt           Example   6              .OCTA  0                         ; OCTA 0H              .OCTA  ^X01234ABCD5678F9         ; OCTA hex value specified  A              .OCTA  VINTERVAL                 ; VINTERVAL has 64-e     bit value,  ?                                               ;   sign-extended)                                                                      '     5-112 MACRO-64 Assembler Directives  e  t      I                                                      Assembler Directives I                                                                      .ODD     I         _________________________________________________________________i           .ODD  6               Odd location counter alignment directive           Format                 .ODD           DescriptionL  I               .ODD ensures that the current value of the location counterrE               is odd by adding 1 if the current value is even. If the ?               current value is already odd, no action is taken.o  
         Notes   E               o  You can only use this directive within data or mixedRA                  psects (psects that have either the NOEXE or MIX D                  attributes). For more information, see Section 5.3.                                                I                                       MACRO-64 Assembler Directives 5-113_ _  _           Assembler Directives     .PACKED     E     _________________________________________________________________l       .PACKED   1           Packed decimal string storage directive   
     Format  *           .PACKED  decimal-string[,symbol]       Description   C           .PACKED is supplied as a library macro with MACRO-64. For B           information about this directive, see the description of           .PACKED in Chapter 6.l                                                            '     5-114 MACRO-64 Assembler Directivesm o  a      I                                                      Assembler Directives I                                                                     .PAGE     I         _________________________________________________________________   
         .PAGE   %               Page ejection directivem           Format                 .PAGE            Description   C               .PAGE forces a new page in the listing. The directive F               itself is also printed in the listing and begins the new               page.   @               .PAGE in a macro definition is ignored. The pagingD               operation is performed only during macro expansion. IfE               the .PAGE directive occurs during macro expansion, texttG               beginning with the original macro invocation line appearsi'               at the top of a new page.            ExampleY  <                 .MACRO SKIP    ; macro definition with .PAGE                  .PAGE          ;                  .ENDM SKIP     ;                  .PSECT A,NOEXE ;                  .BLKW 10       ;A                 SKIP           ; In the listing file, a form feedo7                                ;  will be inserted here,                            I                                       MACRO-64 Assembler Directives 5-115e u  e           Assembler Directives
     .PRINT    E     _________________________________________________________________   
     .PRINT  $           Assembly message directive  
     Format              .PRINT  quoted-literal  
     Parameter              quoted-literalC           The string of characters enclosed in quotes are displayed C           when encountered during assembly. For more information on +           quoted literals, see Section 2.4.h       Description   A           .PRINT causes the assembler to display an informational-6           message. The message consists of the string.  	     Notes   B           o  .PRINT, .WARN, and .ERROR are directives that display?              messages. You can use these to display information A              indicating unexpected or important conditions within               the assembly.  B           o  This directive also accepts VAX MACRO syntax. See the?              VAX MACRO and Instruction Set Reference Manual forl              details.        Examplei  (              .PRINT "Questionable usage"              ^E              %MACRO64-I-GENPRINT, Generated PRINT: Questionable usage =              at line number 3 in file DISK$:[TEST]PRINT.M64;2(            '     5-116 MACRO-64 Assembler Directives  ,  C      I                                                      Assembler Directives I                                                     .PROCEDURE_DESCRIPTOR     I         _________________________________________________________________            .PROCEDURE_DESCRIPTOR   5               Procedure descriptor labeling directiveg           Format  5               .PROCEDURE_DESCRIPTOR  pd-name, ca-name            Parameters                 pd-nameeG               The name of the procedure descriptor. This name can be uppD               to 31 characters long. It cannot be a temporary label.                 ca-nameiB               The name of the code address that corresponds to theC               procedure descriptor. This name must be defined laterrF               in the program as a label in a psect that has either theF               EXE or MIX attribute, or both. This name can be up to 31>               characters long. It cannot be a temporary label.           Description   H               .PROCEDURE_DESCRIPTOR defines a bivalued global identifierC               that is used to represent a global routine. The firstaC               value is the procedure value, which is the address of D               the procedure descriptor. This value is defined as theE               current location counter at the point where you use theDF               .PROCEDURE_DESCRIPTOR directive. The second value is theH               code address, which is the code entry-point address of theE               procedure. This value is defined by the second argument C               to the .PROCEDURE_DESCRIPTOR directive. No storage isc               allocated.  
         Notese  H               o  See the OpenVMS Calling Standard for a full description*                  of procedure descriptors.  G               o  You must specify .PROCEDURE_DESCRIPTOR before the code -                  of the routine it describes.     I                                       MACRO-64 Assembler Directives 5-117t                Assembler Directives     .PROCEDURE_DESCRIPTOR     5           o  See Section 6.7 for a description of thet@              $PROCEDURE_DESCRIPTOR  and $ROUTINE library macros.D              These macros define the procedure identifier and define6              the storage for the procedure descriptor.  A           o  You can only use this directive within data or mixedt=              psects (psects that have either the NOEXE or MIXo?              attributes). For more information, see Section 5.1n  C           o  If automatic data alignment is enabled, this directiveeC              aligns the current location counter to a quadword (64-bD              bit) boundary before defining the procedure identifier.                                                                  '     5-118 MACRO-64 Assembler Directives     -      I                                                      Assembler Directives I                                                                    .PSECT     I         __________________________________________________________________           .PSECT  *               Program sectioning directive           Format  :               .PSECT  program-section-name[,argument-list]           Parameters  "               program-section-name?               The name of the program section (psect). For morem5               information on psects, see Section 5.1.                  argument-list F               A list containing the program section attributes and theG               program section alignment. Table 5-5 lists the attributesoI               and their functions. Table 5-6 lists the default attributesgD               and their opposites. Program sections are aligned whenC               you specify an integer in the range of 0 to 16 or onerD               of the five keywords listed in the following table. IfF               you specify an integer, the program section is linked toE               begin at the next virtual address that is a multiple of F               two raised to the power of the integer. If you specify aI               keyword, the program section is linked to begin at the next5E               virtual address that is a multiple of the corresponding 2               value listed in the following table:  I               ___________________________________________________________nI               Keyword_Size_(in_Bytes)____________________________________                  BYTE    20= 1b                 WORD    21= 2                  LONG    22= 4                  QUAD    23= 8s                 OCTA    24= 16I               ___________________________________________________________T  "               QUAD is the default.  I                                       MACRO-64 Assembler Directives 5-119     S           Assembler Directives
     .PSECT    E     Table_5-5_Program_Section_Attributes_____________________________   E     AttributFunction_________________________________________________S  D     ABS     Absolute-The program section has an absolute address. AnB             absolute program section contributes no binary code toC             the image, so its byte allocation request to the linkerv@             is 0. You cannot store initial values in an absoluteA             program section with directives such as .BYTE, .WORD,CB             .LONG, .QUAD. Usually the .BLKx directives are used inA             conjunction with label definitions within an absolutel?             program section to define symbolic offsets within ae@             structure. Compare this attribute with its opposite,             REL.  ?     CON     Concatenate-Program sections with the same name and =             attributes (including CON) from other modules are ?             concatenated into one program section at link time. A             Their contents are concatenated in the order in whicheC             the linker acquires them. The allocated virtual address E             space is the sum of the individual requested allocations.e:             Compare this attribute with its opposite, OVL.  A     EXE     Executable-The program section contains instructions. @             This attribute provides the capability of separating@             instructions from read-only and read/write data. TheD             linker uses this attribute in gathering program sections?             and in verifying that the transfer address is in anaA             executable program section. The assembler only allows,C             you to place instructions in a program section that has B             either or both the EXE or MIX attributes. Compare this/             attribute with its opposite, NOEXE.g  ?     GBL     Global-Program sections that have the same name and B             attributes will be combined at link time into a singleE             program section even when the individual program sectionslB             are in different clusters. This attribute is specifiedC             for Fortran COMMON block program sections. Compare thiscB             attribute with its opposite, LCL. For more informationB             about clusters, see the OpenVMS Linker Utility Manual.  C     LCL     Local-The program section is restricted to its cluster. :             Compare this attribute with its opposite, GBL.  E                                              (continued on next page)   '     5-120 MACRO-64 Assembler Directives  S         I                                                      Assembler Directives I                                                                    .PSECTe    I         Table_5-5_(Cont.)_Program_Section_Attributes_____________________a  I         AttributFunction_________________________________________________i  A         MIX     Mix-The program section can contain both data and H                 instructions. The MIX and NOMIX attributes are assembly-F                 time attributes that only affect assembler processing.H                 The MIX and NOMIX attributes do not appear in the objectB                 module and do not affect linker processing. To mixI                 instructions and data in the same psect, you must specify I                 the MIX attribute. The NOMIX attribute is the default. If G                 you choose to use instructions in a NOEXE psect, or use I                 data directives in an EXE psect, you must specify the MIX I                 attribute. The following limitations apply when using the                  MIX attribute:  E                 o  Optimizations and alignment of code labels are not_H                    performed. Optimizations and code-label alignment areG                    not performed on instructions placed in a MIX psect,-E                    regardless of whether the .ENABLE/.DISABLE options F                    have been set, or if the command-line /OPTIMIZATIONC                    and /ALIGNMENT=CODE options have been specified.   H                 o  Limited debugging information is provided. No PC-lineI                    (program counter) correlation information is generateds>                    for the instructions placed in a MIX psect.  @                 o  The listing file includes only binary encodedF                    instructions. All instructions that are placed in aF                    MIX psect appear in the machine-code portion of theI                    listing file, in their binary encoded instruction form_E                    as a data initializer to the .LONG data directive.   E                 There are no restrictions on data directives. Compare[A                 this attribute with its opposite, NOMIX. For more -                 information, see Section 5.1.d  I         NOEXE   Not Executable-The program section contains data only; itrH                 does not contain instructions. The assembler only allowsG                 you to place data allocations in a program section thateH                 has either or both the NOEXE and MIX attributes. Compare6                 this attribute with its opposite, EXE.  I                                                  (continued on next page)r  I                                       MACRO-64 Assembler Directives 5-121A m  r           Assembler Directives
     .PSECT    E     Table_5-5_(Cont.)_Program_Section_Attributes______________________  E     AttributFunction_________________________________________________   D     NOMIX   The default attribute when you use the .PSECT directive.:             Compare this attribute with its opposite, MIX.  C     NOPIC   Non-Position-Independent Content-The program section isyC             assigned to a fixed location in virtual memory (when itiE             is in a shareable image). Compare this attribute with its              opposite, PIC.  =     NORD    Nonreadable-Reserved for future use. Compare this ,             attribute with its opposite, RD.  D     NOSHR   No Share-The program section is reserved for private useE             at execution time by the initiating process. Compare thisd-             attribute with its opposite, SHR.   B     NOWRT   Nonwritable-The contents of the program section cannotE             be altered (written into) at execution time. Compare this -             attribute with its opposite, WRT.Y  ;     OVR     Overlay-Program sections with the same name and A             attributes (including OVR) from other modules receive E             the same relocatable base address in memory at link time. @             The allocated virtual address space is the requestedA             allocation of the largest overlaying program section.1:             Compare this attribute with its opposite, CON.  C     PIC     Position-Independent Content-The program section can bemE             relocated; that is, it can be assigned to any memory areaTE             (when it is in a shareable image). Compare this attribute @             with its opposite, NOPIC. For more information aboutD             shareable images, see the OpenVMS Linker Utility Manual.  D     RD      Readable-Reserved for future use. Compare this attribute$             with its opposite, NORD.  @     REL     Relocatable-The linker assigns the program section aA             relocatable base address. The contents of the program D             section can be code or data. Compare this attribute with             its opposite, ABS.  E                                              (continued on next page)_  '     5-122 MACRO-64 Assembler Directives     D      I                                                      Assembler Directives I                                                                    .PSECT     I         Table_5-5_(Cont.)_Program_Section_Attributes_____________________   I         AttributFunction_________________________________________________d  D         SHR     Share-The program section can be shared at executionF                 time by multiple processes. This attribute is assignedH                 to a program section that can be linked into a shareableG                 image. Compare this attribute with its opposite, NOSHR.   H         WRT     Write-The contents of the program section can be alteredH                 (written into) at execution time. Compare this attributeI         ________with_its_opposite,_NOWRT.________________________________C  I               Table_5-6_Default_Program_Section_Attributes_______________                  DefaultsI               Attribute_____Opposite_Attribute___________________________b                 CON           OVR   !               EXE           NOEXEe                 LCL           GBL                  NOMIX         MIX                  NOPIC         PIC                  NOSHR         SHRm                  RD            NORD                 REL           ABS   I               WRT___________NOWRT________________________________________            Description   E               .PSECT defines a program section and its attributes and_B               refers to a program section after it is defined. Use3               program sections to do the following:   *               o  Develop modular programs.  1               o  Separate instructions from data.   A               o  Allow different modules to access the same data.   C               o  Protect read-only data and instructions from being                   modified.  I               o  Identify sections of the object module to the linker and                   the debugger.  I                                       MACRO-64 Assembler Directives 5-123n p  r           Assembler Directives
     .PSECT    C           o  Control the order in which program sections are stored               in virtual memory.   ?           When the assembler encounters a .PSECT directive thatT@           specifies a new program section name, it creates a new>           program section and stores the name, attributes, andB           alignment of the program section. The assembler includesC           all data or instructions that follow the .PSECT directive D           in that program section until it encounters another .PSECTC           directive. The assembler starts all program sections at a )           relative location counter of 0.c  =           The assembler does not automatically define programaC           sections. Any code or data placed before the first .PSECTsB           directive in the source code produces an assembly error.  =           If the assembler encounters a .PSECT directive thatsE           specifies the name of a previously defined program section,e?           it stores the new data or instructions after the laste?           entry in the previously defined program section, evenAA           with program sections that have the OVR attribute. (OVRY@           program sections from separate modules are overlaid byD           the linker. The OVR attribute does not affect how multiple@           contributions to a psect are processed within a singleA           assembly unit.) You need not relist the attributes whenoC           continuing a program section, but any attributes that areeC           listed must be the same as those previously in effect foreB           the program section. A continuation of a program sectionE           cannot contain attributes conflicting with those specified,r9           or defaulted, in the original .PSECT directive.   D           The attributes listed in the .PSECT directive describe theA           contents of the program section. Except for the EXE and_B           NOEXE attributes, the assembler does not check to ensureB           that the contents of the program section actually adhereB           to the attributes listed. However, the assembler and theA           linker do check that all program sections with the samemB           name have exactly the same attributes. The assembler and@           linker display an error message if the program section(           attributes are not consistent.  @           Program section names are independent of local symbol,>           global symbol, and macro names. You can use the sameE           symbolic name for a program section and for a local symbol,tB           global symbol, or macro name. You may want to use unique0           names for clarity and maintainability.  '     5-124 MACRO-64 Assembler Directives            I                                                      Assembler Directives I                                                                    .PSECTu      
         Notesl  I               o  The .ALIGN directive cannot specify an alignment greaterlH                  than that of the current program section; consequently,F                  .PSECT should specify the largest alignment needed in%                  the program section.a  H               o  For efficiency of execution and ease of programming, anG                  alignment of quadword or larger is recommended for allR:                  program sections that have quadword data.           Example   2                 .PSECT A,QUAD,EXE     ; Code psect                                                            I                                       MACRO-64 Assembler Directives 5-125e e  e           Assembler Directives	     .QUADd    E     _________________________________________________________________r  	     .QUADt  $           Quadword storage directive  
     Format              .QUAD  expression-list  
     Parametera             expression-list 6           One or more expressions separated by commas.       Descriptione  ;           .QUAD generates 64 bits (8 bytes) of binary data.   	     Notesf  A           o  You can only use this directive within data or mixedr=              psects (psects that have either the NOEXE or MIXh@              attributes). For more information, see Section 5.1.  C           o  If automatic data alignment is enabled, this directivet>              aligns the current location counter to a quadword9              (64-bit) boundary before allocating storage.a       Examplei                A:: .QUAD 4                          '     5-126 MACRO-64 Assembler Directives     1      I                                                      Assembler Directives I                                                                   .REPEAT     I         __________________________________________________________________           .REPEAT_
         .REPT_  $               Repeat block directive           Format                  .REPEAT expression                  .                  .                  .                 range                   .                  .                  .                 .ENDRt           Parameters                 expressionD               An expression whose value controls the number of timesC               the range is to be assembled within the program. WhenrC               the expression is less than or equal to 0, the repeat E               block is not assembled. The expression must be absolute H               or relocatable and must not contain any undefined symbols.H               The assembler converts a relocatable value to the relative&               offset within the psect.                 range @               The source text to be repeated the number of timesH               specified by the value of the expression. The repeat blockC               can contain macro definitions or other repeat blocks. E               .MEXIT is legal within the range and causes the current ;               and all succeeding repetitions to be aborted.s              I                                       MACRO-64 Assembler Directives 5-127_ _  _           Assembler Directives     .REPEAT            Description(  ?           .REPEAT repeats a block of code a specified number ofEC           times in line with other source code. The .ENDR directive2)           specifies the end of the range.   	     NotesA  1           The alternate form of .REPEAT is .REPT._       Examples                Example 1  <              The following macro definition uses the .REPEATB              directive to store an ASCII string a specified number,              of times, followed by a 0 byte:  '              .MACRO  COPIES  STRING,NUM_              .REPEAT NUM              .ASCII  "STRING"_              .ENDR              .BYTE   0              .ENDM   COPIESh                Example 2  ?              The following macro call stores five copies of theoD              string ABCDEF. This example is divided into four parts:                Macro invocation:                COPIES  <ABCDEF>,5   3              Macro expansion of .REPEAT invocation:,                  .REPEAT 5                .ASCII  "ABCDEF"v                .ENDR                .REPEAT expansion:t                  .ASCII  "ABCDEF"                 .ASCII  "ABCDEF"l                .ASCII  "ABCDEF"                 .ASCII  "ABCDEF"                 .ASCII  "ABCDEF"E  '     5-128 MACRO-64 Assembler Directiveso w         I                                                      Assembler Directives I                                                                   .REPEAT     (                  End of macro expansion:                     .BYTE   0i                    Example 3  D                  The following macro call stores three copies of theI                  string How Many Times. This example is divided into four                   parts:t  "                  Macro invocation:                     VARB = 3/                   COPIES  <How Many Times>,VARB   7                  Macro expansion of .REPEAT invocation:T                     .REPEAT VARB*                   .ASCII  "How Many Times"                   .ENDRt  #                  .REPEAT expansion:   *                   .ASCII  "How Many Times"*                   .ASCII  "How Many Times"*                   .ASCII  "How Many Times"  (                  End of macro expansion:                     .BYTE   0                               I                                       MACRO-64 Assembler Directives 5-129n                Assembler Directives     .RESTORE_PSECT    E     _________________________________________________________________c       .RESTORE_PSECT     .RESTORE  <           Restore previous program section context directive  
     Format             .RESTORE_PSECT             .RESTORE       Descriptiont  C           .RESTORE_PSECT retrieves the program section from the topMD           of the program section context stack, an internal stack inB           the assembler. If the stack is empty when .RESTORE_PSECTB           is issued, the assembler displays an error message. WhenA           .RESTORE_PSECT retrieves a program section, it restores C           the current location counter to the value it had when theAC           program section was saved. The maximum stack level is 50. B           See the description of .SAVE_PSECT for more information.  	     Notest  >           o  The alternate form of .RESTORE_PSECT is .RESTORE.  @           o  You cannot use .RESTORE_PSECT to overwrite previousD              data-storage initializations. In the following example,=              MACRO-64 attempts to store 42 over 43 and fails,e'              resulting in a diagnostic:o                .PSECT A               .SAVE PSECT              .PSECT A               .QUAD 43               .RESTORE PSECTe              .QUAD 42             '     5-130 MACRO-64 Assembler Directives, u  s      I                                                      Assembler Directives.I                                                            .RESTORE_PSECTs               Examplea  '                     .PSECT A,QUAD,NOEXEf                 A1: .WORD 5t                 A2: .QUAD 6t>                     .SAVE_PSECT        ; Saves psect A context'                     .PSECT B,QUAD,NOEXEe                 B1: .WORD 6 B                     .RESTORE_PSECT     ; Return A location counter                 A3: .WORD 5r  '                     .PSECT B,QUAD,NOEXEt                 1$: .WORD 5l                      .SAVE LOCAL_4         BLOCK  ; Saves psect B context and temporary6                                        ; label context  "                     .PSECT C,NOEXE                 1$: .WORD 6mC                     .RESTORE_PSECT     ; Restores psect B and saves 6                                        ; label contextB                     .ADDRESS 1$        ; References the address ofC                                        ; psect B temporary label 1$                                           I                                       MACRO-64 Assembler Directives 5-131e d  o           Assembler Directives     .SAVE_PSECT     E     _________________________________________________________________l       .SAVE_PSECTa	     .SAVEe  8           Save current program section context directive  
     Format  $           .SAVE_PSECT  [LOCAL_BLOCK]             .SAVE  [LOCAL_BLOCK]       Descriptionm  C           .SAVE_PSECT stores the current program section context onsC           the top of the program section context stack, an internalr@           assembler stack. It leaves the current program sectionB           context in effect. The program section context stack canA           hold up to 50 entries. Each entry includes the value ofhE           the current location counter and the maximum value assigned D           to the location counter in the current program section. IfE           the stack is full when .SAVE_PSECT is encountered, an errors           occurs.   =           If the LOCAL_BLOCK option is specified, the current_A           temporary label block is saved with the current program_           section context.  A           .SAVE_PSECT and .RESTORE_PSECT are especially useful in.E           macros that define program sections. See the description ofI:           .RESTORE_PSECT for an example using .SAVE_PSECT.  	     Notes   8           o  The alternate form of .SAVE_PSECT is .SAVE.                  '     5-132 MACRO-64 Assembler Directivesw           I                                                      Assembler DirectivesCI                                                               .S_FLOATINGo    I         _________________________________________________________________n           .S_FLOATING   G               Single-precision IEEE floating-point arithmetic directive            Format  5               .S_FLOATING  floating-point-number-list            Parameter   (               floating-point-number-listF               A list of IEEE single-precision floating-point constantsI               separated by commas. For more information on floating-pointf)               numbers, see Section 2.3.2.            Descriptiond  @               .S_FLOATING evaluates the specified floating-pointD               constants and stores the results in the object module.G               .S_FLOATING generates 32-bit, single-precision, floating-pH               point data (1 bit of sign, 8 bits of exponent, and 23 bitsE               of fractional significance). See the description of .T_eB               FLOATING for information on storing double-precisionA               floating-point IEEE numbers and the descriptions ofrH               .D_FLOATING, .F_FLOATING, and .G_FLOATING for descriptions.               of other floating-point numbers.  
         Notes   E               o  You can only use this directive within data or mixedaA                  psects (psects that have either the NOEXE or MIXaD                  attributes). For more information, see Section 5.3.  G               o  If automatic data alignment is enabled, this directiveBG                  aligns the current location counter to a longword (32-e9                  bit) boundary before allocating storage.            Example   )                 .S_FLOATING 2.0,3.0,4.405D      I                                       MACRO-64 Assembler Directives 5-133S                Assembler Directives	     .SHOW_    E     __________________________________________________________________  	     .SHOW_     .NOSHOW_  4           Listing inclusion and exclusion directives  
     Format              .SHOW  [argument-list]  "           .NOSHOW  [argument-list]  
     Parameter              [argument-list]a>           Use one or more of the symbolic arguments defined inB           Table 5-7. You can use either the long form or the shortC           form of the arguments. If you specify multiple arguments,wB           you must separate them by commas. If any argument is not?           specifically included in a listing control statement, B           the assembler assumes its default value (show or noshow)(           throughout the source program.  E     Table_5-7_.SHOW_and_.NOSHOW_Symbolic_Arguments___________________                        Short E     Long_Form_______Form______Default___Function_____________________   D     BINARY          MEB       Noshow    Lists macro and repeat block@                                         expansions that generate@                                         binary code. BINARY is a=                                         subset of EXPANSIONS.   E     CONDITIONALS    CND       Noshow    Lists unsatisfied conditionala<                                         code associated with@                                         the conditional assembly3                                         directives..  D     EXPANSIONS      ME        Noshow    Lists macro and repeat range3                                         expansions.   E                                              (continued on next page)     '     5-134 MACRO-64 Assembler DirectivesI t         I                                                      Assembler Directives I                                                                     .SHOWn    I         Table_5-7_(Cont.)_.SHOW_and_.NOSHOW_Symbolic_Arguments___________t                           ShortsI         Long_Form_______Form______Default___Function_____________________l  >         LIBRARY         None      Noshow    Includes the macroD                                             definitions in a library;                                             in the listing.p  F         INCLUDE         None      Noshow    Lists include file text inI         ____________________________________the_listing_file.____________            DescriptionP  F               .SHOW and .NOSHOW specify listing control options in theE               source text of a program. You can use .SHOW and .NOSHOW /               with or without an argument list.   I               When you use them with an argument list, .SHOW includes andvF               .NOSHOW excludes the lines specified in Table 5-7. .SHOWF               and .NOSHOW control the listing of the source lines thatH               are in conditional assembly blocks (see the description ofH               .IF), macros, and repeat blocks. When you use them withoutH               arguments, these directives alter the listing level count.D               The listing level count is initialized to 0. Each timeD               .SHOW appears in a program, the listing level count isF               incremented; Each time .NOSHOW appears in a program, the1               listing level count is decremented.r  F               When the listing level count is negative, the listing isG               suppressed unless the line contains an error. Conversely,uC               when the listing level count is positive, the listingaC               is generated. When the count is 0, the line is eitherhI               listed or suppressed, depending on the value of the listinge)               control symbolic arguments.e  
         Notes   C               o  The listing level count allows macros to be listed D                  selectively; a macro definition can specify .NOSHOWH                  at the beginning to decrement the listing count and canI                  specify .SHOW at the end to restore the listing count to $                  its original value.  G               o  The alternate forms of .SHOW and .NOSHOW are .LIST ande                  .NLIST.  I                                       MACRO-64 Assembler Directives 5-135a n  c           Assembler Directives	     .SHOWe    D           o  The initial setting for each .LIST/.SHOW option (exceptD              BINARY) is obtained from the command-line setting usingB              the /SHOW qualifier. For more information on command-.              line qualifiers, see Section 1.2.  @           o  The /[NO]SHOW=BINARY option overrides the .[NO]SHOW              BINARY directive.       Example   E              .NOSHOW   ; Turn off listing file display.  Counter < 0.                  .                  .                  . D              .SHOW     ; Turn on listing file display.  Counter = 0.9                        ; Value of .SHOW options are used.n                 .c                 .                  .h>              .SHOW     ; Counter > 0.  Listing file display isB                        ; on for all options regardless of setting.                 .m                 .                  .                                           '     5-136 MACRO-64 Assembler Directivesh    d      I                                                      Assembler DirectiveseI                                                              .SIGNED_BYTE     I         _________________________________________________________________            .SIGNED_BYTE  +               Signed byte storage directive_           Format  +               .SIGNED_BYTE  expression-list            Parameters                 expression-listQG               An expression or list of expressions separated by commas. G               Each expression specifies a value to be stored. The value 8               must be in the range of -128 through +127.           Description   G               .SIGNED_BYTE generates successive bytes of binary data in I               the object module and performs signed range checking. Apart)G               from the range check, .SIGNED_BYTE is equivalent to .BYTEa%               for storage allocation.   
         Notesn  E               o  You can only use this directive within data or mixedaA                  psects (psects that have either the NOEXE or MIX.D                  attributes). For more information, see Section 5.1.           Example                    .PSECTA,NOEXE >                 .SIGNED_BYTE   LABEL1-LABEL2  ;  Data must fit=                 .SIGNED_BYTE   -126           ;     in a byte                     I                                       MACRO-64 Assembler Directives 5-137  R  _           Assembler Directives     .SIGNED_WORD    E     _________________________________________________________________        .SIGNED_WORD  '           Signed word storage directive   
     Format  '           .SIGNED_WORD  expression-list   
     Parameter              expression-list C           An expression or list of expressions separated by commas.eC           Each expression specifies a value to be stored. The valueh:           must be in the range of -32,768 through +32,767.       Descriptionr  C           .SIGNED_WORD generates successive words of binary data insE           the object module and performs signed range checking. Apart C           from the range check, .SIGNED_WORD is equivalent to .WORD )           in terms of storage allocation.h  	     Notes   A           o  You can only use this directive within data or mixedn=              psects (psects that have either the NOEXE or MIXr@              attributes). For more information, see Section 5.1.  C           o  If automatic data alignment is enabled, this directiverC              aligns the current location counter to a word (16-bit)t0              boundary before allocating storage.       Example                 .PSECT $DATA,NOEXEe!              .SIGNED_WORD -32766;e6              .SIGNED_WORD 32769 ;causes assembly error            '     5-138 MACRO-64 Assembler Directivesu r  E      I                                                      Assembler Directives I                                                                 .SUBTITLEo    I         _________________________________________________________________            .SUBTITLEo         .SBTTL  (               Listing subtitle directive           Format  '               .SUBTITLE  quoted-literalf  $               .SBTTL  quoted-literal           ParameterU                 quoted-literalH               An ASCII string enclosed in quotes from 1 to 31 charactersI               long; excess characters are truncated. For more informationf2               on quoted literals, see Section 2.4.           Description   F               .SUBTITLE causes the assembler to print the line of textI               as the subtitle on the second line of each assembly listingPD               page. This subtitle text is printed on each page untilI               altered by a subsequent .SUBTITLE directive in the program.   
         Notes"  ;               o  The alternate form of .SUBTITLE is .SBTTL.I  F               o  This directive also accepts VAX MACRO syntax. See theC                  VAX MACRO and Instruction Set Reference Manual for                   details.            Example   5                 .SUBTITLE "Terminal Display Routines"               I                                       MACRO-64 Assembler Directives 5-139                 Assembler Directives     .T_FLOATING3    E     _________________________________________________________________        .T_FLOATINGn  C           Double-precision IEEE floating-point arithmetic directivep  
     Format  1           .T_FLOATING  floating-point-number-listA  
     Parameter   $           floating-point-number-listB           A list of IEEE double-precision floating-point constantsE           separated by commas. For more information on floating-point %           numbers, see Section 2.3.2.        Descriptionn  <           .T_FLOATING evaluates the specified floating-point@           constants and stores the results in the object module.C           .T_FLOATING generates 64-bit, double-precision, floating- E           point data (1 bit of sign, 11 bits of exponent, and 52 bits A           of fractional significance). See the description of .S_s>           FLOATING for information on storing single-precisionA           floating-point IEEE numbers and the descriptions of .D_PD           FLOATING, .F_FLOATING, and .G_FLOATING for descriptions of'           other floating-point numbers.R  	     Notes   A           o  You can only use this directive within data or mixedr=              psects (psects that have either the NOEXE or MIXo@              attributes). For more information, see Section 5.1.  C           o  If automatic data alignment is enabled, this directive,>              aligns the current location counter to a quadword9              (64-bit) boundary before allocating storage.        Exampleo  %              .T_FLOATING 4.5036,6.034h      '     5-140 MACRO-64 Assembler Directivesx m  a      I                                                      Assembler DirectivesoI                                                                    .TITLEE    I         _________________________________________________________________            .TITLE  %               Listing title directivem           Format  3               .TITLE  module-name ["listing-title"]            Parameters                 module-name I               Either a quoted literal or an identifier that specifies the.F               module's title. For more information on quoted literals,               see Section 2.4.                 "listing-title" F               Optional quoted literal that specifies a title to appearI               within the first line of each listing output file. For more >               information on quoted literals, see Section 2.4.           DescriptionW  9               .TITLE assigns a name to the object module.V  
         NotesS  ?               o  The module name specified with .TITLE bears no E                  relationship to the file specification of the objectrG                  module, as specified in the MACRO-64 command line. The F                  object module name appears in the linker load map andH                  is also the module name that the debugger and librarian                  recognize.   I               o  If .TITLE is not specified, MACRO-64 assigns the default E                  name (.MAIN.) to the object module. If more than one I                  .TITLE directive is specified in the source program, the G                  last .TITLE directive encountered establishes the name .                  for the entire object module.  F               o  This directive also accepts VAX MACRO syntax. See theC                  VAX MACRO and Instruction Set Reference Manual fore                  details._  I                                       MACRO-64 Assembler Directives 5-141_ l              Assembler Directives
     .TITLE           Examples  -              .TITLE "MAIN" "Main Entry Point"                                                                                   '     5-142 MACRO-64 Assembler Directivese p  r      I                                                      Assembler DirectivesnI                                                             .UNDEFINE_REGn    I         _________________________________________________________________            .UNDEFINE_REGc  0               Undefine register symbol directive           Format  #               .UNDEFINE_REG  regsym            Parametero                 regsymD               A currently defined floating-point or integer register               symbol.            Description   I               The register symbol that you specify as the argument to the F               .UNDEFINED_REG directive is no longer a register symbol.H               Starting with the statement that follows the .UNDEFINE_REGI               directive, you can use the symbol as a MACRO-64 identifier.   
         NotesE  A               o  If you specify a MACRO-64 identifier that is noteG                  currently defined as a register symbol, the .UNDEFINE_R-                  REG directive has no effect.            Example                       .DEFINE_m6         IREG  X1    R5      ; X1 is integer register 5                    .UNDEFINE_T5         REG X1            ; X1 is an identifier again_                    .DEFINE_ ;         IREG  X1    7       ; X1 is integer register 7 - no N                                                 ;  redefinition and no warning  M                     $ROUTINE F0                 ; Error: F0 is a register andpG                                                 ;  cannot be used as anp=                                                 ;  identifiero                     .UNDEFINE_6         REG F0            ; F0 is no longer a register8                     $ROUTINE F0                 ; Ok now  I                                       MACRO-64 Assembler Directives 5-143t d  .           Assembler Directives	     .WARNt    E     _________________________________________________________________b  	     .WARNn             Warning directivef  
     Format             .WARN  quoted-literal   
     Parameter              quoted-literalC           The string of characters enclosed in quotes are displayed C           during assembly. For more information on quoted literals,            see Section 2.4.       Descriptiono  D           .WARN causes the assembler to display a warning message onC           the terminal or in the batch log file, and in the listinge!           file (if there is one).E  	     Notes   B           o  .PRINT, .WARN, and .ERROR are directives that display>              messages. You can use them to display information;              indicating an unexpected or important assemblyr              condition.   B           o  This directive also accepts VAX MACRO syntax. See the?              VAX MACRO and Instruction Set Reference Manual for               details.        ExampleA  7              .WARN "Illegal parameter value; 0 assumed"e              ^              %MACRO64-W-B     GENWARN, Generated WARNING: Illegal parameter value; 0 assumed<              at line number 3 in file DISK$:[TEST]WARN.M64;2        '     5-144 MACRO-64 Assembler Directivest s         I                                                      Assembler DirectivestI                                                                     .WEAK     I         _________________________________________________________________h  
         .WEAKo  -               Weak symbol attribute directivet           Format                  .WEAK  symbol-list           Parameterc                 symbol-lista8               A list of identifiers separated by commas.           Description   H               .WEAK specifies symbols that are either defined externallyB               in another module or defined globally in the currentD               module. .WEAK suppresses any object library search for               the symbol.   F               When .WEAK specifies a symbol that is not defined in theF               current module, the symbol is externally defined. If theE               linker finds the symbol's definition in another module,uE               it uses that definition. If the linker does not find annF               external definition, the symbol has a value of 0 and theI               linker does not report an error. The linker does not searchbI               a library for the symbol, but if a module brought in from a H               library for another reason contains the symbol definition,!               the linker uses it.   B               When .WEAK specifies a symbol that is defined in theE               current module, the symbol is considered to be globally G               defined. However, if this module is inserted in an object C               library, this symbol is not inserted in the library's G               symbol table. Consequently, searching the library at link_I               time to resolve this symbol does not cause the module to bea               included._            I                                       MACRO-64 Assembler Directives 5-145                 Assembler Directives	     .WEAKl           Example                     .WEAK A,B,CB              A:: .WORD 5     ; A and B are weak global definitions              B:: .QUAD 6=                  .ADDRESS C  ; C is a weak external reference_                                                                            '     5-146 MACRO-64 Assembler Directives     r      I                                                      Assembler DirectivesuI                                                                     .WORDs    I         _________________________________________________________________a  
         .WORD   $               Word storage directive           Format  $               .WORD  expression-list           Parameter(                 expression-list C               One or more expressions separated by commas. For more D               information on terms and expressions, see Section 2.8.           Description   G               .WORD generates successive words (2 bytes) of data in thea               object module.  
         Notes   D               o  The expression is first evaluated as a quadword andF                  then truncated to a word. The value of the expressionH                  should be in the range of -32,768 to +32,767 for signedE                  data or 0 to 65,535 for unsigned data. The assembleriC                  displays an error if the high-order 6 bytes of the D                  quadword expression have a value other than zero or                   ^XFFFFFFFFFFFF.  E               o  The assembler truncates on the left of an integer or                    external value.  6               o  Addresses are not allowed with .WORD.  E               o  You can only use this directive within data or mixedhA                  psects (psects that have either the NOEXE or MIX D                  attributes). For more information, see Section 5.1.  G               o  If automatic data alignment is enabled, this directive G                  aligns the current location counter to a word (16-bit) 4                  boundary before allocating storage.    I                                       MACRO-64 Assembler Directives 5-147i l  t           Assembler Directives	     .WORD            Examplei                .WORD 5,6,7                                                                                  '     5-148 MACRO-64 Assembler Directivese o  .                    I                                                                         6eI         _________________________________________________________________s  I                                                  MACRO-64 Supplied Macros     E               This chapter describes the library macros supplied with G               the MACRO-64 assembler. These macros make it easy for you H               to define and call routines. For a detailed description of*               each macro, see Section 6.7.  H               This chapter also describes the $OPDEF macro, which allows-               you to define your own opcodes.   %         6.1 MACRO-64 Supplied Library-  F               The MACRO-64 assembler provides a library of macros thatA               help you to program in conformance with the OpenVMS F               Calling Standard. This library also allows you to defineD               your own opcodes and packed decimal data. The library,F               called MACRO64.MLB, is installed on your system with the!               MACRO-64 assembler.G  G               The MACRO-64 assembler automatically adds the MACRO64.MLBnE               library to the library list before it begins processing G               your source program. Consequently, you do not need to addh7               it manually using the .LIBRARY directive.u  ?               The following macros are supplied by the MACRO-64r               Assembler:                     $BEGIN_EPILOGUE                  $CALL                  $CODE_SECTION                  $DATA_SECTION                  $END_EPILOGUE                  $END_PROLOGUE                  $END_ROUTINEe                  $LINKAGE_PAIR!                  $LINKAGE_SECTIONo                  $OPDEF                   .PACKED&                  $PROCEDURE_DESCRIPTOR  I                                              MACRO-64 Supplied Macros 6-1                                  $RESET_LP_LISTG              $RETURN              $ROUTINE   C           Appendix B explains how to program more effectively using D           the MACRO-64 assembly language within the framework of the#           OpenVMS Calling Standard.e  "     6.2 Routines and Lexical Scope  B           The calling-standard macros use the concept of a single,D           current, active routine. A routine is a programming entityA           that is associated with a procedure descriptor that mayeC           be called, or is a main routine specified as the transferf$           address of a linked image.  E           Only one routine can be active or current at any given time A           during assembly. If more than one routine is defined intC           a single assembler source file, all items associated withaC           the current routine, that is, within the lexical scope ofgB           the routine, must be completed before making a differentB           routine current. The lexical scope of one routine cannot7           overlap the lexical scope of another routine.a  C           A routine becomes current or comes into scope by invoking E           the $ROUTINE macro with the appropriate arguments. $ROUTINE D           marks the beginning of the lexical scope of a routine. TheA           complementary macro, $END_ROUTINE, marks the end of thet*           current routine's lexical scope.  '     6.2.1 Routines and Program SectionsS  C           Routines have three types of associated program sections:N  A           o  Code section-Contains the executable instructions ofAA              the routine. This section is typically read-only and               executable.  >           o  Data section-Contains data accessed by a routine.>              Typically, this is where variable data is stored.C              This section is typically nonexecutable, readable, and               writeable.   ;           o  Linkage section-Contains a routine's procedure A              descriptor and the necessary linkage information for C              calling other routines, and for linkage to data not innD              the linkage section, if any. Also, constant data may be        6-2 MACRO-64 Supplied Macros .  r              F                  placed here. Typically, this section is read-only and                   not executable.  I                  The linkage section is considered a type of data sectionl-                  with the following function:   F                  -  Provides linkage information for calls made from a@                     routine associated with the linkage section.  H                  -  Provides linkage information for data outside of the$                     linkage section.  I                  -  Defines the associated routine's procedure descriptord=                     so that calls can be made to the routine.s  4                  -  Defines constant or static data.  4         6.3 Using Macros to Control Program Sections  D               The following section explains how to use the MACRO-64G               supplied macros to define and control the various program_'               sections during assembly._  '         6.3.1 Defining Program Sectionse  G               Each of the three program section types can be referenced F               by a corresponding macro. The following three macros areG               used to refer to and define these three psects associated                within a routine:   F               o  $CODE_SECTION-makes the routine's code psect current.  F               o  $DATA_SECTION-makes the routine's data psect current.  C               o  $LINKAGE_SECTION-makes the routine's linkage psectt                  current.d  E               To switch to one of the current routine's sections, you I               invoke the corresponding macro. For example, after invoking H               $ROUTINE, to place instructions into the current routine'sH               code psect, you invoke the $CODE_SECTION macro. This makesD               the code psect associated with the current routine theG               current psect. Similarly, invoking $LINKAGE_SECTION makesgG               the linkage psect associated with the current routine thec               current psect.  I                                              MACRO-64 Supplied Macros 6-3t u  )              @           You can also control the psect name and attributes forC           each of the program sections by defining arguments to thea@           $ROUTINE macro. For more information, see Section 6.7.  %     6.3.2 Using Macro-Defined Symbols   >           When you use any of the supplied macros described inC           this chapter, with the exception of $OPDEF, the following /           register symbols are defined for you:   7              .DEFINE_IREG $IA0 R16 ; Integer argument 0I7              .DEFINE_IREG $IA1 R17 ; Integer argument 1_7              .DEFINE_IREG $IA2 R18 ; Integer argument 2 7              .DEFINE_IREG $IA3 R19 ; Integer argument 3 7              .DEFINE_IREG $IA4 R20 ; Integer argument 4a7              .DEFINE_IREG $IA5 R21 ; Integer argument 5h>              .DEFINE_FREG $FA0 F16 ; Floating-point argument 0>              .DEFINE_FREG $FA1 F17 ; Floating-point argument 1>              .DEFINE_FREG $FA2 F18 ; Floating-point argument 2>              .DEFINE_FREG $FA3 F19 ; Floating-point argument 3>              .DEFINE_FREG $FA4 F20 ; Floating-point argument 4>              .DEFINE_FREG $FA5 F21 ; Floating-point argument 5A              .DEFINE_IREG $AI R25 ; Argument-information registerT;              .DEFINE_IREG $RA R26 ; Return-address register <              .DEFINE_IREG $PV R27 ; Procedure-value register1              .DEFINE_IREG $FP R29 ; Frame pointerf1              .DEFINE_IREG $SP R30 ; Stack pointer   C              ________________________ Note ________________________o  C              SP and FP remain predefined by MACRO-64 whether or nottA              you use the OpenVMS Calling Standard macros. $SP andcC              $FP are defined by the OpenVMS Calling Standard macrosi@              for consistency with the other register definitionsA              that correspond to OpenVMS Calling Standard registeri              conventions.h  C              ______________________________________________________n  B           The following symbols are defined by the $ROUTINE macro.=           These symbols are useful while programming with the A           calling-standard macros to refer to particular data and             linkage section items.  <           o  $CS-The address of the beginning of the current$              routine's code section.        6-4 MACRO-64 Supplied Macros                   @               o  $LS-The address of the beginning of the current+                  routine's linkage section.   @               o  $DS-The address of the beginning of the current(                  routine's data section.  C               o  $DP-The linkage section address where the $ROUTINE F                  macro places the .ADDRESS $DS to enable access to theH                  data section from the linkage section (this variable is                  optional).r  G               o  $SIZE-The size of the fixed-stack area in bytes. $SIZE C                  is defined using the value specified with the SIZE                   argument.  F               o  $RSA_OFFSET-The offset within the fixed-stack area toI                  the register save area. $RSA_OFFSET is defined using theU>                  value specified with the RSA_OFFSET argument.  G               o  $RSA_END-The offset within the fixed-stack area to the E                  first byte beyond the end of the register save area.   H               For more information, see the description for the $ROUTINE$               macro in this chapter.  F               The $CALL macro also defines the $STACK_ARG_SIZE symbol.E               This symbol specifies the number of bytes used to store H               arguments on the stack. This value is useful after callingH               a routine that returns a value on the stack. In this case,F               $CALL cannot remove the arguments from the stack becauseH               you must first retrieve the returned value from the stack.G               Subsequently, you can remove the arguments from the stackoI               using the $STACK_ARG_SIZE symbol. For more information, see 7               the description of $CALL in this chapter.   %         6.3.3 Defining Procedure Type   @               The OpenVMS Calling Standard defines four types ofB               routines; stack, register, null, and bound. For moreG               information on types of routines, see Section B.5 and thet'               OpenVMS Calling Standard.   ?               You can define the routine type by using the KIND_E               keyword argument with $ROUTINE or $PROCEDURE_DESCRIPTOR C               macros. The validity and values of other $ROUTINE and C               $PROCEDURE_DESCRIPTOR macro parameters are determinedoC               by the type of routine being declared. For example, anC               null procedure type has no stack size; therefore, the   I                                              MACRO-64 Supplied Macros 6-5  h  e              ?           SIZE parameter is invalid and cannot be specified foriA           a null procedure type. When using the KIND keyword withe@           the $ROUTINE or $PROCEDURE_DESCRIPTOR macros, note the           following exceptions:   C           o  The $SIZE symbol defined by $ROUTINE is only valid fori)              stack and register routines.c  E           o  The $RSA_OFFSET symbol defined by $ROUTINE is only validt!              for a stack routine.   +     6.3.4 Using Macros in Prologue SectionsN  >           With stack and register routines, $ROUTINE generates5           a standard prologue sequence if you specify 6           the STANDARD_PROLOGUE=TRUE keyword argument.@           STANDARD_PROLOGUE=TRUE is the default for register and           stack routines.   @           Alternatively, you can code your own prologue sequence?           by specifying the STANDARD_PROLOGUE argument as FALSE >           and using the $END_PROLOGUE macro to mark the end of?           your prologue sequence. In this case, you may wish to ?           use the $SIZE and $RSA_OFFSET symbols to symbolically E           specify the fixed-stack size and register save area offset,l           respectively.i  :           For more information on the prologue sequence ofD           instructions that must occur at the beginning of all stackB           and register routines, see the OpenVMS Calling Standard.  +     6.3.5 Using Macros in Epilogue Sectionsa  C           With stack and register routines, you can use the $RETURN @           macro to generate an epilogue sequence. Alternatively,;           you can code your own epilogue sequence using thet>           $BEGIN_EPILOGUE and $END_EPILOGUE macros to mark the7           beginning and end of your epilogue sequences.   B           The OpenVMS Calling Standard also describes the epilogueE           sequence of instructions that must be executed every time ao:           stack or register routine returns to its caller.            6-6 MACRO-64 Supplied Macros                   6         6.4 Programming Examples Using Supplied Macros  G               Examples 6-1 and 6-2 show how to use the calling-standardsH               macros to define a routine, switch control between psects,A               generate an epilogue sequence, and end the routine.t  7               Example 6-1 Program Using Supplied Macros,  I                       $ROUTINE MAIN, KIND=STACK, - ; Stack routine kind 1oC                           SAVED_REGS=<FP>, - ; Saves FP           2oF                           SIZE=48               ; Stack size is 48   3  P                       $LINKAGE_SECTION          ; Switch to the linkage psect. 4  A               X:      .long 6                   ; X is a constant A               FP1_ADDR:                         ; FP1_ADDR -> FP1 "                       .address FP1  N                       $DATA_SECTION             ; Switch to the data section 5  A               A::     .blkw 5                   ; $DS points here                B::     .blkw   N                       $CODE_SECTION             ; Switch to the code section 6C                                                 ; ($CS points here)                               .                              .                              .O                       $RETURN                   ; Perform epilogue and return 7c  O                       $END_ROUTINE MAIN         ; Mark the end of the routine 8(  G               1  $ROUTINE defines the routine MAIN. The routine type iseH                  defined as a stack routine using the KIND=STACK keyword                  argument.  D               2  The keyword argument SAVED_REGS=<FP> adds the frameG                  pointer register to the list of registers saved on the F                  stack by the prologue code. The SAVED_REGS keyword isG                  valid only for stack procedures. If you do not specify I                  the FP register (R29) with this argument, it is assumed.   D               3  The keyword argument SIZE=48 defines the stack areaG                  in bytes. This argument is valid only for register and I                  stack routines. If you do not specify a stack size for a I                  stack or register routine, $ROUTINE computes the minimumo  I                                              MACRO-64 Supplied Macros 6-7s a  n              C              stack size required to accommodate the other argumentsa1              you specify or leave as the default.h  ?           4  The $LINKAGE_SECTION macro switches to the linkagee?              section. You can use the $LS symbol created by theaB              $ROUTINE macro to point to the address of the current<              routine's linkage section. $ROUTINE creates theA              procedure descriptor and leaves the current location ?              counter within the linkage section just beyond the "              procedure descriptor.  B           5  The $DATA_SECTION macro switches to the data section.E              You can use the $DS symbol created by the $ROUTINE macro B              to point to the address of the current routine's data              section.   B           6  The $CODE_SECTION macro switches to the code section.A              The $CS symbol created by the $ROUTINE macro is used B              to point to the address of the current routine's code              section.d  <           7  The $RETURN macro generates a standard epilogueC              instruction sequence. You can use this macro only witho@              stack or register routine defined with the $ROUTINE              macro.   A           8  The $END_ROUTINE macro marks the end of the routine.m       6.5 Using the $CALL Macro   C           $CALL calls local or external routines previously definedr?           by the $ROUTINE macro or defined in another language.m  A           To call a routine using standard linkage, use the $CALL E           macro. You invoke this macro from within the routine's codet8           section. $CALL performs the following actions:  D           o  Searches a list of linkage pairs referenced in previousE              invocations of the $CALL and $LINKAGE_PAIR macros within D              the calling routine. If a linkage pair is already found>              to exist on the list, $CALL uses the linkage pairB              stored from the previous invocation. Otherwise, $CALLA              stores the linkage pair of the called routine in the B              caller's linkage section and adds the linkage pair to              the caller's list.   ?           o  Allocates stack space for arguments, if necessary.O        6-8 MACRO-64 Supplied Macros I                 F               o  Loads arguments specified with the ARGS argument intoG                  argument registers and onto the stack, as appropriate.O  H               o  Sets the arguments information register, R25, according?                  to the arguments specified with ARGS argument.   H               o  Generates the following instruction sequence to performE                  the actual call based on the location of the linkagedI                  pair generated from above, and the value of Rls, linkage4G                  register, which is assumed to point to the base of the !                  linkage section:L  N                        LDQ R26, code_addr_offset(Rls)      ; load code addressK                        LDQ R27, proc_desc_addr_offset(Rls) ; load procedure O                                                            ; descriptor address,<                                                            ;P                        JSR R26, R26                        ; Jump to the routineO                                                            ;  saving the returniL                                                            ;  address in R26  F               o  Frees argument stack space, if any, and if the called>                  routine does not return a value on the stack.  G                  Like $ROUTINE, the $CALL macro invokes other macros tov,                  perform the previous tasks.  ?                  If you do not specify the Rls argument in yournF                  invocation of $CALL, $CALL assumes that you have usedH                  the .BASE directive to define a register that points toF                  the base address of your linkage section. That is, itF                  assumes that you have included a statement similar to                  the following:h                    .BASE R27, $LSa  F                  This source statement defines the base address of theI                  linkage section to be R27, and to be associated with the I                  macro symbol $LS. This source statement should be placedsA                  in your source code before the $CALL macro call.t            I                                              MACRO-64 Supplied Macros 6-9                    $     6.5.1 Using $CALL in Source Code  C           Example 6-2 uses the source code from Example 6-1, exceptkA           it uses the $CALL macro to show how to call a local andl           external routine.   )           Example 6-2 Program Using $CALLs                         .                        .                        . H                   $CODE_SECTION             ; Switch to the code section?                                             ; ($CS points here)n                       .d                       .                        .u%                   MOV     R27,R2    1s%                   .base   R2, $LS   2m                       .o                       .                        . K                   $CALL SUB1                ; Call external routine SUB1  3 K                   $CALL SUB2, LOCAL=TRUE    ; Call local routine SUB2     4i                       .d                       .t                       .tI                   $RETURN                   ; Perform epilogue and return I                   $END_ROUTINE MAIN         ; Mark the end of the routinew  ?           1  The $LS symbol is defined to be the address of thedB              procedure that is defined within the linkage section.D              The calling routine places the address of the procedure;              descriptor in R27 before making the call. ThiseC              guarantees that the address associated with the symbolh?              $LS is stored in R27 upon routine entry. Since thehA              information in R27 is erased during a standard call, 0              a copy is preserved in register R2.  B           2  Register R2 now contains the address of our procedureA              descriptor, which is the base address of our linkaget?              section. Since $LS is defined to point to the base C              address of the linkage section, the assembler computes C              the offsets within the linkage section using the .BASE               directive.e  !     6-10 MACRO-64 Supplied Macrose                   A               3  The $CALL macro calls the external routine SUB1.   H               4  The $CALL macro calls the local routine SUB2. This callF                  uses the LOCAL=TRUE keyword argument to indicate that;                  routine SUB2 is defined within the module.   &         6.6 Programming Considerations  H               This section discusses some programming considerations youI               need to be aware of when using the calling-standard macros.   9         6.6.1 Making Multiple Calls From the Same Routine   A               The $CALL macro generates the following instruction.               sequence:-  Q                LDQ R26, code_address_offset(Rls)              ; load code address Q                LDQ R27, procedure_descriptor_address_offset(Rls) ; load proceduretP                                                                  ;    descriptorM                                                                  ;    address B                JSR R26, R26                                      ;  C               The contents of R26 and R27 are erased as a result of0G               using the $CALL macro. This is important since Rls in themF               previous sequence is typically R27. Thus, if you requireE               subsequent access to your linkage section, such as when I               making subsequent calls, you need to make a working copy ofEI               R27 to use after the first call. Example 6-2 shows how thisF                technique is used.  H               Note that $CALL also overwrites the values in the argumentC               registers, and the scratch registers specified or theEE               default set by the SCRATCH_REGS argument, when you pass .               arguments to the called routine.  !         6.6.2 Nonstandard Linkagef  E               Under certain circumstances, there may be advantages in_H               using a nonstandard routine linkage. For more information,>               see Appendix B and the OpenVMS Calling Standard.          I                                             MACRO-64 Supplied Macros 6-11     n                   6.6.3 Routine Restrictions  A           Different routine types have different capabilities ando>           restrictions. For example, only a stack routine that@           specifies BASE_REG_IS_FP=TRUE can make standard calls.C           For more information, see the description for $ROUTINE ine           this chapter.   =           For a description of the different capabilities and =           restrictions associated with each routine type, see 7           Section B.5 and the OpenVMS Calling Standard.s  +     6.7 Macro Descriptions and Syntax Rulesr  =           This section provides a detailed description of the 6           MACRO-64 macros as well as the syntax rules.  ;           You can use either positional or keyword argumentc<           association or a combination of the two with theseA           macros. For positional association, the order of formal D           arguments is shown with the format of each macro. For moreA           information on argument association, see Chapter 4. The B           following syntax rules apply when invoking the assembler8           using the command-line qualifier /NAMES=AS_IS:  D           o  When specifying macro names, you must use all uppercaseB              or all lowercase characters. You cannot mix uppercase&              and lowercase characters.  E           o  When specifying keyword arguments, you must use the sameeE              alphabetic case as the macro name it is associated with.iE              If you use lowercase characters with the macro name, youtE              must use lowercase characters with the keyword argument.dE              If you use uppercase characters with the macro name, youiE              must use uppercase characters with the keyword argument.h                    !     6-12 MACRO-64 Supplied Macrose T  _      I                                                           MACRO-64 Macros I                                                           $BEGIN_EPILOGUEl    I         _________________________________________________________________            $BEGIN_EPILOGUEr  F               Marks the beginning of an epilogue instruction sequence.           Format                 $BEGIN_EPILOGUE            Description   @               $BEGIN_EPILOGUE marks the beginning of an epilogueB               instruction sequence that you code within a stack or?               register routine defined with the $ROUTINE macro.P  E               At each point where a stack or register routine returns C               to its caller, the routine must perform a sequence ofoF               operations to restore any saved registers and to performA               stack frame management. This sequence is called the H               epilogue and is described in detail in the OpenVMS Calling               Standard.   B               You can use the $RETURN macro to generate a standardI               epilogue instruction sequence for you, or you can code yoursG               own sequence. If you code your own epilogue sequence, yourF               must mark the beginning and end of the epilogue sequence@               with the $BEGIN_EPILOGUE and $END_EPILOGUE macros.  
         Notes   A               o  You must not use $BEGIN_EPILOGUE for an epilogueaC                  instruction sequence generated by $RETURN. $RETURNhI                  automatically invokes $BEGIN_EPILOGUE and $END_EPILOGUE.s                      I                                             MACRO-64 Supplied Macros 6-13  o              MACRO-64 Macrosa     $BEGIN_EPILOGUEn           Example   ?                      $ROUTINE MUMBLE, KIND=REGISTER, SAVE_FP=R1                           :                          :                          :$                      $BEGIN_EPILOGUEI                      MOV     R1,FP               ; Restore caller's frame C                      RET     (R26)               ; Return to callerN"                      $END_EPILOGUE                          :                          :                          :(                      $END_ROUTINE MUMBLE                                                            !     6-14 MACRO-64 Supplied Macros  m         I                                                           MACRO-64 Macros I                                                                     $CALLc    I         _________________________________________________________________y  
         $CALLo  /               Issues a call to another routine.            Format  0               $CALL  NAME=routine-being-called -5                      [Rls=linkage-section-register] -a3                      [LS=linkage-section-address] -a&                      [LOCAL=boolean] -+                      [ARGS=argument-list] -a3                      [SET_ARG_INFO=boolean-value] - 9                      [STACK_RETURN_VALUE=boolean-value] -t6                      [SCRATCH_REGS=scratch_reg-list] -*                      [TIE=boolean-value] -"                      [FUNC_RETURN=H                      {I64,D64,I32,U32,FF,FD,FG,FS,FT,FDC,FGC,FSC,FTC}] -7                      [USES_VAX_ARGLIST=boolean-value] - :                      [SIGNATURE_BLOCK=signature_address] -2                      [NONSTANDARD=boolean-value] -           Parameters                 NAMEI               The name of the routine to call. This argument is required.e                 Rls F               Linkage section register to use when generating the LDQ,G               LDQ, JSR instruction sequence. This argument is optional.   G               If Rls is omitted, $CALL assumes that you entered a .BASE H               directive before invoking $CALL that establishes the valueF               of a base register pointing into the linkage section. IfI               you omit the Rls argument and you do not enter such a .BASE G               directive before invoking $CALL, the assembler issues the G               following error message during the $CALL macro expansion:_  F                   "Argument 2 invalid"  The assembler failed to find aJ                    base register specified with a previous .BASE directiveH                    to form a register expression of the form offset(Rn)"      I                                             MACRO-64 Supplied Macros 6-15                 MACRO-64 Macrosc	     $CALL                LS>           LS is the address of the linkage section. If you use?           $CALL within a routine defined by the $ROUTINE macro, ?           the LS argument defaults to the $LS symbol defined byeA           $ROUTINE. If you use $CALL outside of a routine definedM@           by the $ROUTINE macro, there are two ways that you can@           indicate the location of the linkage section to $CALL.>           First, you can specify the LS argument to $CALL as a@           relocatable address expression that indicates the baseD           of the linkage section. In this case you must also specifyE           the Rls argument. Second, you can specify both the linkage-lB           section base register and the linkage-section address inD           a .BASE directive before invoking $CALL. In this case, you;           must omit both the Rls and LS arguments to $CALL.   C           Digital recommends that you omit this argument if you use ?           $CALL within a routine defined by the $ROUTINE macro.              LOCALrD           A Boolean value (TRUE or FALSE) that specifies whether theA           routine to be called is local to the module or globally C           visible. By default, $CALL generates a call to a globallyaB           visible routine. To generate a call to a routine that is<           not globally visible, you must specify LOCAL=TRUE.             ARGS=           An optional list of arguments to pass to the called B           routine. Enclose the argument list within angle brackets@           (<>)  and separate the arguments with commas (,).  YouA           can use the following qualifiers with each argument you C           specify with the ARGS argument. Table 6-1 describes these            qualifiers.i  C           Each argument is an address expression (which may include =           a register) followed by a qualifier. The table also.B           contains the argument type, the instruction used to loadE           the argument into a register, the instruction used to storeaB           the argument on the stack, and the encodings used in theC           Argument Information Register (R25) in the call signatureeB           block when you specify TIE=TRUE. See the OpenVMS CallingE           Standard for more information on these encodings. Note thatEB           arguments are only stored on the stack if there are more5           than six arguments provided to the routine.     !     6-16 MACRO-64 Supplied Macros     U      I                                                           MACRO-64 MacrosfI                                                                     $CALLo    I               Table_6-1_ARGS_Arguments___________________________________r  ;               Argument                                  RegsG                       Argument  LOAD    STORE   AI      Arg     Mem ArgcI               QualifieType______InstructInstructionodingSignaturSignatureo  C               /A      Address   LDA     STQ     I64     I32     I32e  A               /D      D-        LDG     STG     FD      FD      QP                       floating  C               /F      F-        LDF     STF     FF      FF      I32t                       floating  A               /G      G-        LDG     STG     FG      FG      Qt                       floating  C               /L      Longword  LDL     STQ     I64     I32     I32'  A               /Q      Quadword  LDQ     STQ     I64     Q       Qe  C               /S      S-        LDS     STS     FS      FS      I32s                       floating  A               /T      T-        LDT     STT     FT      FT      Qe                       floating  C               /UL[1]  Unsigned  LDL/    STQ     I64     U32     I32a#                       Longword  ZAPu%                                 #^xF0iI               [1]Unsigned_32-bit_integers_are_normally_passed_using______   D               the /L argument qualifier. Therefore, Digital does not@               recommend that you use the /UL argument qualifier.I               ___________________________________________________________g                 SET_ARG_INFOC               An optional argument to indicate whether $CALL shouldaC               set the Argument Information (AI) register (R25) with F               the appropriate argument information or not. By default,C               or if you specify SET_ARG_INFO=TRUE, $CALL stores the E               appropriate argument information in R25. If you specify <               SET_ARG_INFO=FALSE, $CALL does not affect R25.  E               If you want to conform to the OpenVMS Calling Standard, H               you must store the appropriate information in R25 yourselfE               before invoking $CALL. If you do not need to conform to E               the OpenVMS Calling Standard, and if the called routine H               does not need argument information in R25, you can specifyH               SET_ARG_INFO=FALSE and make no change in R25. By making noH               change in R25, you avoid the overhead involved when either  I                                             MACRO-64 Supplied Macros 6-17e h  y           MACRO-64 Macros 	     $CALLE    @           you or $CALL load argument information into R25 at the2           expense of calling standard conformance.             STACK_RETURN_VALUEB           An optional argument to indicate that the called routineA           returns a value on the stack. By default, $CALL assumesr@           that the called routine does not return a value on theD           stack. In this case, $CALL removes any arguments passed toC           the called routine from the stack when the called routine            returns.  A           If the called routine returns a value on the stack, the >           returned value is placed at a lower address than the@           arguments on the stack. In this case, you must specifyD           STACK_RETURN_VALUE=TRUE to prevent $CALL from removing theD           arguments to the called routine from the stack and erasingE           the value returned by the called routine. You must retrieve A           the return value and remove it from the stack. Then you B           can remove the arguments to the called routine using the2           $STACK_ARG_SIZE symbol defined by $CALL.             SCRATCH_REGSE           An optional list of scratch registers for $CALL to use when D           processing arguments passed to the called routine with theC           ARGS argument. If you pass more than six arguments to the D           called routine, $CALL may need to use scratch registers to           process the call.   <           By default, $CALL uses R0, R1, F0, and F1. You canA           cause $CALL to use different scratch registers with the             SCRATCH_REGS argument.  B           If you are passing integer arguments, you should specifyE           at least one integer register. If you are passing floating- D           point arguments, you should specify at least one floating-           point register.s  @           $CALL can process arguments to the called routine moreB           efficiently if you specify two or more scratch registersC           of the type or types appropriate to the arguments you ared           passsing.t  
           TIE @           A Boolean value (TRUE or FALSE) that specifies whetherB           $CALL should generate a call sequence that is compatible<           with both native routines and the Translated Image  !     6-18 MACRO-64 Supplied Macroso p  e      I                                                           MACRO-64 Macros I                                                                     $CALLe    E               Environment (TIE). By default, $CALL generates a fastersI               call sequence that is only compatible with native routines. F               If you specify TIE=TRUE, $CALL generates a call sequenceA               that works with both native routines and translated G               routines. If you are calling a VAX routine in a shareable F               image that has been translated with the DECmigrate imageG               translator, specify TIE=TRUE. If you are calling a native F               routine, Digital recommends you default the TIE argumentI               or specify TIE=FALSE. While $CALL generates a call sequencegF               that is compatible with native routines when you specifyB               TIE=TRUE, that call sequence is slower than when you+               specify or default TIE=FALSE.                  FUNC_RETURNsH               An optional argument used to indicate the type of functionE               return when you also specify TIE=TRUE. This argument is C               ignored unless you also specify TIE=TRUE. Specify one B               of I64, D64, I32, U32, FF, FD, FG, FS, FT, FFC, FDC,F               FGC, FSC, or FTC. These values correspond to the RASE$K_D               FR_* signature encodings described in Table 3-7 in theF               OpenVMS Calling Standard. If you specify TIE=TRUE and doF               not specify a function return type with FUNC_RETURN, the2               default function return type is I64.                                            I                                             MACRO-64 Supplied Macros 6-19     u           MACRO-64 Macrosa	     $CALLo    C              ________________________ Note ________________________   ?              Specification of the FUNC_RETURN argument does noti=              in itself cause $ROUTINE to generate a procedure ?              signature block. However, if you specify either or @              both the ARGLIST or USES_VAX_ARGLIST arguments, any?              value you specify with the FUNC_RETURN argument ism>              recorded in both the procedure descriptor and the'              procedure signature block.   C              ______________________________________________________              USES_VAX_ARGLISTE           An optional argument to indicate whether the called routineoC           uses a VAX argument list. This argument is ignored unlesstB           you also specify TIE=TRUE. By default, $CALL assumes theB           called routine does not use a VAX argument list. SpecifyC           USES_VAX_ARGLIST=TRUE to indicate that the called routine #           uses a VAX argument list.              SIGNATURE_BLOCKoE           An optional argument that you can use to supply the address ?           of the call signature block. This argument is ignoredM@           unless you also specify TIE=TRUE. Note that you cannot@           specify a SIGNATURE_BLOCK argument in combination withB           either of the FUNC_RETURN or USES_VAX_ARGLIST arguments.@           By default, $CALL generates a call signature block forD           you when you specify TIE=TRUE, and you can in part controlC           the contents of that signature block with the FUNC_RETURN D           and USES_VAX_ARGLIST arguments. If you wish to define your@           own call signature block, do not specify either of theB           FUNC_RETURN or USES_VAX_ARGLIST arguments and supply theB           address of your call signature block with the SIGNATURE_           BLOCK argument.e             NONSTANDARD @           A Boolean value (TRUE or FALSE) that specifies whetherB           $CALL should suppress warning and informational messages@           concerning nonstandard usage. By default, $CALL issues@           warning and informational messages to indicate you are@           using $CALL in a way that violates the OpenVMS Calling@           Standard or in a way that requires special programmingA           considerations. Specify NONSTANDARD=TRUE if you wish to "           suppress these messages.  !     6-20 MACRO-64 Supplied Macros            I                                                           MACRO-64 Macros I                                                                     $CALL                Description   E               $CALL issues a call to another routine and performs the_                following actions:  H               1. Searches a list of linkage pairs referenced in previousF                  invocations of the $CALL and $LINKAGE_PAIR macros. IfF                  a linkage pair is already in the list, $CALL uses theF                  linkage pair from the previous invocation. Otherwise,G                  $CALL stores the linkage pair of the called routine incG                  the caller's linkage section and adds the linkage pairuH                  to the caller's list. If you use $CALL within a routineI                  defined with the $ROUTINE macro, $CALL and $LINKAGE_PAIR B                  reset the list of linkage pairs for each routine.  B               2. Allocates stack space for arguments if necessary.  D               3. Generates instructions to load the arguments to the                   called routine.  E               4. Sets the value in the argument information register,                   R25.f  H               5. Generates the following instruction sequence to performE                  the actual call based on the location of the linkagePH                  pair generated from step 1 and the address specified orG                  defaulted with the LS argument. The register specifiediI                  with the Rls argument is assumed to point to the base ofiG                  the linkage section as shown in the following example:   N                  LDQ R26, code_address_offset(Rls)         ; load code addressI                  LDQ R27, procedure_descriptor_address_offset(Rls) ; load O                                                                    ;  procedure:P                                                                    ;  descriptorM                                                                    ;  address'!                      JSR R26, R26   F               6. Frees argument stack space, if any, and if the called>                  routine does not return a value on the stack.          I                                             MACRO-64 Supplied Macros 6-21                 MACRO-64 Macros 	     $CALL-           Examples                Example 1  ;                  $CALL SUB1, Rls=R13, LS=MY_LINKAGE_SECTION4.                  .BASE R13, MY_LINKAGE_SECTION                  $CALL SUB2   >                  $ROUTINE SUB3, KIND=STACK, SAVED_REGS=<R2,FP>!                  $LINKAGE_SECTIONL                  .QUAD 1              XX:                  $CODE_SECTION                  MOV R27, R2                  $CALL SUB4, R2                   .BASE R2, $LS                  $CALL SUB5                   $CALL SUB6, -(                     ARGS=<XX/A, R0/Q>, -*                     SCRATCH_REGS=<R22,R23>                  $CALL SUB7, -&                     ARGS=<1/A,2/A,3/A>                  $RETURN"                  $END_ROUTINE SUB3                Example 2  =              $CALL FOO, ARGS=<A,B,C,D,E,F,G,H>, STACK_RETURN_      VALUE=TRUEM                                      ; Fetch octaword return value from stack]3              LDQ R4, 0(SP)           ; low quadwordl4              LDQ R5, 8(SP)           ; high quadword:              LDA SP, $STACK_ARG_SIZE+16(SP)  ; RESET STACK                      !     6-22 MACRO-64 Supplied Macros     h      I                                                           MACRO-64 Macros H                                                            $CODE_SECTION    I         _________________________________________________________________            $CODE_SECTION,  D               Switches control to the current routine's code section               psect.           Format                 $CODE_SECTIONi           Descriptionl  E               $CODE_SECTION switches control to the current routine'st!               code section psect.            Examplev                     $CODE_SECTIONh                                                    I                                             MACRO-64 Supplied Macros 6-23e e  a           MACRO-64 Macros      $DATA_SECTIONr    E     _________________________________________________________________g       $DATA_SECTIONh  @           Switches control to the current routine's data section           psect.  
     Format             $DATA_SECTION4       Description   A           $DATA_SECTION switches control to the current routine'sn           data section psect.i       Exampled                $DATA_SECTION                                                    !     6-24 MACRO-64 Supplied Macros  y  u      I                                                           MACRO-64 MacroseI                                                             $END_EPILOGUEi    I         _________________________________________________________________            $END_EPILOGUEs  @               Marks the end of an epilogue instruction sequence.           Format                 $END_EPILOGUE            Descriptiond  D               You can use the $END_EPILOGUE macro to mark the end ofE               an epilogue instruction sequence that you code yourselfvA               within a stack or register routine defined with thedE               $ROUTINE macro. At each point where a STACK or REGISTERtG               routine returns to its caller, the routine must perform a G               sequence of operations to restore any saved registers andFH               to perform stack-frame management. This sequence is calledD               the epilogue and is described in detail in the OpenVMS               Calling Standard.   B               You can use the $RETURN macro to generate a standardC               epilogue instruction sequence for you. Alternatively,SB               you can code your own sequence. If you code your ownD               epilogue sequence, you must mark the beginning and endC               of the epilogue sequence with the $BEGIN_EPILOGUE and 1               $END_EPILOGUE macros, respectively.n  F               Note that you must not use $END_EPILOGUE for an epilogueH               instruction sequence generated by $RETURN. $RETURN invokes8               $BEGIN_EPILOGUE and $END_EPILOGUE for you.  B               You may omit the invocation of $END_EPILOGUE if yourA               epilogue sequence occurs at the end of the routine.rE               The $END_ROUTINE macro invokes $END_EPILOGUE for you ifaE               you invoke the $BEGIN_EPILOGUE macro without a matchingRD               invocation of the $END_EPILOGUE macro. You must invokeE               $END_EPILOGUE with epilogue sequences that occur in thee%               middle of your routine.u          I                                             MACRO-64 Supplied Macros 6-25o e  o           MACRO-64 Macros6     $END_EPILOGUEM           Example   ?                      $ROUTINE MUMBLE, KIND=REGISTER, SAVE_FP=R14                          :                          :                          :$                      $BEGIN_EPILOGUEI                      MOV     R1,FP               ; Restore caller's frame C                      RET     (R26)               ; Return to caller "                      $END_EPILOGUE                          :                          :                          :(                      $END_ROUTINE MUMBLE                                                            !     6-26 MACRO-64 Supplied Macros            I                                                           MACRO-64 Macros I                                                             $END_PROLOGUE     I         _________________________________________________________________            $END_PROLOGUE   ?               Marks the end of a prologue instruction sequence.            Format                 $END_PROLOGUE            Description   ?               $END_PROLOGUE marks the end of a routine prologue G               instruction sequence that you code yourself. The prologue G               instruction sequence begins with the first instruction of E               the routine. There can only be one prologue instruction H               sequence in a routine. The prologue is described in detail.               in the OpenVMS Calling Standard.  D               You invoke $END_PROLOGUE after the last instruction inD               the routine prologue code. The last instruction in theI               routine prologue is the one that updates FP (R29, the frame_G               pointer) and makes the frame become current. You must useoG               this macro when the routine type is stack or register and H               you specify STANDARD_PROLOGUE=FALSE to the $ROUTINE macro.  
         Notesi  H               o  Do not use this macro when the $ROUTINE macro generatesH                  a standard prologue or when the routine type is null orI                  bound. For example, a standard prologue is generated fortH                  you when you specify or leave the default of $ROUTINE's4                  STANDARD_PROLOGUE argument to TRUE.           Example   &                         MOV     SP, FP%                         $END_PROLOGUEf              I                                             MACRO-64 Supplied Macros 6-27e y              MACRO-64 MacrosL     $END_ROUTINE    E     _________________________________________________________________a       $END_ROUTINE  %           Marks the end of a routine.   
     Format  +           $END_ROUTINE  [name=routine-name]R  
     Parameter              nameA           The name of the routine that is ended. This argument is E           optional. If you specify a name, $END_ROUTINE verifies thatLD           the name matches that which was specified with $ROUTINE toE           begin the routine. If the name does not match, $END_ROUTINE B           issues a diagnostic message. There is no default. If you@           omit the name, $END_ROUTINE does not verify a matching           name.l       Description   A           You must use this macro at the end of a routine that ise@           defined with the $ROUTINE macro to delimit the end theB           current routine and to perform final macro processing of           the routine.       Examples  )                  $END_ROUTINE NAME=FOOZLEp                            !     6-28 MACRO-64 Supplied Macrose o  n      I                                                           MACRO-64 Macros I                                                             $LINKAGE_PAIR.    I         _________________________________________________________________            $LINKAGE_PAIR   E               Locates or defines a linkage pair in the linkage psect.            Format  =               $LINKAGE_PAIR  name=routine-name, local=booleans           Parameters                 nameB               Name of the linkage pair to define. This argument is               required.                  local H               A Boolean value (TRUE or FALSE) that specifies whether theG               routine is defined within the module for not. The defaultsG               is to store a linkage pair for a global routine. You must F               specify LOCAL=TRUE to store a linkage pair for a routine+               that is not globally visible.            Descriptiono  E               You can invoke this macro to locate or define a linkage B               pair in the linkage psect. The linkage pair is addedD               to a list for later use and retrieval by the $CALL andF               $LINKAGE_PAIR macros. Thus, only the first invocation ofG               $LINKAGE_PAIR (or $CALL) for a given routine to be called G               results in a linkage pair being stored. $LINKAGE_PAIR and E               $CALL use the same list of linkage pairs. $LINKAGE_PAIRn9               restores the current psect when it is done.o  H               $LINKAGE_PAIR defines the symbol $LP. This symbol value isH               the address within the linkage section of the linkage pair0               for the specified routine to call.                I                                             MACRO-64 Supplied Macros 6-29i    h           MACRO-64 Macros      $LINKAGE_PAIRy      	     Notesg  D           o  Because the $CALL macro invokes the $LINKAGE_PAIR macroC              for you, you do not need to use $LINKAGE_PAIR when youX?              are using $CALL. You may wish to use $LINKAGE_PAIRl?              when you are not using $CALL or when you require a C              specific ordering or placement of linkage pairs withinl!              the linkage section.u       Example                     $LINKAGE_?     PAIR SUB1          ; define linkage pair in linkage sectionb                  LDQ R26, $LPu                  LDQ R27, $LP+8                   JSR R26, R26a                                                        !     6-30 MACRO-64 Supplied Macros            I                                                           MACRO-64 MacrosnI                                                          $LINKAGE_SECTIONn    I         _________________________________________________________________3           $LINKAGE_SECTION  H               $LINKAGE_SECTION switches control to the current routine's$               linkage section psect.           Format                 $LINKAGE_SECTION           Descriptionf  H               $LINKAGE_SECTION switches control to the current routine's$               linkage section psect.           Exampler                    $LINKAGE_SECTION                                                    I                                             MACRO-64 Supplied Macros 6-31- M  o           MACRO-64 Macros 
     $OPDEF    E     _________________________________________________________________i  
     $OPDEF  !           Used to define opcodes.   
     Format  8           $OPDEF  MNEMONIC, FORMAT, ENCODING [,DEFAULTS]       Parameters             MNEMONIC@           MNEMONIC is the mnemonic name by which the instruction@           is called. You may optionally specify a qualifier listC           separated from the name by a slash (/).  A qualifier list @           is a sequence of one or more letters or digits with no+           intervening spaces or separators.              FORMAT3           FORMAT is one of the following arguments:e  E     _________________________________________________________________gE     Format__________________________Description______________________l  :     MEMORY                          Standard memory format1                                     instructions.I  E     MEMORY_FUNCTION                 Memory format instructions with an2                                     function code.  >     JUMP                            Memory format instructionsE                                     formatted like jump instructions.n  :     BRANCH                          Standard branch format1                                     instructions.   B     OPERATE                         Standard operate instructions.  C     FLOATING_OPERATE                Standard floating-point operate 1                                     instructions.i  B     PAL                             Standard PALcode instructions.  E     <CUSTOM=operand_type_list>______Custom_format.___________________d  C           With the CUSTOM format, you may optionally specify a listfC           of the types of operands the instruction is to accept. IftC           you specify a list of operand types, you must enclose the_D           entire FORMAT argument within angle brackets, and you mustD           specify the operand types in the order they are to be used  !     6-32 MACRO-64 Supplied Macrosa e  g      I                                                           MACRO-64 MacrosaI                                                                    $OPDEF     I               with the instruction. $OPDEF supports the following operand                types:  B               IREGISTER        Integer register, such as R5 or SP.  C               FREGISTER        Floating-point register, such as F7.M  F               LITERAL          Integer literal, such as #123 or 32767.  I               LIT_IREG         Integer literal, such as #123 or 32767, or B                                integer register, such as R5 or SP.  I               INDIRECT         Indirect integer register notation such asn$                                (R7).  F               DISPLACEMENT     Indirect integer register notation withG                                an integer literal displacement, such ase(                                FOO(R12).  G               BRANCH_OFFSET    Label or address expression, such as L1.                  For example:  4               FORMAT=<CUSTOM=IREGISTER,DISPLACEMENT>  D               The following example shows the definition of the ADDQD               instruction, which takes either an integer register or-               literal as its second argument:L  E                   $OPDEF ADDQ,                                      -rE                       FORMAT=<CUSTOM=IREGISTER,LIT_IREG,IREGISTER>, -iE                       ENCODING=<26:31=^x10,                         -uE                           21:25=%OP1,                               - E                           12:20=%OP2,                               -fE                           5:11=^x20,                                -r#                           0:4=%OP3>l  H               For a detailed description of instruction formats, see the2               Alpha Architecture Reference Manual.                 ENCODINGB               ENCODING is the numeric encoding for the instructionF               opcode. The default radix is decimal, as is the case forC               all assembler constants. Prefix the value with ^X for6F               hexadecimal. Certain instruction formats allow multipart               encoding:i  I                                             MACRO-64 Supplied Macros 6-33                 MACRO-64 Macros:
     $OPDEF  E           ___________________________________________________________ E           Format________________Encoding_Description_________________r  D           MEMORY_FUNCTION       Specify the base opcode, followed byE                                 a dot, followed by the function code.e,                                 For example:  2                                 ENCODING=^X10.F000  C           JUMP                  Specify the base opcode, optionally D                                 followed by a dot, and the hardware-B                                 hint bits optionally followed by aC                                 dot and the software-hint bits. ForO(                                 example:  1                                 ENCODING=^X1A.2.1   D           OPERATE               Specify the base opcode, followed byE                                 a dot, followed by the function code.A,                                 For example:  0                                 ENCODING=^X12.3C  A           FLOATING_OPERATE      Specify the base opcode, followed C                                 by a dot and the function code. For (                                 example:  1                                 ENCODING=^X17.02B   C           PAL                   Specify the base opcode, optionally B                                 followed by a dot and the functionB                                 code. Omit the function code for aD                                 generic PAL instruction that acceptsC                                 an integer-expression argument. ForM(                                 example:  1                                 ENCODING=^X0.0080 -                                 ENCODING=^X19   E           CUSTOM                Specify a comma-separated list of bit_C                                 ranges and values to place in thoseE8                                 bit ranges. For example:  F                                 ENCODING = < 26:31=^X14, 21:25=%OP1, -  M           ___________________________________16:20=%OP2.REG,_0:15=%OP2.DISP >s  >           For CUSTOM format instructions, specify the ENCODINGE           argument as a comma-separated list of bit ranges and values E           to place in those bit ranges. Enclose the list within angle            brackets.4  !     6-34 MACRO-64 Supplied Macros     R      I                                                           MACRO-64 Macros_I                                                                    $OPDEFr    F               Specify a bit range as start:end where start and end areH               integer constant expressions. For a 1-bit bit range, startH               and end are equal. Bit positions range from 0 to 31. PlaceF               an equal sign (=) after the bit-range specifier followedD               by the value you wish to put in the bit range. You canF               place either a constant integer expression or an operandG               into the bit range. Start and end expressions and integerDB               constant expressions must not reference any externalH               symbols or symbols not yet defined in the assembly. $OPDEFI               evaluates these expressions at the time that it defines the G               instruction as opposed to when the defined instruction is                referenced.   H               Operand names are of the form %OPn, where n is the ordinalH               number of the operand as specified from left to right with"               the FORMAT argument.  I               For the IREGISTER, FREGISTER, and INDIRECT operands, $OPDEFlI               places the 5-bit register number into the bit positions youe               specify.  F               For LITERAL operands, $OPDEF places the literal value ofE               the operand into the bit positions you specify. Operande@               literal values can be up to 32 bits long. The mostG               significant bits are truncated if the size of the operandcF               literal value exceeds the bit range you specify. Forward2               and external references are allowed.  I               For LIT_IREG operands, $OPDEF places either a literal valueiC               or a 5-bit register number into the bit positions youOF               specify. If a literal, the low bit is 1, and the literalH               value is placed in the upper bits. If an integer register,I               the low four bits are 0, and the high five bits contain theU               register number.  G               For DISPLACEMENT operands, $OPDEF defines two parts: a 5-qF               bit register number and a displacement value that can beI               up to 32 bits long. The most significant bits are truncatedII               from the displacement value if the size of the displacementEH               value exceeds the bit range you specify. You can referenceI               the register number by placing .REG after the operand name. E               For example: %OP2.REG. Similarly, you can reference thesI               displacement value by placing .DISP after the operand name.xE               For example: %OP2.DISP. Forward references are allowed.R6               Relocatable expressions are not allowed.  I                                             MACRO-64 Supplied Macros 6-35                 MACRO-64 Macros 
     $OPDEF    >           For BRANCH_OFFSET operands, $OPDEF stores the signed>           longword offset between the next instruction and theA           specified address in the bit positions you specify. The B           address expression specified for a BRANCH_OFFSET operandE           can be a backward or forward reference to a location withinMC           the current psect. It cannot be an external address or an C           address in a different psect. The resulting offset can be B           up to 32 bits in size. If the size of the offset exceedsB           the bit range you specify, the most significant bits are           truncated.  C           $OPDEF fills any bit positions you leave unspecified with            zeros.             DEFAULTSA           DEFAULTS is an optional list of operand defaults of thee>           form <%OPn=value, ...>, where n is the number of the>           operand to which the value is to apply as a default.@           Operand defaults may be specified in any order. If youB           specify a default for one or more operands, you need not-           specify a default for all operands.   B           The following example specifies a default of R31 for the%           first instruction argument:o  A               $OPDEF RET, FORMAT=<CUSTOM=IREGISTER,INDIRECT>,   -nA                   ENCODING=<26:31=^x1A,                         -9A                       21:25=%OP1,                               -rA                       16:20:%OP2,                               -iA                       14;14=^x2,0:13=0>,                        -U%                   DEFAULTS=<%OP1=R31>        Description   B           You can use the $OPDEF macro to define your own opcodes.  =           $OPDEF defines a macro using an unqualified version >           of the mnemonic name you specify. When this macro isB           invoked with the instruction qualifiers you specify when?           you define it with $OPDEF (if any), it expands to the B           instruction representation you have defined with $OPDEF.D           You can specify the qualifiers in any order as long as the8           combination of qualifiers you use is the same.    !     6-36 MACRO-64 Supplied MacrosL    E      I                                                           MACRO-64 Macros_I                                                                    $OPDEFo    C               Other uses of the mnemonic name remain valid provided C               you do not use the mnemonic name as a macro name in a B               .MACRO directive. For instance, you can use the sameD               mnemonic name in the opcode field with different or noC               qualifiers. If the qualifiers (or absence thereof) doaB               not match those specified in your $OPDEF instructionB               definition, the macro defined by $OPDEF processes asH               though you had not defined an instruction by that mnemonicD               name. To do so, it expands to a single statement. ThisI               expansion statement is identical to the mnemonic-name macronG               invocation statement, except it is processed in a contextmB               that prevents the mnemonic-name macro from expandingC               recursively. Instead, the statement is processed as a G               normal, MACRO-64 instruction statement. In this case, you H               may notice references to the mnemonic-name macro expansionB               in a MACAUXMSG diagnostic message if the instruction(               statement contains errors.  C               For instance, if you define a STQ/P instruction using G               $OPDEF, you can still use the STQ instruction without theaI               /P qualifier. If you do, and your STQ instruction statementiD               contains an error, the assembler generates a MACAUXMSGC               message indicating that the error occurred during thetF               expansion of macro STQ. Aside from the fact that the STQI               instruction is processed in the context of the expansion ofoI               the STQ macro, $OPDEF's definition of the STQ/P instruction ?               has no effect on your use of the STQ instruction.            Exampleo  3                 $OPDEF MNEMONIC=BANG, FORMAT=PAL, - (                        ENCODING=^X0.0099                          I                                             MACRO-64 Supplied Macros 6-37y e  A           MACRO-64 MacrosA     .PACKEDs    E     _________________________________________________________________)       .PACKEDu  .           Packed decimal string storage macro.  
     Format  *           .PACKED  decimal-string[,symbol]       Parameters             decimal-stringD           A decimal number from 0 to 31 digits long with an optional2           sign. Digits can be in the range 0 to 9.             symbolC           An optional symbol that is assigned a value equivalent togE           the number of decimal digits in the string. The sign is not            counted as a digit.        Description-  ?           .PACKED generates packed decimal data with two digitsLA           per byte. Packed decimal data is useful in calculationscD           requiring exact accuracy. It is operated on by the decimal           string instructions.  C           A packed decimal string is a contiguous sequence of bytes C           in memory. It is specified by two attributes: the address A           A of the first byte and a length L, which is the number B           of digits in the string and not the length of the stringD           in bytes. The bytes of a packed decimal string are dividedB           into two, 4-bit fields (nibbles). Each nibble except the?           low nibble (bits 3:0) of the last (highest-addressed) >           byte must contain a decimal digit. The low nibble of=           the highest-addressed byte must contain a sign. The @           representation for the digits and sign is indicated as           follows:            !     6-38 MACRO-64 Supplied Macros_ _  _      I                                                           MACRO-64 Macros I                                                                   .PACKEDi  I               ___________________________________________________________                Digit                orI               Sign___Decimal__________Hexadecimal________________________g  '               0      0                0 '               1      1                1 '               2      2                2 '               3      3                3 '               4      4                4 '               5      5                5 '               6      6                6_'               7      7                7F'               8      8                8 '               9      9                9 1               +      10,12,14, or 15  A,C,E, or F I               -______11_or_13_________B_or_D_____________________________r  F               The preferred sign representation is 12 for plus (+) andG               13 for minus (-). The length L is the number of digits in G               the packed decimal string (not counting the sign); L mustnH               be in the range 0 to 31. When the number of digits is odd,F               the digits and the sign fit into a string of bytes whoseF               length is defined by the following equation: L/2(integerF               part only) + 1. When the number of digits is even, it isF               required that an extra 0 appear in the high nibble (bitsH               7:4) of the first byte of the string. Again, the length in-               bytes of the string is L/2 + 1.i  C               The address A of the string specifies the byte of theoF               string containing the most-significant digit in its highD               nibble. Digits of decreasing significance are assignedF               to increasing byte addresses and from high nibble to lowG               nibble within a byte. Thus, +123 has a length of 3 and is %               represented as follows:t          D               The packed decimal number -12 has a length of 2 and is%               represented as follows:i        I                                             MACRO-64 Supplied Macros 6-39                 MACRO-64 Macros      .PACKEDy                       Examplet  6              .PACKED -12,PACKED_SIZED        ; PACKED_     SIZE gets value of 2              .PACKED +500               .PACKED 03              .PACKED -0,SUM_SIZE             ; SUM_      SIZE gets value of 1                                                            !     6-40 MACRO-64 Supplied Macros            I                                                           MACRO-64 Macros I                                                     $PROCEDURE_DESCRIPTOR     I         _________________________________________________________________            $PROCEDURE_DESCRIPTORG  E               Defines a procedure descriptor structure at the currentE               psect and offset.            Format  #               $PROCEDURE_DESCRIPTORt           Description2  G               The arguments for the $PROCEDURE_DESCRIPTOR macro are the6H               same as the $ROUTINE macro, with the following exceptions:  0               o  The ENTRY argument is required.  <               o  There are no CODE_SECTION, LINKAGE_SECTION,I                  DATA_SECTION, DATA_SECTION_POINTER, or STANDARD_PROLOGUE                   arguments.   C               o  There is an additional END_PROLOGUE argument. This D                  argument must be a label that you define at the endE                  of the routine's prologue sequence. This argument isTA                  required for stack and register procedure types.m  
         Notesi  7               o  Because the $ROUTINE macro invokes theeH                  $PROCEDURE_DESCRIPTOR macro for you, you do not need toI                  use the $PROCEDURE_DESCRIPTOR macro if you use $ROUTINE.rG                  You may wish to use $PROCEDURE_DESCRIPTOR when you are $                  not using $ROUTINE.           Example   9                     $PROCEDURE_DESCRIPTOR p1,           - 9                                       KIND=NULL,        -24                                       ENTRY=p1_entry          I                                             MACRO-64 Supplied Macros 6-41O l              MACRO-64 Macrosd     $RESET_LP_LIST    E     _________________________________________________________________.       $RESET_LP_LIST  <           Clears the list of linkage pairs maintained by the)           $LINKAGE_PAIR and $CALL macros.   
     Format             $RESET_LP_LIST       Descriptionb  B           The $LINKAGE_PAIR and $CALL macros maintain an assembly-E           time list of linkage pairs that the $LINKAGE_PAIR macro hasiD           stored in the linkage section. This list enables $LINKAGE_B           PAIR and $CALL to use the same linkage pair for multipleD           routine calls to the same routine. You can clear this list9           of linkage pairs with the $RESET_LP_LIST macro._  B           Under normal circumstances, you do not need to clear theA           linkage-pair list. Some of the times when you do are ast           follows:  >           o  When you change the psect assigned to the linkage              section.0  A           o  If distance from the linkage section of your currentl?              routine falls more than 32K bytes beyond where ther*              linkage pair has been stored.       Exampley  C               ; Define the linkage section psect for routines A & Bn+               $LINK$ = "AB_LINK,NOEXE,OCTA"   $               $ROUTINE A, KIND=STACK               .BASE  R27, $LS =               $CALL D ; Linkage pair is stored in A's linkage <                 ;  section and put on the assembly-time list               $RETURN                $END_ROUTINE A      !     6-42 MACRO-64 Supplied MacrosI ^  .      I                                                           MACRO-64 Macros I                                                            $RESET_LP_LIST     '                  $ROUTINE B, KIND=STACK                    .BASE  R27, $LS=                  $CALL D ; Linkage pair is found on the list,t7                    ;  and used from A's linkage sectiono                  $RETURN                  $END_ROUTINE Bm  C                  ; Define a different linkage section for routine C -                  $LINK$ = "C_LINK,NOEXE,OCTA"   L                  ; Linkage pairs that are on the list are in A & B's linkageL                  ; section, which is not easily accessible by C.  Therefore,"                  ; clear the list.                  $RESET_LP_LISTp  '                  $ROUTINE C, KIND=STACK                    .BASE  R27, $LS@                  $CALL D ; Linkage pair is stored in C's linkage?                    ;  section and put on the assembly-time list=                  $RETURN                  $END_ROUTINE B_                                                I                                             MACRO-64 Supplied Macros 6-43     u           MACRO-64 Macrosi     $RETURNg    E     _________________________________________________________________t       $RETURN   =           Generates a standard epilogue instruction sequence.   
     Format             $RETURN        Description   A           Generates a standard epilogue instruction sequence when B           used within a stack or register routine defined with theD           $ROUTINE macro. The epilogue sequence generated by $RETURN@           restores any registers you specify with the SAVED_REGSE           argument to $ROUTINE and performs stack frame management aslC           necessary. You can use $RETURN whether or not you specifye:           STANDARD_PROLOGUE as TRUE or accept the default.  @           You can use $RETURN any number of times within a givenE           stack or register routine to affect a return to the calling            routine.  ?           You must not use the $BEGIN_EPILOGUE or $END_EPILOGUEr?           macros for an epilogue sequence generated by $RETURN.vD           $RETURN invokes $BEGIN_EPILOGUE and $END_EPILOGUE for you.       Example   7              $ROUTINE FOOZLE, KIND=REGISTER, SAVE_FP=R1                   :                  :                  :              $RETURN               $END_ROUTINE FOOZLE                  !     6-44 MACRO-64 Supplied Macros            I                                                           MACRO-64 MacrosTI                                                                  $ROUTINE     I         _________________________________________________________________s           $ROUTINE  G               Defines the current routine and creates a context for thei               routine.           Format  +               $ROUTINE  NAME=routine name - -                         ALIASES=alias names -o-                         LOCAL=boolean value -e9                         STANDARD_PROLOGUE=boolean value -x0                         ENTRY=code entry point ->                         CODE_SECTION=code section psect name ->                         DATA_SECTION=data section psect name -<                         DATA_SECTION_POINTER=boolean value -D                         LINKAGE_SECTION=linkage section psect name -*                         KIND=routine type-;                         HANDLER_REINVOKABLE=boolean value - 5                         BASE_REG_IS_FP=boolean value-a2                         REI_RETURN=boolean value -:                         STACK_RETURN_VALUE=boolean value -2                         RSA_OFFSET=integer value -/                         SAVE_FP=register name -l>                         SAVE_RA=return address register name -,                         SIZE=numeric value -6                         SAVED_REGS=list of registers -;                         HANDLER=exception handler address -PI                         HANDLER_DATA=data address for exception handler -b7                         SYNCH_EXCEPTIONS=boolean value-o4                         PROC_VALUE=procedure value -7                         ENVIRONMENT=environment value - :                         FUNC_RETURN=function return type -4                         ARGLIST=argument type list -8                         USES_VAX_ARGLIST=boolean value -C                         OVERRIDE_FLAGS=procedure descriptor flags -r9                         DEFAULT_SIGNATURE=boolean value -t7                         COMMON_BASE=list of registers -i3                         TARGET_INVO=boolean value -b-                         EXCEPTION_MODE=mode -i        I                                             MACRO-64 Supplied Macros 6-45  r              MACRO-64 Macrose     $ROUTINE           Parameters             NAMED           The name of the routine. This argument is required for all<           procedure kinds. There is no default. For example:             NAME=FOOZLEb             ALIASESe?           List of alias names for the routine. This argument is @           optional for all procedure types. There is no default.           For example:  @           ALIASES=<FOO,BAR,FOOBAR,foo,bar,foobar,Foo,Bar,FooBar>             LOCAL ?           Boolean value indicating whether the routine is locald@           (TRUE) or externally visible (FALSE). This argument isE           optional for all procedure kinds. The default is FALSE. For            example:             LOCAL=TRUE             STANDARD_PROLOGUE @           Specifies a Boolean value to indicate whether $ROUTINEB           should generate a standard instruction prologue sequence>           at the beginning of the routine's code section. ThisE           argument is optional and valid only with REGISTER and STACK E           procedures. If the procedure type is stack or register, the D           default is TRUE and $ROUTINE generates a standard prologueE           sequence. The prologue sequence generated by $ROUTINE saveswD           the registers you specify with the SAVED_REGS argument and7           performs stack-frame management as necessary.t  @           If you also specify BASE_REG_IS_FP=FALSE, the standardE           prologue sequence generated by $ROUTINE makes a copy of thetE           procedure descriptor address that is in R27 upon entry intoEC           R29 (FP). While you cannot change the value in R29 beforetE           the epilogue, you can use R29 as a working, linkage-section-A           register. If you specify the STANDARD_PROLOGUE argument @           as FALSE, you must code your own prologue sequence andD           mark the end of the prologue with the $END_PROLOGUE macro.A           Whether or not you specify STANDARD_PROLOGUE as TRUE or B           accept the default, you can generate a standard epilogue  !     6-46 MACRO-64 Supplied Macrosn n         I                                                           MACRO-64 MacroseI                                                                  $ROUTINEd    I               sequence for stack and register procedures with the $RETURN !               macro. For example:   %               STANDARD_PROLOGUE=FALSEu                 ENTRYaD               The name of the code-entry point. This argument is theE               code entry-point label that $ROUTINE defines for you ateC               the beginning of the code section for the routine. IftG               this argument is omitted, $ROUTINE generates a label. Forn               example:                  ENTRY=FOOZLE_ENTRY                 CODE_SECTIONE               The psect name and attributes of the code section. ThistG               argument is optional for all procedure kinds. If omitted,mC               the default is the name and attributes defined by theeA               $CODE$ lexical string symbol. If you specify a name D               and attributes for the CODE_SECTION argument, $ROUTINEF               redefines the $CODE$ lexical string symbol such that theH               specified values become the new default. Initially, $CODE$$               is defined as follows:  G               $CODE$ = "$CODE$,OCTA,PIC,CON,REL,LCL,SHR,EXE,NORD,NOWRT"c  H               Since you must delimit the psect name and attributes usingC               commas, be sure to enclose this argument within angle G               brackets to avoid having the assembler interpret the name D               and attributes as different arguments to $ROUTINE. For               example:  3               CODE_SECTION=<MY_CODE,EXE,QUAD,NOWRT>                  DATA_SECTIONE               The psect name and attributes of the data section. This G               argument is optional for all procedure kinds. If omitted, C               the default is the name and attributes defined by the_A               $DATA$ lexical string symbol. If you specify a name D               and attributes for the DATA_SECTION argument, $ROUTINEF               redefines the $DATA$ lexical string symbol such that theH               specified values become the new default. Initially, $DATA$$               is defined as follows:  I               $DATA$ = "$DATA$,OCTA,NOPIC,CON,REL,LCL,NOSHR,NOEXE,RD,WRT"   I                                             MACRO-64 Supplied Macros 6-47     n           MACRO-64 Macros      $ROUTINE    D           Since you must delimit the psect name and attributes using?           commas, be sure to enclose this argument within anglenC           brackets to avoid having the assembler interpret the name @           and attributes as different arguments to $ROUTINE. For           example:  2           DATA_SECTION=<MY_DATA,NOEXE,QUAD,RD,WRT>             DATA_SECTION_POINTERB           Boolean value indicating whether $ROUTINE should store a@           pointer to the data section in the linkage section andE           define $DP as the address of that pointer. This argument isiE           optional for all procedure kinds. The default is FALSE. For            example:  #           DATA_SECTION_POINTER=TRUEg  C           You can use the DATA_SECTION_POINTER argument as follows:n  ?                    $ROUTINE TALLY_HO, DATA_SECTION_POINTER=TRUE                      $DATA_SECTION            TALLY:  .QUAD 0                     $CODE_SECTIONI                    .BASe       R27, $LS  ; Inform assembler that R27->$LS 2                    LDQ         R1, $DP   ; R1->$DSF                    .BASE R1,$DS          ;Inform assembler that R1-$DS4                    LDQ         R0, TALLY ; R0<-TALLY3                    LDA         R0, 1(R0) ; R0<-R0++ 4                    STQ         R0, TALLY ; TALLY<-R01                    RET         (R26)     ; Return (                    $END_ROUTINE TALLY_HO  ?           In this example, the DATA_SECTION_POINTER argument is C           specified in order to obtain linkage to the data section. D           The first LDQ instruction loads R1 with the pointer to theC           data section that $ROUTINE stores in the linkage section. @           The next three instructions increment the value in theB           TALLY variable in the data section. Finally, the routine<           returns the incremented value to its caller in R0.             LINKAGE_SECTION ?           The psect name and attributes of the linkage section.d?           This argument is optional for all procedure kinds. IfiA           omitted, the default is the name and attributes defined D           by the $LINK$ lexical string symbol. If you specify a nameC           and attributes for the LINKAGE_SECTION argument, $ROUTINEs  !     6-48 MACRO-64 Supplied Macrose h         I                                                           MACRO-64 MacrosnI                                                                  $ROUTINE0    F               redefines the $LINK$ lexical string symbol such that theH               specified values become the new default. Initially, $LINK$$               is defined as follows:  K               $LINK$ = "$LINK$,OCTA,NOPIC,CON,REL,LCL,NOSHR,NOEXE,RD,NOWRT"t  H               Since you must delimit the psect name and attributes usingC               commas, be sure to enclose this argument within angleaG               brackets to avoid having the assembler interpret the name3D               and attributes as different arguments to $ROUTINE. For               example:  ;               LINKAGE_SECTION=<MY_LINK,NOEXE,QUAD,RD,NOWRT>                  KINDG               Specifies the kind of routine being defined. This must belI               one of the following: STACK, REGISTER, NULL, or BOUND. This H               is an optional argument. The default is NULL. For example:                 KIND=STACK  !               HANDLER_REINVOKABLE I               Specifies a Boolean value to indicate whether the condition F               handler can be re-invoked. This argument is optional andH               valid only with STACK and REGISTER procedures. It defaultsF               to FALSE if no value is specified and the procedure kindI               is STACK or REGISTER. Note that this argument is only valid H               if a value is also specified for the HANDLER argument. For               example:  &               HANDLER_REINVOKABLE=TRUE                 BASE_REG_IS_FPD               Specifies a Boolean value to indicate whether registerH               R29 (FP) is used as the frame-pointer base register (TRUE)E               or not (FALSE). If specified as FALSE, R29 must be usedaE               to hold the address of the procedure descriptor (or the H               address of the address of the procedure descriptor-see theI               OpenVMS Calling Standard. You can use R29 to hold a workingNC               copy of the linkage-section address passed in R27. In H               addition, your prologue and epilogue instruction sequencesD               can be shorter and more efficient. However, you cannotE               make standard calls to other routines if BASE_REG_IS_FP H               is specified as FALSE. This argument is optional and validG               only with stack and register procedure kinds. It defaults   I                                             MACRO-64 Supplied Macros 6-49e e  R           MACRO-64 Macros      $ROUTINE    A           to TRUE if the procedure type is stack or register. Foro           example:             BASE_REG_IS_FP=FALSE             REI_RETURND           Specifies a Boolean value to indicate whether this routineE           returns using an REI instruction. This argument is optional A           and valid only with STACK, REGISTER, and NULL procedure E           kinds. It defaults to FALSE if the procedure kind is STACK,o)           REGISTER, or NULL. For example:_             REI_RETURN=TRUE_             STACK_RETURN_VALUEB           This argument is obsolete. Do not specify this argument.             RSA_OFFSETA           An integer value specifying the stack offset (in bytes)_B           of the register save area. This argument is optional andC           valid only for STACK procedures. If you specify BASE_REG_ C           IS_FP as TRUE, the value you specify with RSA_OFFSET must.C           be at least 8. RSA_OFFSET defaults to 8 if BASE_REG_IS_FPe9           is specified as TRUE, 0 otherwise. For example:s             RSA_OFFSET=32t             SAVE_FPfD           The register that contains a copy of the value of FP (R29)>           upon entry to this routine. The prologue instructionB           sequence must copy FP to the register specified by SAVE_B           FP and the epilogue instruction sequence(s) must restoreE           FP from the register specified by SAVE_FP. This argument iseC           required and only valid for REGISTER procedures. There iss"           no default. For example:             SAVE_FP=R1             SAVE_RA =           The register that contains the return address. This :           argument is optional and only valid for REGISTERE           procedures. If SAVE_RA is not R26, the prologue instruction C           sequence must copy R26 to the register specified by SAVE_ B           RA and the epilogue instruction sequence(s) must use theD           return address stored in the register specified by SAVE_FP  !     6-50 MACRO-64 Supplied Macros            I                                                           MACRO-64 Macros I                                                                  $ROUTINE,    H               to affect its return to caller. SAVE_RA defaults to R26 if:               the procedure kind is REGISTER. For example:                 SAVE_RA=R22o                 SIZEF               A numeric value that must be a multiple of 16 specifyingG               the size of the fixed-stack area in bytes. This parameter,F               is valid only for REGISTER and STACK procedure kinds. ItD               defaults to the minimum value possible given the otherE               arguments you specify or default. $ROUTINE computes the G               amount of stack storage needed for the register save area G               (if any) and defines the $RSA_END symbol to be the offsetsE               of the first byte beyond the register save area. If yousH               wish to allocate a fixed area of stack beyond the registerD               save area, you can specify an expression with the SIZEF               argument that includes the term $RSA_END plus the amountG               of fixed-stack storage you need for your application. For_               example:                 SIZE=$RSA_END+32                 SAVED_REGSI               A list of registers saved on the stack by the prologue code H               of this routine. It is valid only for STACK procedures andG               you must specify at least FP (R29) with this argument. IttE               defaults to FP (R29) for STACK procedures. For example:N  )               SAVED_REGS=<R5,FP,F2,F3,F4>y  C               The OpenVMS Calling Standard specifies that registers D               R0, R1, R28, R30 (SP), and R31 must never be saved andF               restored. If you specify these registers with the SAVED_C               REGS argument, the $ROUTINE macro issues a diagnostica               warning message.                 HANDLEReE               The address of an exception handler. It is optional andtC               valid only for STACK and REGISTER procedure kinds. ByeH               default, the procedure is defined not to have an exception#               handler. For example:x                  HANDLER=MY_HANDLER    I                                             MACRO-64 Supplied Macros 6-51                 MACRO-64 Macros      $ROUTINE               HANDLER_DATAE           The address of data for the specified handler, if any. This D           argument is optional and valid only for stack and register>           procedure kinds and has no default value. You cannotC           specify a HANDLER_DATA argument if you do not specify the_(           HANDLER argument. For example:  &           HANDLER_DATA=MY_HANDLER_DATA             SYNCH_EXCEPTIONS<           An argument to indicate whether exceptions must beC           synchronized or not. This argument is optional with STACKoC           and REGISTER routines and is not allowed with other kinds D           of routines. This argument defaults to TRUE if you specifyD           an exception handler with the HANDLER argument. Otherwise,B           it defaults to FALSE. When this argument is TRUE and you?           specify or accept the default STANDARD_PROLOGUE=TRUE,l?           $ROUTINE generates a TRAPB instruction as part of thecE           standard prologue sequence. In addition, when this argument B           is true, the $RETURN macro generates a TRAPB instruction>           as part of the standard epilogue sequence. When thisB           argument is FALSE, neither $ROUTINE nor $RETURN generate           TRAPB instructions.              PROC_VALUEA           The procedure value of a bound procedure's parent. This B           argument is required for BOUND procedures and is invalid5           for all other procedure kinds. For example:               PROC_VALUE=PARENT_PROC             ENVIRONMENTED           Specifies an environment value. This parameter is optional@           and valid only for BOUND procedures. It has no default           value. For example:              ENVIRONMENT=0V             FUNC_RETURN >           Specifies the function return type. This argument isC           optional and valid for all procedure kinds. If specified, B           it must be one of the following: I64, D64, I32, U32, FF,B           FD, FG, FS, FT, FFC, FDC, FGC, FSC, or FTC. These values@           correspond to those listed in Table 3-7 of the OpenVMS  !     6-52 MACRO-64 Supplied Macros            I                                                           MACRO-64 MacrosuI                                                                  $ROUTINE     C               Calling Standard that have an additional "RASE$K_FR_" 7               prefix. There is no default. For example:s                 FUNC_RETURN=U32                  ARGLIST I               Argument type list. This argument is optional and valid fortG               all procedure kinds. If the argument list contains one or G               more elements, each of the first six elements must be onelG               of the following: Q, I32, U32, FF, FD, FG, FS, or FT. The F               seventh and subsequent arguments (if any) must be either               I32 or Q.o  D               These values correspond to the PSIG$K_RA_* and MASE$K_B               MA_* signature encodings in Table 3-6 of the OpenVMSH               Calling Standard. There is no default. If you specify thisG               argument, $ROUTINE generates a procedure signature block.                For example:  (               ARGLIST=<Q,I32,FF,FF,U32>.                 USES_VAX_ARGLISTF               Specifies a Boolean value indicating whether the routineI               uses a VAX argument list. This argument is optional for all H               procedure kinds and defaults to FALSE. If you specify thisG               argument, $ROUTINE generates a procedure signature block.                For example:  #               USES_VAX_ARGLIST=TRUE                  OVERRIDE_FLAGSF               Specifies overriding flags for the PDSC$W_FLAGS field inE               the procedure descriptor. This argument is optional and D               valid for all procedure kinds. However, it is requiredH               for BOUND procedures when the parameter specified with theF               PROC_VALUE argument is an external or forward reference./               There is no default. For example:2  )               OVERRIDE_FLAGS=PARENT_FLAGSe                 DEFAULT_SIGNATURE_H               Specifies a Boolean value to indicate whether the standardI               procedure signature is used. TRUE means to use the standardaC               signature. It is optional and valid for all procedureoC               kinds. The default is FALSE if you specify either theeC               ARGLIST or USES_VAX_ARGLIST arguments. Otherwise, the   I                                             MACRO-64 Supplied Macros 6-53                 MACRO-64 Macros      $ROUTINE    @           default is TRUE. Note that this argument must be FALSEA           or blank if you specify either the ARGLIST or USES_VAX_ )           ARGLIST arguments. For example:               DEFAULT_SIGNATURE=TRUE             COMMON_BASEa@           An argument to specify one or more base registers that?           are used in common with other routines. This argumenttA           is optional for all routine kinds. By default, $ROUTINER?           invalidates any previous .BASE directives that may be B           in effect when you invoke $ROUTINE. In this way, you are?           prevented from inadvertently processing the second or B           subsequent routines in a module with .BASE directives in@           effect that apply only to a previous routine. However,A           you may wish to share a common base register assignmentmA           between a number of routines. To do so, you can reissueUB           the appropriate .BASE directive or directives after each@           invocation of $ROUTINE. Alternatively, you can specify@           one or more common base registers with the COMMON_BASE@           argument, and enter the appropriate .BASE directive or>           directives only once at the beginning of the module.B           Specify the value for the COMMON_BASE argument as a list,           of integer registers. For example:             COMMON_BASE=<R5,R13>  B           In this example, $ROUTINE invalidates any previous .BASED           directives except those for registers R5 and R13. PreviousC           .BASE directives for registers R5 and R13 are unaffected.c             TARGET_INVOtA           Specifies a Boolean value indicating whether or not thepC           exception handler for this procedure is invoked when thisnC           procedure is the target of an invocation unwind. (TARGET_b?           INVO=TRUE) causes the exception handler to be invokedD=           during an unwind. The default is TARGET_INVO=FALSE.T             EXCEPTION_MODEE           An argument to specify one of the following exception modesi-           with STACK and REGISTER procedures:w  :           o  SIGNAL-raise all exceptions except underflow.  -           o  SIGNAL_ALL-raise all exceptions.   (           o  SILENT-raise no exceptions.  !     6-54 MACRO-64 Supplied Macros     R      I                                                           MACRO-64 Macros I                                                                  $ROUTINE     D               o  FULL_IEEE-only raise exceptions as per IEEE control                  bits.  3               The default is EXCEPTION_MODE=SIGNAL.            DescriptionT  G               $ROUTINE defines a routine, makes it the current routine,a1               and performs the following actions:   H               o  Creates and associates a linkage section, code section,3                  and data section with the routine.i  F               o  Defines a procedure descriptor and optional signatureH                  block in accordance with the values of macro arguments.  G               o  Optionally stores a pointer to the data section within %                  the linkage section.I  C               o  Creates the following numeric and lexical symbols:0                                                  I                                             MACRO-64 Supplied Macros 6-55     Q           MACRO-64 MacrosS     $ROUTINE  E              ________________________________________________________ E              Symbol________Description_______________________________R  D              $CS           Address at start of the current routine's(                            code section.  D              $DS           Address at start of the current routine's(                            data section.  ?              $DP           Optional address of a pointer to thea?                            current routine's data section. This @                            symbol has a value that is an addressC                            in the current routine's linkage sectionhA                            at which the $ROUTINE macro has placedlC                            the address of the data section ($DS) as #                            follows:   "                            $DP = .'                            .ADDRESS $DSs  B                            $DP enables you to access the data areaB                            of the current routine from its linkage#                            section.p  C              $LS           Address of the current routine's linkage,#                            section.i  C              $SIZE         Size of fixed area of stack frame of the E                            current routine. This symbol is valid only <                            with STACK and REGISTER routines.  A              $RSA_OFFSET   The offset within the fixed-stack areaeD                            to the register save area. This symbol is:                            valid only with STACK routines.  D              $RSA_END      The offset within the fixed-stack area toC                            the the first byte beyond the end of thes7                            register save area (if any).   C              $CODE$        A lexical string symbol that defines the D                            routine's code psect name and attributes.  <              $DATA$        A lexical symbol that defines theD                            routine's data psect name and attributes.  ?              $LINK$        A lexical string symbol that defineso?                            the routine's linkage psect name and E              ______________attributes._______________________________I  A           o  Optionally generates a standard instruction prologuee;              sequence at the beginning of the code section.   !     6-56 MACRO-64 Supplied Macros  u  t      I                                                           MACRO-64 Macros I                                                                  $ROUTINE     E                  If you specify /NAMES=AS_IS on the command line, allaC                  but the last three of these symbols are defined inmF                  both complete uppercase and complete lowercase. TheseH                  symbols are intended for your use outside of the macrosE                  themselves. For example, the values of these numericrC                  symbols may be useful as a mnemonic when coding aneI                  instruction with a register as in the following example:e  %                   lda   SP,-$SIZE(SP)   H                  The last three symbols, $CODE$, $DATA$, and $LINK$, areI                  only defined in uppercase. They are used by the $ROUTINE F                  macro for the default code, data, and linkage sectionI                  psect names and attributes. You can define these symbolsaF                  before invoking $ROUTINE to alter the default program%                  sections as follows:S  B                  -  $CODE$ = "MY_CODE,EXE,OCTA,SHR,NORD,NOWRT,GBL"  B                  -  $DATA$ = "MY_DATA,NOEXE,OCTA,NOSHR,RD,WRT,GBL"  B                  -  $LINK$ = "MY_LINK,NOEXE,OCTA,SHR,RD,NOWRT,GBL"  D                  These statements cause $ROUTINE to use the previous>                  psect names and attributes by default. If youB                  specify any of the CODE_SECTION, DATA_SECTION, or@                  LINKAGE_SECTION arguments in your invocation ofF                  $ROUTINE, $ROUTINE uses the psect name and attributes-                  specified with the argument.i  B                  In addition, $ROUTINE redefines the correspondingC                  $CODE$, $DATA$, or $LINK$ lexical string symbol toRB                  the value you specify when you specify any of theI                  CODE_SECTION, DATA_SECTION, or LINKAGE_SECTION argumentss                  with $ROUTINE.T           Exampleg  1                         $ROUTINE MAIN1, KIND=NULL   1                         $ROUTINE MAIN1,         -i1                             KIND=STACK,         -.1                             SIZE=48,            -,1                             SAVED_REGS=<R2,FP,F5>   I                                             MACRO-64 Supplied Macros 6-57s i  d                    I                                                                         A I         _________________________________________________________________n  I                           MACRO-64 Alpha AXP Architecture Quick Referencey    C               This appendix provides figures and tables showing thetE               data types and addressing capabilities of the Alpha AXPiI               architecture. The information is derived from the Alpha AXPIH               Achitecture Quick Reference Guide. Minor changes have beenE               made to reflect the usage of the Alpha AXP architectures+               that is specific to MACRO-64.t  H               For more information, see the Alpha Architecture Reference6               Manual and the OpenVMS Calling Standard.  >               Figure A-1 shows integer and floating-point data?               structures. Figure A-2 shows instruction formats.e                                                I                       MACRO-64 Alpha AXP Architecture Quick Reference A-1                                                                                                              7     A-2 MACRO-64 Alpha AXP Architecture Quick Reference  u  t              &         A.1 Register Usage Conventions  H               Table A-1 lists the register usage conventions for OpenVMSF               AXP. MACRO-64 recognizes FP and SP as register synonyms,H               but does not recognize AI, RA, or PV as register synonyms.  I         Table_A-1_Register_Usage_Conventions_for_OpenVMS_AXP_____________u  +         R0               Int func ret valuei          R1               Scratch         R2-R15           Saved!         R16-             Argument          R21           R22-             Scratch         R24g-         R25      AI      Argument informationf'         R26      RA      Return addresss(         R27      PV      Procedure value)         R28              Volatile scratch )         R29      FP      Stack frame basey&         R30      SP      Stack pointer         R31              Zeron/         F0               F-P function ret valued3         F1               F-P complex func ret valuef         F2-F9            Saved          F10-             Scratch         F15:!         F16-             Argument          F22           F23-             Scratch         F30 I         F31______________Zero____________________________________________     (         A.2 Instruction Operand Notation  H               Table A-2 shows the notation for instruction operands. The,               notation format is as follows:  -               <name>.<access type><data type>F          I                       MACRO-64 Alpha AXP Architecture Quick Reference A-3                    E     Table_A-2_Instruction_Operand_Notation___________________________        <name>:t     disp  Displacement field      fnc   PALcode function field2     Ra    Integer register operand in the Ra field2     Rb    Integer register operand in the Rb field1     #b    Integer literal operand in the Rb fieldt2     Rc    Integer register operand in the Rc field9     Fa    Floating-point register operand in the Ra fieldo9     Fb    Floating-point register operand in the Rb fielda9     Fc    Floating-point register operand in the Rc field      <access type>:?     a     The operand is used in an address calculation to form ?           an effective address. The data-type code that followsAA           indicates the units of addressability (or scale factor).B           applied to this operand when the instruction is decoded..     i     The operand is an immediate literal./     m     The operand is both read and written.D#     r     The operand is read only.f$     w     The operand is write only.     <data type>:     b     Byte     f     F_floating     g     G_floating     l     Longword     q     Quadword+     s     IEEE single floating (S_floating)n+     t     IEEE double floating (T_floating)T     w     WordE     x_____The_data_type_is_specified_by_the_instruction._____________f    &     A.3 Instruction Qualifier Notation  B           Table A-3 shows the notation for instruction qualifiers.                  7     A-4 MACRO-64 Alpha AXP Architecture Quick Referenced u                 I         Table_A-3_Instruction_Qualifier_Notation_________________________t  I         /Qualifier_Meaning_______________________________________________   #         C          Chopped rounding #         D          Dynamic roundingt1                    (mode determined by FPCR<DYN>)a(         I          Inexact result enable*         M          Minus infinity rounding-         S          Software completion enable ,         U          Floating underflow enableI         V__________Integer_overflow_enable_______________________________r    .         A.4 F-P Control Register (FPCR) Format  F               Table A-4 shows the format for the F-P control register.  I         Table_A-4_F-P_Control_Register_(FPCR)_Format_____________________s  I         Bits____Symbol___Meaning_________________________________________   .         63      SUM      Bitwise OR of <57:52>;         62:60   RAZ      Read as zero; ignored when writtenc                 /IGN5         59:58   DYN      IEEE rounding mode selected:d  %                          00   Chopped ,                          01   Minus infinity-                          10   Normal rounding +                          11   Plus infinity B         57      IOV      Integer overflow of destination precision?         56      INE      Floating mathematically inexact result C         55      UNF      Floating underflow of destination exponent B         54      OVF      Floating overflow of destination exponent=         53      DZE      Floating divide with divisor of zero_7         52      INV      Floating invalid operand valuee;         51:0    RAZ      Read as zero; ignored when written I         ________/IGN_____________________________________________________t            I                       MACRO-64 Alpha AXP Architecture Quick Reference A-5  o  e              #     A.5 Decodable Pseudo-Operationsl  C           Table A-5 lists the decodable pseudo-operations and theirh)           associated actual instructions.g  E     Table_A-5_Decodable_Pseudo-Operations____________________________   "     Pseudo-                 ActualE     Operation_______________Instruction______________________________f  2     BR        target        BR          R31,target2     CLR       Rx            BIS         R31,R31,Rx1     FABS      Fx,Fy         CPYS        F31,Fx,Fyk2     FCLR      Fx            CPYS        F31,F31,Fx0     FMOV      Fx,Fy         CPYS        Fx,Fx,Fy0     FNEG      Fx,Fy         CPYSN       Fx,Fx,Fy3     FNOP                    CPYS        F31,F31,F31X3     MOV       Lit,Rx        LDA         Rx,lit(R31) 8     MOV       {Rx           BIS         R31,{Rx/Lit8},Ry               /Lit8},Ry 0     MF_FPCR   Fx            MF_FPCR     Fx,Fx,Fx0     MT_FPCR   Fx            MT_FPCR     Fx,Fx,Fx1     NEGF      Fx,Fy         SUBF        F31,Fx,FyI1     NEGF/S    Fx,Fy         SUBF/S      F31,Fx,Fyf1     NEGG      Fx,Fy         SUBG        F31,Fx,Fyc1     NEGG/S    Fx,Fy         SUBG/S      F31,Fx,Fy 7     NEGL      {Rx           SUBL        R31,{Rx/Lit},Ry                /Lit8},Ryo7     NEGL/V    {Rx           SUBL/V      R31,{Rx/Lit},Ry                /Lit8},Rya7     NEGQ      {Rx           SUBQ        R31,{Rx/Lit},Ry                /Lit8},Ryr7     NEGQ/V    {Rx           SUBQ/V      R31,{Rx/Lit},Ry                /Lit8},RyI1     NEGS      Fx,Fy         SUBS        F31,Fx,Fyo1     NEGS/SU   Fx,Fy         SUBS/SU     F31,Fx,Fyd1     NEGS      Fx,FY         SUBS/SUI    F31,Fx,Fyr     /SUI1     NEGT      Fx,Fy         SUBT        F31,Fx,Fy   E                                              (continued on next page)e        7     A-6 MACRO-64 Alpha AXP Architecture Quick Referencer e  h              I         Table_A-5_(Cont.)_Decodable_Pseudo-Operations____________________   &         Pseudo-                 ActualI         Operation_______________Instruction______________________________   5         NEGT/SU   Fx,Fy         SUBT/SU     F31,Fx,FyX5         NEGT      Fx,FY         SUBT/SUI    F31,Fx,Fy          /SUI7         NOP                     BIS         R31,R31,R31m;         NOT       {Rx           ORNOT       R31,{Rx/Lit},Ry                    /Lit8},Ryt;         SEXTL     {Rx/Lit},Ry   ADDL        R31,{Rx/Lit},RyiI         UNOP____________________LDQ_U_______R31,0(Rx)____________________i  :         A.6 Common Architecture Opcodes in Numerical Order  @               Table A-6 lists the common architecture opcodes in               numerical order   I         Table_A-6_Common_Architecture_Opcodes_in_Numerical_Order_________a  I         Opcode________________Opcode________________Opcode_______________   C         00      CALL_PAL      11.26   CMOVNE        15.01E    CVTDGn@                                                               /CB         01      OPC01         11.28   ORNOT         15.020    ADDG@                                                               /CB         02      OPC02         11.40   XOR           15.021    SUBG@                                                               /CB         03      OPC03         11.44   CMOVLT        15.022    MULG@                                                               /CB         04      OPC04         11.46   CMOVGE        15.023    DIVG@                                                               /CC         05      OPC05         11.48   EQV           15.02C    CVTGFt@                                                               /CC         06      OPC06         11.64   CMOVLE        15.02D    CVTGD @                                                               /CC         07      OPC07         11.66   CMOVGT        15.02F    CVTGQ(@                                                               /CC         08      LDA           12.02   MSKBL         15.03C    CVTQFE@                                                               /C  I                                                  (continued on next page)d    I                       MACRO-64 Alpha AXP Architecture Quick Reference A-7     G              E     Table_A-6_(Cont.)_Common_Architecture_Opcodes_in_Numerical_Order_4  E     Opcode________________Opcode________________Opcode_______________   ?     09      LDAH          12.06   EXTBL         15.03E    CVTQG <                                                           /C>     0A      OPC0A         12.0B   INSBL         15.080    ADDF>     0B      LDQ_U         12.12   MSKWL         15.081    SUBF>     0C      OPC0C         12.16   EXTWL         15.082    MULF>     0D      OPC0D         12.1B   INSWL         15.083    DIVF?     0E      OPC0E         12.22   MSKLL         15.09E    CVTDGs>     0F      STQ_U         12.26   EXTLL         15.0A0    ADDG>     10.00   ADDL          12.2B   INSLL         15.0A1    SUBG>     10.02   S4ADDL        12.30   ZAP           15.0A2    MULG>     10.09   SUBL          12.31   ZAPNOT        15.0A3    DIVG@     10.0B   S4SUBL        12.32   MSKQL         15.0A5    CMPGEQ@     10.0F   CMPBGE        12.34   SRL           15.0A6    CMPGLT@     10.12   S8ADDL        12.36   EXTQL         15.0A7    CMPGLE?     10.1B   S8SUBL        12.39   SLL           15.0AC    CVTGF ?     10.1D   CMPULT        12.3B   INSQL         15.0AD    CVTGDA?     10.20   ADDQ          12.3C   SRA           15.0AF    CVTGQ_?     10.22   S4ADDQ        12.52   MSKWH         15.0BC    CVTQFD?     10.29   SUBQ          12.57   INSWH         15.0BE    CVTQG >     10.2B   S4SUBQ        12.5A   EXTWH         15.100    ADDF=                                                           /UCs>     10.2D   CMPEQ         12.62   MSKLH         15.101    SUBF=                                                           /UCa>     10.32   S8ADDQ        12.67   INSLH         15.102    MULF=                                                           /UCu>     10.3B   S8SUBQ        12.6A   EXTLH         15.103    DIVF=                                                           /UC ?     10.3D   CMPULE        12.72   MSKQH         15.11E    CVTDGd=                                                           /UCf>     10.40   ADDL/V        12.77   INSQH         15.120    ADDG=                                                           /UCl>     10.49   SUBL/V        12.7A   EXTQH         15.121    SUBG=                                                           /UCs>     10.4D   CMPLT         13.00   MULL          15.122    MULG=                                                           /UC >     10.60   ADDQ/V        13.20   MULQ          15.123    DIVG=                                                           /UCd  E                                              (continued on next page)     7     A-8 MACRO-64 Alpha AXP Architecture Quick Referencee                   I         Table_A-6_(Cont.)_Common_Architecture_Opcodes_in_Numerical_Order_   I         Opcode________________Opcode________________Opcode_______________i  C         10.69   SUBQ/V        13.30   UMULH         15.12C    CVTGFbA                                                               /UCeC         10.6D   CMPLE         13.40   MULL/V        15.12D    CVTGDlA                                                               /UC C         11.00   AND           13.60   MULQ/V        15.12F    CVTGQhA                                                               /VCeB         11.08   BIC           14      OPC14         15.180    ADDF@                                                               /UB         11.14   CMOVLBS       15.000  ADDF/C        15.181    SUBF@                                                               /UB         11.16   CMOVLBC       15.001  SUBF/C        15.182    MULF@                                                               /UB         11.20   BIS           15.002  MULF/C        15.183    DIVF@                                                               /UC         11.24   CMOVEQ        15.003  DIVF/C        15.19E    CVTDG_@                                                               /UD         15.1A0  ADDG/U        15.580  ADDF/SU       16.0A6    CMPTLTD         15.1A1  SUBG/U        15.581  SUBF/SU       16.0A7    CMPTLEC         15.1A2  MULG/U        15.582  MULF/SU       16.0AC    CVTTSFC         15.1A3  DIVG/U        15.583  DIVF/SU       16.0AF    CVTTQyC         15.1AC  CVTGF/U       15.59E  CVTDG/SU      16.0BC    CVTQSnC         15.1AD  CVTGD/U       15.5A0  ADDG/SU       16.0BE    CVTQTdB         15.1AF  CVTGQ/V       15.5A1  SUBG/SU       16.0C0    ADDS@                                                               /DB         15.400  ADDF/SC       15.5A2  MULG/SU       16.0C1    SUBS@                                                               /DB         15.401  SUBF/SC       15.5A3  DIVG/SU       16.0C2    MULS@                                                               /DB         15.402  MULF/SC       15.5AC  CVTGF/SU      16.0C3    DIVS@                                                               /DB         15.403  DIVF/SC       15.5AD  CVTGD/SU      16.0E0    ADDT@                                                               /DB         15.41E  CVTDG/SC      15.5AF  CVTGQ/SV      16.0E1    SUBT@                                                               /DB         15.420  ADDG/SC       16.000  ADDS/C        16.0E2    MULT@                                                               /D  I                                                  (continued on next page)       I                       MACRO-64 Alpha AXP Architecture Quick Reference A-9i                   E     Table_A-6_(Cont.)_Common_Architecture_Opcodes_in_Numerical_Order_e  E     Opcode________________Opcode________________Opcode_______________T  >     15.421  SUBG/SC       16.001  SUBS/C        16.0E3    DIVT<                                                           /D?     15.422  MULG/SC       16.002  MULS/C        16.0EC    CVTTSM<                                                           /D?     15.423  DIVG/SC       16.003  DIVS/C        16.0EF    CVTTQ <                                                           /D?     15.42C  CVTGF/SC      16.020  ADDT/C        16.0FC    CVTQS <                                                           /D?     15.42D  CVTGD/SC      16.021  SUBT/C        16.0FE    CVTQT_<                                                           /D>     15.42F  CVTGQ/SC      16.022  MULT/C        16.100    ADDS=                                                           /UCw>     15.480  ADDF/S        16.023  DIVT/C        16.101    SUBS=                                                           /UCs>     15.481  SUBF/S        16.02C  CVTTS/C       16.102    MULS=                                                           /UCe>     15.482  MULF/S        16.02F  CVTTQ/C       16.103    DIVS=                                                           /UCi>     15.483  DIVF/S        16.03C  CVTQS/C       16.120    ADDT=                                                           /UCo>     15.49E  CVTDG/S       16.03E  CVTQT/C       16.121    SUBT=                                                           /UC >     15.4A0  ADDG/S        16.040  ADDS/M        16.122    MULT=                                                           /UC >     15.4A1  SUBG/S        16.041  SUBS/M        16.123    DIVT=                                                           /UC ?     15.4A2  MULG/S        16.042  MULS/M        16.12C    CVTTSe=                                                           /UCe?     15.4A3  DIVG/S        16.043  DIVS/M        16.12F    CVTTQ =                                                           /VCA>     15.4A5  CMPGEQ/S      16.060  ADDT/M        16.140    ADDS=                                                           /UM >     15.4A6  CMPGLT/S      16.061  SUBT/M        16.141    SUBS=                                                           /UMg>     15.4A7  CMPGLE/S      16.062  MULT/M        16.142    MULS=                                                           /UM2  E                                              (continued on next page)       8     A-10 MACRO-64 Alpha AXP Architecture Quick Reference    a              I         Table_A-6_(Cont.)_Common_Architecture_Opcodes_in_Numerical_Order_   I         Opcode________________Opcode________________Opcode_______________c  B         15.4AC  CVTGF/S       16.063  DIVT/M        16.143    DIVSA                                                               /UM B         15.4AD  CVTGD/S       16.06C  CVTTS/M       16.160    ADDTA                                                               /UM_B         15.4AF  CVTGQ/S       16.06F  CVTTQ/M       16.161    SUBTA                                                               /UM B         15.500  ADDF/SUC      16.07C  CVTQS/M       16.162    MULTA                                                               /UMPB         15.501  SUBF/SUC      16.07E  CVTQT/M       16.163    DIVTA                                                               /UM C         15.502  MULF/SUC      16.080  ADDS          16.16C    CVTTSeA                                                               /UMnC         15.503  DIVF/SUC      16.081  SUBS          16.16F    CVTTQrA                                                               /VMfB         15.51E  CVTDG/SUC     16.082  MULS          16.180    ADDS@                                                               /UB         15.520  ADDG/SUC      16.083  DIVS          16.181    SUBS@                                                               /UB         15.521  SUBG/SUC      16.0A0  ADDT          16.182    MULS@                                                               /UB         15.522  MULG/SUC      16.0A1  SUBT          16.183    DIVS@                                                               /UB         15.523  DIVG/SUC      16.0A2  MULT          16.1A0    ADDT@                                                               /UB         15.52C  CVTGF/SUC     16.0A3  DIVT          16.1A1    SUBT@                                                               /UB         15.52D  CVTGD/SUC     16.0A4  CMPTUN        16.1A2    MULT@                                                               /UB         15.52F  CVTGQ/SVC     16.0A5  CMPTEQ        16.1A3    DIVT@                                                               /UC         16.1AC  CVTTS/U       16.5AF  CVTTQ/SV      16.7BC    CVTQS B                                                               /SUIC         16.1AF  CVTTQ/V       16.5C0  ADDS/SUD      16.7BE    CVTQT_B                                                               /SUIB         16.1C0  ADDS/UD       16.5C1  SUBS/SUD      16.7C0    ADDSC                                                               /SUID   I                                                  (continued on next page)i      I                      MACRO-64 Alpha AXP Architecture Quick Reference A-11g o  f              E     Table_A-6_(Cont.)_Common_Architecture_Opcodes_in_Numerical_Order_R  E     Opcode________________Opcode________________Opcode_______________r  >     16.1C1  SUBS/UD       16.5C2  MULS/SUD      16.7C1    SUBS?                                                           /SUID_>     16.1C2  MULS/UD       16.5C3  DIVS/SUD      16.7C2    MULS?                                                           /SUIDd>     16.1C3  DIVS/UD       16.5E0  ADDT/SUD      16.7C3    DIVS?                                                           /SUIDp>     16.1E0  ADDT/UD       16.5E1  SUBT/SUD      16.7E0    ADDT?                                                           /SUID >     16.1E1  SUBT/UD       16.5E2  MULT/SUD      16.7E1    SUBT?                                                           /SUIDl>     16.1E2  MULT/UD       16.5E3  DIVT/SUD      16.7E2    MULT?                                                           /SUIDl>     16.1E3  DIVT/UD       16.5EC  CVTTS/SUD     16.7E3    DIVT?                                                           /SUIDa?     16.1EC  CVTTS/UD      16.5EF  CVTTQ/SVD     16.7EC    CVTTSd?                                                           /SUID_?     16.1EF  CVTTQ/VD      16.6AC  CVTST/S       16.7EF    CVTTQ-?                                                           /SVID ?     16.2AC  CVTST         16.700  ADDS/SUIC     16.7FC    CVTQSi?                                                           /SUIDt?     16.500  ADDS/SUC      16.701  SUBS/SUIC     16.7FE    CVTQTi?                                                           /SUIDc?     16.501  SUBS/SUC      16.702  MULS/SUIC     17.010    CVTLQ_>     16.502  MULS/SUC      16.703  DIVS/SUIC     17.020    CPYS?     16.503  DIVS/SUC      16.720  ADDT/SUIC     17.021    CPYSN ?     16.520  ADDT/SUC      16.721  SUBT/SUIC     17.022    CPYSE =     16.521  SUBT/SUC      16.722  MULT/SUIC     17.024    MT_ >                                                           FPCR=     16.522  MULT/SUC      16.723  DIVT/SUIC     17.025    MF_ >                                                           FPCRA     16.523  DIVT/SUC      16.72C  CVTTS/SUIC    17.02A    FCMOVEQFA     16.52C  CVTTS/SUC     16.72F  CVTTQ/SVIC    17.02B    FCMOVNE A     16.52F  CVTTQ/SVC     16.73C  CVTQS/SUIC    17.02C    FCMOVLT3A     16.540  ADDS/SUM      16.73E  CVTQT/SUIC    17.02D    FCMOVGEEA     16.541  SUBS/SUM      16.740  ADDS/SUIM     17.02E    FCMOVLE A     16.542  MULS/SUM      16.741  SUBS/SUIM     17.02F    FCMOVGT ?     16.543  DIVS/SUM      16.742  MULS/SUIM     17.030    CVTQL   E                                              (continued on next page)     8     A-12 MACRO-64 Alpha AXP Architecture Quick Reference t  R              I         Table_A-6_(Cont.)_Common_Architecture_Opcodes_in_Numerical_Order_   I         Opcode________________Opcode________________Opcode_______________   C         16.560  ADDT/SUM      16.743  DIVS/SUIM     17.130    CVTQLF@                                                               /VC         16.561  SUBT/SUM      16.760  ADDT/SUIM     17.530    CVTQLeA                                                               /SVrC         16.562  MULT/SUM      16.761  SUBT/SUIM     18.0000   TRAPBeB         16.563  DIVT/SUM      16.762  MULT/SUIM     18.0400   EXCB@         16.56C  CVTTS/SUM     16.763  DIVT/SUIM     18.4000   MBA         16.56F  CVTTQ/SVM     16.76C  CVTTS/SUIM    18.4400   WMBFC         16.580  ADDS/SU       16.76F  CVTTQ/SVIM    18.8000   FETCHSD         16.581  SUBS/SU       16.77C  CVTQS/SUIM    18.A000   FETCH_?                                                               M B         16.582  MULS/SU       16.77E  CVTQT/SUIM    18.C000   RPCC@         16.583  DIVS/SU       16.780  ADDS/SUI      18.E000   RC@         16.5A0  ADDT/SU       16.781  SUBS/SUI      18.F000   RSC         16.5A1  SUBT/SU       16.782  MULS/SUI      19        PAL19tA         16.5A2  MULT/SU       16.783  DIVS/SUI      1A.0      JMP_A         16.5A3  DIVT/SU       16.7A0  ADDT/SUI      1A.1      JSR A         16.5A4  CMPTUN/SU     16.7A1  SUBT/SUI      1A.2      RET B         16.5A5  CMPTEQ/SU     16.7A2  MULT/SUI      1A.3      JSR_G                                                               COROUTINE C         16.5A6  CMPTLT/SU     16.7A3  DIVT/SUI      1B        PAL1B C         16.5A7  CMPTLE/SU     16.7AC  CVTTS/SUI     1C        OPC1C2C         16.5AC  CVTTS/SU      16.7AF  CVTTQ/SVI     1D        PAL1D B         1E      PAL1E         2A      LDL_L         36        FBGEB         1F      PAL1F         2B      LDQ_L         37        FBGTB         20      LDF           2C      STL           38        BLBCA         21      LDG           2D      STQ           39        BEQ A         22      LDS           2E      STL_C         3A        BLTPA         23      LDT           2F      STQ_C         3B        BLE B         24      STF           30      BR            3C        BLBSA         25      STG           31      FBEQ          3D        BNE A         26      STS           32      FBLT          3E        BGEPA         27      STT           33      FBLE          3F        BGT )         28      LDL           34      BSR I         29______LDQ___________35______FBNE_______________________________             I                      MACRO-64 Alpha AXP Architecture Quick Reference A-13                    +     A.7 OpenVMS PALcode Instruction Summary   :           Table A-7 lists the OpenVMS unprivileged PALcodeA           instructions and Table A-8 lists the OpenVMS privilegedr           PALcode instructions.   E     Table_A-7_OpenVMS_Unprivileged_PALcode_Instructions______________   E     Mnemonic______Opcode____Description______________________________   ?     AMOVRM        00.00A1   Atomic move from register to memoryPA     AMOVRR        00.00A0   Atomic move from register to register &     BPT           00.0080   Breakpoint$     BUGCHK        00.0081   Bugcheck1     CHMK          00.0083   Change mode to kernel 4     CHME          00.0082   Change mode to executive5     CHMS          00.0084   Change mode to supervisor /     CHMU          00.0085   Change mode to user52     GENTRAP       00.00AA   Generate software trap3     IMB           00.0086   I-stream memory barrier2>     INSQHIL       00.0087   Insert into longword queue at head'                             interlocked0>     INSQHILR      00.00A2   Insert into longword queue at head0                             interlocked resident>     INSQHIQ       00.0089   Insert into quadword queue at head'                             interlocked2>     INSQHIQR      00.00A4   Insert into quadword queue at head0                             interlocked resident>     INSQTIL       00.0088   Insert into longword queue at tail'                             interlocked5>     INSQTILR      00.00A3   Insert into longword queue at tail0                             interlocked resident>     INSQTIQ       00.008A   Insert into quadword queue at tail'                             interlocked >     INSQTIQR      00.00A5   Insert into quadword queue at tail0                             interlocked resident<     INSQUEL       00.008B   Insert entry into longword queueE     INSQUEL/D     00.008D   Insert entry into longword queue deferred <     INSQUEQ       00.008C   Insert entry into quadword queueE     INSQUEQ/D     00.008E   Insert entry into quadword queue deferred31     PROBER        00.008F   Probe for read accessV  E                                              (continued on next page)     8     A-14 MACRO-64 Alpha AXP Architecture Quick Reference                   I         Table_A-7_(Cont.)_OpenVMS_Unprivileged_PALcode_Instructions______X  I         Mnemonic______Opcode____Description______________________________   6         PROBEW        00.0090   Probe for write access5         RD_PS         00.0091   Move processor status 3         READ_UNQ      00.009E   Read unique context B         REI           00.0092   Return from exception or interruptB         REMQHIL       00.0093   Remove from longword queue at head+                                 interlocked B         REMQHILR      00.00A6   Remove from longword queue at head4                                 interlocked residentB         REMQHIQ       00.0095   Remove from quadword queue at head+                                 interlocked B         REMQHIQR      00.00A8   Remove from quadword queue at head4                                 interlocked residentB         REMQTIL       00.0094   Remove from longword queue at tail+                                 interlocked B         REMQTILR      00.00A7   Remove from longword queue at tail4                                 interlocked residentB         REMQTIQ       00.0096   Remove from quadword queue at tail+                                 interlocked B         REMQTIQR      00.00A9   Remove from quadword queue at tail4                                 interlocked resident@         REMQUEL       00.0097   Remove entry from longword queueI         REMQUEL/D     00.0099   Remove entry from longword queue deferred1@         REMQUEQ       00.0098   Remove entry from quadword queueI         REMQUEQ/D     00.009A   Remove entry from quadword queue deferredI9         RSCC          00.009D   Read system cycle counter @         SWASTEN       00.009B   Swap AST enable for current mode4         WRITE_UNQ     00.009F   Write unique contextI         WR_PS_SW______00.009C___Write_processor_status_software_field____   I         Table_A-8_OpenVMS_Privileged_PALcode_Instructions________________7  I         Mnemonic_________Opcode____Description___________________________T  .         CFLUSH           00.0001   Cache flush2         CSERVE           00.0009   Console service/         DRAINA           00.0002   Drain aborts 1         HALT             00.0000   Halt processor   I                                                  (continued on next page)     I                      MACRO-64 Alpha AXP Architecture Quick Reference A-150 D  S              E     Table_A-8_(Cont.)_OpenVMS_Privileged_PALcode_Instructions________   E     Mnemonic_________Opcode____Description___________________________   5     LDQP             00.0003   Load quadword physical ?     MFPR_ASN         00.0006   Move from processor register ASN ?     MFPR_ESP         00.001E   Move from processor register ESP ?     MFPR_FEN         00.000B   Move from processor register FEND?     MFPR_IPL         00.000E   Move from processor register IPL @     MFPR_MCES        00.0010   Move from processor register MCES@     MFPR_PCBB        00.0012   Move from processor register PCBB@     MFPR_PRBR        00.0013   Move from processor register PRBR@     MFPR_PTBR        00.0015   Move from processor register PTBR@     MFPR_SCBB        00.0016   Move from processor register SCBB@     MFPR_SISR        00.0019   Move from processor register SISR?     MFPR_SSP         00.0020   Move from processor register SSP A     MFPR_TBCHK       00.001A   Move from processor register TBCHKe?     MFPR_USP         00.0022   Move from processor register USP_@     MFPR_VPTB        00.0029   Move from processor register VPTBA     MFPR_WHAMI       00.003F   Move from processor register WHAMI ?     MTPR_ASTEN       00.0026   Move to processor register ASTENC?     MTPR_ASTSR       00.0027   Move to processor register ASTSR ?     MTPR_DATFX       00.002E   Move to processor register DATFX =     MTPR_ESP         00.001F   Move to processor register ESP =     MTPR_FEN         00.000B   Move to processor register FEN >     MTPR_IPIR        00.000D   Move to processor register IPRI=     MTPR_IPL         00.000E   Move to processor register IPL >     MTPR_MCES        00.0011   Move to processor register MCESA     MTPR_PERFMON     00.002B   Move to processor register PERFMON >     MTPR_PRBR        00.0014   Move to processor register PRBR>     MTPR_SCBB        00.0017   Move to processor register SCBB>     MTPR_SIRR        00.0018   Move to processor register SIRR=     MTPR_SSP         00.0021   Move to processor register SSP >     MTPR_TBIA        00.001B   Move to processor register TBIA?     MTPR_TBIAP       00.001C   Move to processor register TBIAP6>     MTPR_TBIS        00.001D   Move to processor register TBIS?     MTPR_TBISD       00.0024   Move to processor register TBISD1?     MTPR_TBISI       00.0025   Move to processor register TBISI   E                                              (continued on next page)           8     A-16 MACRO-64 Alpha AXP Architecture Quick Reference 4                 I         Table_A-8_(Cont.)_OpenVMS_Privileged_PALcode_Instructions________   I         Mnemonic_________Opcode____Description___________________________1  A         MTPR_USP         00.0023   Move to processor register USP B         MTPR_VPTB        00.002A   Move to processor register VPTB:         STQP             00.0004   Store quadword physical:         SWPCTX           00.0005   Swap privileged contextI         SWPPAL___________00.000A___Swap_PALcode_image____________________A  .         A.8 PALcode Opcodes in Numerical Order  E               Table A-9 lists the PALcode opcodes in numerical order.   I         Table_A-9_PALcode_Opcodes_in_Numerical_Order_____________________   I         Opcode(16)Opcode(10)OpenVMS______________________________________             00.0000   00.0000   HALT"         00.0001   00.0001   CFLUSH"         00.0002   00.0002   DRAINA          00.0003   00.0003   LDQP          00.0004   00.0004   STQP"         00.0005   00.0005   SWPCTX$         00.0006   00.0006   MFPR_ASN&         00.0007   00.0007   MTPR_ASTEN&         00.0008   00.0008   MTPR_ASTSR"         00.0009   00.0009   CSERVE"         00.000A   00.0010   SWPPAL$         00.000B   00.0011   MFPR_FEN$         00.000C   00.0012   MTPR_FEN%         00.000D   00.0013   MTPR_IPIR $         00.000E   00.0014   MFPR_IPL$         00.000F   00.0015   MTPR_IPL%         00.0010   00.0016   MFPR_MCES %         00.0011   00.0017   MTPR_MCES %         00.0012   00.0018   MFPR_PCBBG%         00.0013   00.0019   MFPR_PRBR %         00.0014   00.0020   MTPR_PRBR %         00.0015   00.0021   MFPR_PTBR %         00.0016   00.0022   MFPR_SCBB/  I                                                  (continued on next page)     I                      MACRO-64 Alpha AXP Architecture Quick Reference A-17T                   E     Table_A-9_(Cont.)_PALcode_Opcodes_in_Numerical_Order_____________C  E     Opcode(16)Opcode(10)OpenVMS______________________________________   !     00.0017   00.0023   MTPR_SCBBn!     00.0018   00.0024   MTPR_SIRR0!     00.0019   00.0025   MFPR_SISR "     00.001A   00.0026   MFPR_TBCHK!     00.001B   00.0027   MTPR_TBIA "     00.001C   00.0028   MTPR_TBIAP!     00.001D   00.0029   MTPR_TBIS       00.001E   00.0030   MFPR_ESP      00.001F   00.0031   MTPR_ESP      00.0020   00.0032   MFPR_SSP      00.0021   00.0033   MTPR_SSP      00.0022   00.0034   MFPR_USP      00.0023   00.0035   MTPR_USP"     00.0024   00.0036   MTPR_TBISD"     00.0025   00.0037   MTPR_TBISI"     00.0026   00.0038   MFPR_ASTEN"     00.0027   00.0039   MFPR_ASTSR!     00.0029   00.0040   MFPR_VPTB3!     00.002A   00.0041   MTPR_VPTB $     00.002B   00.0042   MTPR_PERFMON"     00.002E   00.0043   MTPR_DATFX"     00.003F   00.0063   MFPR_WHAMI     00.0080   00.0128   BPT      00.0081   00.0129   BUGCHK     00.0082   00.0130   CHME     00.0083   00.0131   CHMK     00.0084   00.0132   CHMS     00.0085   00.0133   CHMU     00.0086   00.0134   IMBD     00.0087   00.0135   INSQHIL      00.0088   00.0136   INSQTIL      00.0089   00.0137   INSQHIQ      00.008A   00.0138   INSQTIQ      00.008B   00.0139   INSQUEL      00.008C   00.0140   INSQUEQ !     00.008D   00.0141   INSQUEL/D !     00.008E   00.0142   INSQUEQ/D/  E                                              (continued on next page)     8     A-18 MACRO-64 Alpha AXP Architecture Quick Reference                   I         Table_A-9_(Cont.)_PALcode_Opcodes_in_Numerical_Order_____________   I         Opcode(16)Opcode(10)OpenVMS______________________________________0  "         00.008F   00.0143   PROBER"         00.0090   00.0144   PROBEW!         00.0091   00.0145   RD_PS          00.0092   00.0146   REIn#         00.0093   00.0147   REMQHIL #         00.0094   00.0148   REMQTILi#         00.0095   00.0149   REMQHIQ #         00.0096   00.0150   REMQTIQi#         00.0097   00.0151   REMQUEL #         00.0098   00.0152   REMQUEQ_%         00.0099   00.0153   REMQUEL/D %         00.009A   00.0154   REMQUEQ/DD#         00.009B   00.0155   SWASTEN $         00.009C   00.0156   WR_PS_SW          00.009D   00.0157   RSCC$         00.009E   00.0158   READ_UNQ%         00.009F   00.0159   WRITE_UNQ "         00.00A0   00.0160   AMOVRR"         00.00A1   00.0161   AMOVRM$         00.00A2   00.0162   INSQHILR$         00.00A3   00.0163   INSQTILR$         00.00A4   00.0164   INSQHIQR$         00.00A5   00.0165   INSQTIQR$         00.00A6   00.0166   REMQHILR$         00.00A7   00.0167   REMQTILR$         00.00A8   00.0168   REMQHIQR$         00.00A9   00.0169   REMQTIQRI         00.00AA___00.0170___GENTRAP______________________________________3  ,         A.9 Common Architecture Instructions  D               Table A-10 lists the common architecture instructions.G               Where enclosed in square brackets, Ra.wq defaults to R31. <               This occurs for instructions BR, JMP, and RET.              I                      MACRO-64 Alpha AXP Architecture Quick Reference A-19     S              E     Table_A-10_Common_Architecture_Instructions______________________   E     Mnemonic________Code____Operands______________Operation__________   A     ADDF            15.080  Fa.rf,Fb.rf,Fc.wf     Fc< - Fav + Fbv      ADDF/C          15.000     ADDF/S          15.480     ADDF/SC         15.400     ADDF/SUC        15.500     ADDF/SU         15.580     ADDF/U          15.180     ADDF/UC         15.100A     ADDG            15.0A0  Fa.rg,Fb.rg,Fc.wg     Fc< - Fav + Fbv      ADDG/C          15.020     ADDG/S          15.4A0     ADDG/SC         15.420     ADDG/SU         15.5A0     ADDG/SUC        15.520     ADDG/U          15.1A0     ADDG/UC         15.120C     ADDL            10.00   Ra.rl,{Rb.rl          Rc< - SEXT((Rav + =                             /#b.ib},Rc.wq         Rbv)<31:0>)3     ADDL/V          10.40FA     ADDQ            10.20   Ra.rq,{Rb.rq          Rc< - Rav + Rbv )                             /#b.ib},Rc.wqC     ADDQ/V          10.60 A     ADDS            16.080  Fa.rs,Fb.rs,Fc.ws     Fc< - Fav + Fbv      ADDS/C          16.000     ADDS/D          16.0C0     ADDS/M          16.040     ADDS/SU         16.580     ADDS/SUC        16.500     ADDS/SUD        16.5C0     ADDS/SUI        16.780     ADDS/SUIC       16.700     ADDS/SUID       16.7C0     ADDS/SUIM       16.740     ADDS/SUM        16.540     ADDS/U          16.180     ADDS/UC         16.100     ADDS/UD         16.1C0  E                                              (continued on next page)n    8     A-20 MACRO-64 Alpha AXP Architecture Quick Reference e  r              I         Table_A-10_(Cont.)_Common_Architecture_Instructions______________o  I         Mnemonic________Code____Operands______________Operation__________1           ADDS/UM         16.140E         ADDT            16.0A0  Fa.rt,Fb.rt,Fc.wt     Fc< - Fav + Fbv          ADDT/C          16.020         ADDT/D          16.0E0         ADDT/M          16.060         ADDT/SU         16.5A0         ADDT/SUC        16.520         ADDT/SUD        16.5E0         ADDT/SUI        16.7A0         ADDT/SUIC       16.720         ADDT/SUID       16.7E0         ADDT/SUIM       16.760         ADDT/SUM        16.560         ADDT/U          16.1A0         ADDT/UC         16.120         ADDT/UD         16.1E0         ADDT/UM         16.160G         AND             11.00   Ra.rq,{Rb.rq          Rc< - Rav AND Rbv -                                 /#b.ib},Rc.wq5@         BEQ             39      Ra.rq,disp.al         If Rav = 0E                                                       Then PC< - PC + D                                                       {4*SEXT(disp)}@         BGE             3E      Ra.rq,disp.al         If Rav   0E                                                       Then PC< - PC +TD                                                       {4*SEXT(disp)}@         BGT             3F      Ra.rq,disp.al         If Rav > 0E                                                       Then PC< - PC + D                                                       {4*SEXT(disp)}H         BIC             11.08   Ra.rq,{Rb.rq          Rc< - Rav AND {NOT:                                 /#b.ib},Rc.wq         Rbv}F         BIS             11.20   Ra.rq,{Rb.rq          Rc< - Rav OR Rbv-                                 /#b.ib},Rc.wqBC         BLBC            38      Ra.rq,disp.al         If Rav<0> = 0TE                                                       Then PC< - PC + D                                                       {4*SEXT(disp)}  I                                                  (continued on next page)         I                      MACRO-64 Alpha AXP Architecture Quick Reference A-21                    E     Table_A-10_(Cont.)_Common_Architecture_Instructions______________   E     Mnemonic________Code____Operands______________Operation__________   ?     BLBS            3C      Ra.rq,disp.al         If Rav<0> = 1 A                                                   Then PC< - PC +D@                                                   {4*SEXT(disp)}<     BLE             3B      Ra.rq,disp.al         If Rav   0A                                                   Then PC< - PC +t@                                                   {4*SEXT(disp)}<     BLT             3A      Ra.rq,disp.al         If Rav < 0A                                                   Then PC< - PC +-@                                                   {4*SEXT(disp)}=     BNE             3D      Ra.rq,disp.al         If Rav /= 0_A                                                   Then PC< - PC +r@                                                   {4*SEXT(disp)}F     BR              30      [Ra.wq],disp.al       Ra< - PC; PC< - PC +@                                                   {4*SEXT(disp)}F     BSR             34      Ra.wq,disp.al         Ra< - PC; PC< - PC +@                                                   {4*SEXT(disp)}A     CALL_PAL        00      fnc.ir                Trap to PALcoderA     CMOVEQ          11.24   Ra.rq,{Rb.rq          If Rav = 0 ThenI;                             /#b.ib},Rc.wq         Rc< - Rbv A     CMOVGE          11.46   Ra.rq,{Rb.rq          If Rav   0 Thent;                             /#b.ib},Rc.wq         Rc< - RbveA     CMOVGT          11.66   Ra.rq,{Rb.rq          If Rav > 0 Thenq;                             /#b.ib},Rc.wq         Rc< - RbvND     CMOVLBC         11.16   Ra.rq,{Rb.rq          If Rav<0> = 0 Then;                             /#b.ib},Rc.wq         Rc< - Rbv8D     CMOVLBS         11.14   Ra.rq,{Rb.rq          If Rav<0> = 1 Then;                             /#b.ib},Rc.wq         Rc< - RbvqA     CMOVLE          11.64   Ra.rq,{Rb.rq          If Rav   0 Then ;                             /#b.ib},Rc.wq         Rc< - Rbv A     CMOVLT          11.44   Ra.rq,{Rb.rq          If Rav < 0 Then ;                             /#b.ib},Rc.wq         Rc< - Rbv B     CMOVNE          11.26   Ra.rq,{Rb.rq          If Rav /= 0 Then;                             /#b.ib},Rc.wq         Rc< - Rbvt@     CMPBGE          10.0F   Ra.rq,{Rb.rq          Rc< - BytewiseA                             /#b.ib},Rc.wq         compare mask oft=                                                   {Rav   Rbv}o  E                                              (continued on next page)       8     A-22 MACRO-64 Alpha AXP Architecture Quick Reference R  r              I         Table_A-10_(Cont.)_Common_Architecture_Instructions______________c  I         Mnemonic________Code____Operands______________Operation___________  G         CMPEQ           10.2D   Ra.rq,{Rb.rq          If Rav = Rbv Then J                                 /#b.ib},Rc.wq         Rc< - 1 Else Rc< - 0G         CMPGEQ          15.0A5  Fa.rg,Fb.rg,Fc.wq     If Fav = Fbv Then D                                                       Fc< - 0.5 Else?                                                       Fc< - 0.0          CMPGEQ/S        15.4A5G         CMPGLE          15.0A7  Fa.rg,Fb.rg,Fc.wq     If Fav   Fbv TheneD                                                       Fc< - 0.5 Else?                                                       Fc< - 0.0          CMPGLE/S        15.4A7G         CMPGLT          15.0A6  Fa.rg,Fb.rg,Fc.wq     If Fav < Fbv TheneD                                                       Fc< - 0.5 Else?                                                       Fc< - 0.0E         CMPGLT/S        15.4A6G         CMPLE           10.6D   Ra.rq,{Rb.rq          If Rav   Rbv TheniJ                                 /#b.ib},Rc.wq         Rc< - 1 Else Rc< - 0G         CMPLT           10.4D   Ra.rq,{Rb.rq          If Rav < Rbv Then J                                 /#b.ib},Rc.wq         Rc< - 1 Else Rc< - 0G         CMPTEQ          16.0A5  Fa.rt,Fb.rt,Fc.wq     If Fav = Fbv ThendD                                                       Fc< - 2.0 Else?                                                       Fc< - 0.0u         CMPTEQ/SU       16.5A5G         CMPTLE          16.0A7  Fa.rt,Fb.rt,Fc.wq     If Fav   Fbv Then D                                                       Fc< - 2.0 Else?                                                       Fc< - 0.00         CMPTLE/SU       16.5A7G         CMPTLT          16.0A6  Fa.rt,Fb.rt,Fc.wq     If Fav < Fbv Then D                                                       Fc< - 2.0 Else?                                                       Fc< - 0.0_         CMPTLT/SU       16.5A6F         CMPTUN          16.0A4  Fa.rt,Fb.rt,Fc.wq     If Fav UnorderedH                                                       Fbv Then Fc< - 2.0D                                                       Else Fc< - 0.0         CMPTUN/SU       16.5A4H         CMPULE          10.3D   Ra.rq,{Rb.rq          If Rav U  Rbv ThenJ                                 /#b.ib},Rc.wq         Rc< - 1 Else Rc< - 0  I                                                  (continued on next page)D      I                      MACRO-64 Alpha AXP Architecture Quick Reference A-23d d  y              E     Table_A-10_(Cont.)_Common_Architecture_Instructions______________P  E     Mnemonic________Code____Operands______________Operation__________   D     CMPULT          10.1D   Ra.rq,{Rb.rq          If Rav U< Rbv ThenF                             /#b.ib},Rc.wq         Rc< - 1 Else Rc< - 0B     CPYS            17.020  Fa.rq,Fb.rq,Fc.wq     Fc< - Fav<63> ||;                                                   Fbv<62:0> E     CPYSE           17.022  Fa.rq,Fb.rq,Fc.wq     Fc< - Fav<63:52> || ;                                                   Fbv<51:0>MC     CPYSN           17.021  Fa.rq,Fb.rq,Fc.wq     Fc< - NOT Fav<63> >                                                   || Fbv<62:0>B     CVTDG           15.09E  Fb.rd,Fc.wg           Fc< - D_Float to@                                                   G_Float of Fbv     CVTDG/C         15.01E     CVTDG/S         15.49E     CVTDG/SC        15.41E     CVTDG/SU        15.59E     CVTDG/SUC       15.51E     CVTDG/U         15.19E     CVTDG/UC        15.11EB     CVTGD           15.0AD  Fb.rg,Fc.wd           Fc< - G_Float to@                                                   D_Float of Fbv     CVTGD/C         15.02D     CVTGD/S         15.4AD     CVTGD/SC        15.42D     CVTGD/SU        15.5AD     CVTGD/SUC       15.52D     CVTGD/U         15.1AD     CVTGD/UC        15.12DB     CVTGF           15.0AC  Fb.rg,Fc.wf           Fc< - G_Float to@                                                   F_Float of Fbv     CVTGF/C         15.02C     CVTGF/S         15.4AC     CVTGF/SC        15.42C     CVTGF/SU        15.5AC     CVTGF/SUC       15.52C     CVTGF/U         15.1AC     CVTGF/UC        15.12CB     CVTGQ           15.0AF  Fb.rg,Fc.wq           Fc< - G_Float to=                                                   quad of Fbve  E                                              (continued on next page)s    8     A-24 MACRO-64 Alpha AXP Architecture Quick Reference e  B              I         Table_A-10_(Cont.)_Common_Architecture_Instructions______________   I         Mnemonic________Code____Operands______________Operation__________M           CVTGQ/C         15.02F         CVTGQ/S         15.4AF         CVTGQ/SC        15.42F         CVTGQ/SV        15.5AF         CVTGQ/SVC       15.52F         CVTGQ/V         15.1AF         CVTGQ/VC        15.12FX         CVTLQ           17.010  Fb.rl,Fc.wq           Fc< - SEXT(Fbv<63:62>||Fbv<58:29>)F         CVTQF           15.0BC  Fb.rq,Fc.wf           Fc< - Quad to F_B                                                       Float of Fbv         CVTQF/C         15.03CF         CVTQG           15.0BE  Fb.rq,Fc.wg           Fc< - Quad to G_B                                                       Float of Fbv         CVTQG/C         15.03EH         CVTQL           17.030  Fb.rq,Fc.wl           Fc< - Quad to long<                                                       of Fbv         CVTQL/SV        17.530         CVTQL/V         17.130F         CVTQS           16.0BC  Fb.rq,Fc.ws           Fc< - Quad to S_B                                                       Float of Fbv         CVTQS/C         16.03C         CVTQS/D         16.0FC         CVTQS/M         16.07C         CVTQS/SUI       16.7BC         CVTQS/SUIC      16.73C         CVTQS/SUID      16.7FC         CVTQS/SUIM      16.77CF         CVTQT           16.0BE  Fb.rq,Fc.wt           Fc< - Quad to T_B                                                       Float of Fbv         CVTQT/C         16.03E         CVTQT/D         16.0FE         CVTQT/M         16.07E         CVTQT/SUI       16.7BE         CVTQT/SUIC      16.73E         CVTQT/SUID      16.7FE         CVTQT/SUIM      16.77E  I                                                  (continued on next page)       I                      MACRO-64 Alpha AXP Architecture Quick Reference A-25  R  B              E     Table_A-10_(Cont.)_Common_Architecture_Instructions______________   E     Mnemonic________Code____Operands______________Operation__________   B     CVTST           16.2AC  Fb.rs,Fc.wt           Fc< - S_Float to@                                                   T_Float of Fbv     CVTST/S         16.6ACB     CVTTQ           16.0AF  Fb.rt,Fc.wq           Fc< - T_Float to=                                                   quad of Fbv0     CVTTQ/C         16.02F     CVTTQ/D         16.0EF     CVTTQ/M         16.06F     CVTTQ/SV        16.5AF     CVTTQ/SVC       16.52F     CVTTQ/SVD       16.5EF     CVTTQ/SVI       16.7AF     CVTTQ/SVIC      16.72F     CVTTQ/SVID      16.7EF     CVTTQ/SVIM      16.76F     CVTTQ/SVM       16.56F     CVTTQ/V         16.1AF     CVTTQ/VC        16.12F     CVTTQ/VD        16.1EF     CVTTQ/VM        16.16FB     CVTTS           16.0AC  Fb.rt,Fc.ws           Fc< - T_Float to@                                                   S_Float of Fbv     CVTTS/C         16.02C     CVTTS/D         16.0EC     CVTTS/M         16.06C     CVTTS/SU        16.5AC     CVTTS/SUC       16.52C     CVTTS/SUD       16.5EC     CVTTS/SUI       16.7AC     CVTTS/SUIC      16.72C     CVTTS/SUID      16.7EC     CVTTS/SUIM      16.76C     CVTTS/SUM       16.56C     CVTTS/U         16.1AC     CVTTS/UC        16.12C     CVTTS/UD        16.1EC     CVTTS/UM        16.16C  E                                              (continued on next page)I    8     A-26 MACRO-64 Alpha AXP Architecture Quick Reference Q                 I         Table_A-10_(Cont.)_Common_Architecture_Instructions______________0  I         Mnemonic________Code____Operands______________Operation__________n  E         DIVF            15.083  Fa.rf,Fb.rf,Fc.wf     Fc< - Fav / Fbve         DIVF/C          15.003         DIVF/S          15.483         DIVF/SC         15.403         DIVF/SU         15.583         DIVF/SUC        15.503         DIVF/U          15.183         DIVF/UC         15.103E         DIVG            15.0A3  Fa.rg,Fb.rg,Fc.wg     Fc< - Fav / Fbv          DIVG/C          15.023         DIVG/S          15.4A3         DIVG/SC         15.423         DIVG/SU         15.5A3         DIVG/SUC        15.523         DIVG/U          15.1A3         DIVG/UC         15.123E         DIVS            16.083  Fa.rs,Fb.rs,Fc.ws     Fc< - Fav / Fbv          DIVS/C          16.003         DIVS/D          16.0C3         DIVS/M          16.043         DIVS/SU         16.583         DIVS/SUC        16.503         DIVS/SUD        16.5C3         DIVS/SUI        16.783         DIVS/SUIC       16.703         DIVS/SUID       16.7C3         DIVS/SUIM       16.743         DIVS/SUM        16.543         DIVS/U          16.183         DIVS/UC         16.103         DIVS/UD         16.1C3         DIVS/UM         16.143E         DIVT            16.0A3  Fa.rt,Fb.rt,Fc.wt     Fc< - Fav / Fbv          DIVT/C          16.023         DIVT/D          16.0E3         DIVT/M          16.063         DIVT/SU         16.5A3  I                                                  (continued on next page)s    I                      MACRO-64 Alpha AXP Architecture Quick Reference A-27b k  ,              E     Table_A-10_(Cont.)_Common_Architecture_Instructions______________.  E     Mnemonic________Code____Operands______________Operation__________k       DIVT/SUC        16.523     DIVT/SUD        16.5E3     DIVT/SUI        16.7A3     DIVT/SUIC       16.723     DIVT/SUID       16.7E3     DIVT/SUIM       16.763     DIVT/SUM        16.563     DIVT/U          16.1A3     DIVT/UC         16.123     DIVT/UD         16.1E3     DIVT/UM         16.163D     EQV             11.48   Ra.rq,{Rb.rq          Rc< - Rav XOR {NOT6                             /#b.ib},Rc.wq         Rbv}C     EXCB            18.0400                       Exception barrier D     EXTBL           12.06   Ra.rq,{Rb.rq          Rc< - Byte extractA                             /#b.ib},Rc.wq         low from Rav atC:                                                   Rbv<2:0>D     EXTLH           12.6A   Ra.rq,{Rb.rq          Rc< - Long extractB                             /#b.ib},Rc.wq         high from Rav at:                                                   Rbv<2:0>D     EXTLL           12.26   Ra.rq,{Rb.rq          Rc< - Long extractA                             /#b.ib},Rc.wq         low from Rav at6:                                                   Rbv<2:0>D     EXTQH           12.7A   Ra.rq,{Rb.rq          Rc< - Quad extractB                             /#b.ib},Rc.wq         high from Rav at:                                                   Rbv<2:0>D     EXTQL           12.36   Ra.rq,{Rb.rq          Rc< - Quad extractA                             /#b.ib},Rc.wq         low from Rav at :                                                   Rbv<2:0>D     EXTWH           12.5A   Ra.rq,{Rb.rq          Rc< - Word extractB                             /#b.ib},Rc.wq         high from Rav at:                                                   Rbv<2:0>D     EXTWL           12.16   Ra.rq,{Rb.rq          Rc< - Word extractA                             /#b.ib},Rc.wq         low from Rav at :                                                   Rbv<2:0>  E                                              (continued on next page)         8     A-28 MACRO-64 Alpha AXP Architecture Quick Reference T  C              I         Table_A-10_(Cont.)_Common_Architecture_Instructions______________D  I         Mnemonic________Code____Operands______________Operation__________   @         FBEQ            31      Fa.rq,disp.al         If Fav = 0E                                                       Then PC< - PC + D                                                       {4*SEXT(disp)}@         FBGE            36      Fa.rq,disp.al         If Fav   0E                                                       Then PC< - PC +RD                                                       {4*SEXT(disp)}@         FBGT            37      Fa.rq,disp.al         If Fav > 0E                                                       Then PC< - PC +RD                                                       {4*SEXT(disp)}@         FBLE            33      Fa.rq,disp.al         If Fav   0E                                                       Then PC< - PC +RD                                                       {4*SEXT(disp)}@         FBLT            32      Fa.rq,disp.al         If Fav < 0E                                                       Then PC< - PC + D                                                       {4*SEXT(disp)}A         FBNE            35      Fa.rq,disp.al         If Fav /= 0aE                                                       Then PC< - PC + D                                                       {4*SEXT(disp)}E         FCMOVEQ         17.02A  Fa.rq,Fb.rq,Fc.wq     If Fav = 0 Then ?                                                       Fc< - Fbv E         FCMOVGE         17.02D  Fa.rq,Fb.rq,Fc.wq     If Fav   0 Then ?                                                       Fc< - FbvfE         FCMOVGT         17.02F  Fa.rq,Fb.rq,Fc.wq     If Fav > 0 Thent?                                                       Fc< - Fbv_E         FCMOVLE         17.02E  Fa.rq,Fb.rq,Fc.wq     If Fav   0 Then ?                                                       Fc< - Fbv E         FCMOVLT         17.02C  Fa.rq,Fb.rq,Fc.wq     If Fav < 0 Then ?                                                       Fc< - FbvaF         FCMOVNE         17.02B  Fa.rq,Fb.rq,Fc.wq     If Fav /= 0 Then?                                                       Fc< - Fbv E         FETCH           18.8000 0(Rb.ab)              Prefetch around ;                                                       (Rbv) E         FETCH_M         18.A000 0(Rb.ab)              Prefetch around C                                                       (Rbv), modifyf<                                                       intent  I                                                  (continued on next page)i        I                      MACRO-64 Alpha AXP Architecture Quick Reference A-29                    E     Table_A-10_(Cont.)_Common_Architecture_Instructions______________,  E     Mnemonic________Code____Operands______________Operation__________   C     INSBL           12.0B   Ra.rq,{Rb.rq          Rc< - Byte insert A                             /#b.iq},Rc.wq         low from Rav at :                                                   Rbv<2:0>C     INSLH           12.67   Ra.rq,{Rb.rq          Rc< - Long insert B                             /#b.iq},Rc.wq         high from Rav at:                                                   Rbv<2:0>C     INSLL           12.2B   Ra.rq,{Rb.rq          Rc< - Long insert A                             /#b.iq},Rc.wq         low from Rav at :                                                   Rbv<2:0>C     INSQH           12.77   Ra.rq,{Rb.rq          Rc< - Quad insert B                             /#b.iq},Rc.wq         high from Rav at:                                                   Rbv<2:0>C     INSQL           12.3B   Ra.rq,{Rb.rq          Rc< - Quad insert A                             /#b.iq},Rc.wq         low from Rav at :                                                   Rbv<2:0>C     INSWH           12.57   Ra.rq,{Rb.rq          Rc< - Word insert B                             /#b.iq},Rc.wq         high from Rav at:                                                   Rbv<2:0>C     INSWL           12.1B   Ra.rq,{Rb.rq          Rc< - Word insertoA                             /#b.iq},Rc.wq         low from Rav atR:                                                   Rbv<2:0>E     JMP             1A.0    [Ra.wq],(Rb.ab),hint  Ra< - PC; PC< - Rbve=                                                   AND {NOT 3}tE     JSR             1A.1    Ra.wq,(Rb.ab),hint    Ra< - PC; PC< - Rbv_=                                                   AND {NOT 3} E     JSR_COROUTINE   1A.3    Ra.wq,(Rb.ab),hint    Ra< - PC; PC< - Rbv =                                                   AND {NOT 3}e=     LDA             08      Ra.wq,disp.ab(Rb.ab)  Ra< - Rbv + <                                                   SEXT(disp)=     LDAH            09      Ra.wq,disp.ab(Rb.ab)  Ra< - Rbv + B                                                   SEXT(disp*65536)?     LDF             20      Fa.wf,disp.ab(Rb.ab)  Fa< - ({Rbv +e>                                                   SEXT(disp)})?     LDG             21      Fa.wg,disp.ab(Rb.ab)  Fa< - ({Rbv + >                                                   SEXT(disp)})D     LDL             28      Ra.wq,disp.ab(Rb.ab)  Ra< - SEXT(({Rbv +E                                                   SEXT(disp)})<31:0>)   E                                              (continued on next page)6    8     A-30 MACRO-64 Alpha AXP Architecture Quick Reference R  T              I         Table_A-10_(Cont.)_Common_Architecture_Instructions______________   I         Mnemonic________Code____Operands______________Operation__________   H         LDL_L           2A      Ra.wq,disp.ab(Rb.ab)  Ra< - SEXT(({Rbv +I                                                       SEXT(disp)})<31:0>) C         LDQ             29      Ra.wq,disp.ab(Rb.ab)  Ra< - ({Rbv + B                                                       SEXT(disp)})C         LDQ_L           2B      Ra.wq,disp.ab(Rb.ab)  Ra< - ({Rbv + B                                                       SEXT(disp)})D         LDQ_U           0B      Ra.wq,disp.ab(Rb.ab)  Ra< - ({{Rbv +I                                                       SEXT(disp)} AND NOT69                                                       7}) C         LDS             22      Fa.ws,disp.ab(Rb.ab)  Fa< - ({Rbv + B                                                       SEXT(disp)})C         LDT             23      Fa.wt,disp.ab(Rb.ab)  Fa< - ({Rbv + B                                                       SEXT(disp)})D         MB              18.4000                       Memory barrier@         MF_FPCR         17.025  Fa.rq,Fa.rq,Fa.wq     Fa< - FPCRE         MSKBL           12.02   Ra.rq,{Rb.rq          Rc< - Byte mask E                                 /#b.iq},Rc.wq         low from Rav at >                                                       Rbv<2:0>E         MSKLH           12.62   Ra.rq,{Rb.rq          Rc< - Long maskQF                                 /#b.iq},Rc.wq         high from Rav at>                                                       Rbv<2:0>E         MSKLL           12.22   Ra.rq,{Rb.rq          Rc< - Long mask E                                 /#b.iq},Rc.wq         low from Rav at >                                                       Rbv<2:0>E         MSKQH           12.72   Ra.rq,{Rb.rq          Rc< - Quad mask F                                 /#b.iq},Rc.wq         high from Rav at>                                                       Rbv<2:0>E         MSKQL           12.32   Ra.rq,{Rb.rq          Rc< - Quad mask1E                                 /#b.iq},Rc.wq         low from Rav at >                                                       Rbv<2:0>E         MSKWH           12.52   Ra.rq,{Rb.rq          Rc< - Word mask F                                 /#b.iq},Rc.wq         high from Rav at>                                                       Rbv<2:0>E         MSKWL           12.12   Ra.rq,{Rb.rq          Rc< - Word maskVE                                 /#b.iq},Rc.wq         low from Rav at >                                                       Rbv<2:0>@         MT_FPCR         17.024  Fa.rq,Fa.rq,Fa.wq     FPCR< - Fa  I                                                  (continued on next page)U    I                      MACRO-64 Alpha AXP Architecture Quick Reference A-31G                   E     Table_A-10_(Cont.)_Common_Architecture_Instructions______________   E     Mnemonic________Code____Operands______________Operation__________   A     MULF            15.082  Fa.rf,Fb.rf,Fc.wf     Fc< - Fav * Fbv      MULF/C          15.002     MULF/S          15.482     MULF/SC         15.402     MULF/SU         15.582     MULF/SUC        15.502     MULF/U          15.182     MULF/UC         15.102A     MULG            15.0A2  Fa.rg,Fb.rg,Fc.wg     Fc< - Fav * Fbv(     MULG/C          15.022     MULG/S          15.4A2     MULG/SC         15.422     MULG/SU         15.5A2     MULG/SUC        15.522     MULG/U          15.1A2     MULG/UC         15.122C     MULL            13.00   Ra.rl,{Rb.rl          Rc< - SEXT((Rav * =                             /#b.ib},Rc.wq         Rbv)<31:0>)      MULL/V          13.404A     MULQ            13.20   Ra.rq,{Rb.rq          Rc< - Rav * Rbv )                             /#b.ib},Rc.wqG     MULQ/V          13.60 A     MULS            16.082  Fa.rs,Fb.rs,Fc.ws     Fc< - Fav * Fbv|     MULS/C          16.002     MULS/D          16.0C2     MULS/M          16.042     MULS/SU         16.582     MULS/SUC        16.502     MULS/SUD        16.5C2     MULS/SUI        16.782     MULS/SUIC       16.702     MULS/SUID       16.7C2     MULS/SUIM       16.742     MULS/SUM        16.542     MULS/U          16.182     MULS/UC         16.102     MULS/UD         16.1C2  E                                              (continued on next page)     8     A-32 MACRO-64 Alpha AXP Architecture Quick Reference    V              I         Table_A-10_(Cont.)_Common_Architecture_Instructions______________   I         Mnemonic________Code____Operands______________Operation__________            MULS/UM         16.142E         MULT            16.0A2  Fa.rt,Fb.rt,Fc.wt     Fc< - Fav * FbvU         MULT/C          16.022         MULT/D          16.0E2         MULT/M          16.062         MULT/SU         16.5A2         MULT/SUC        16.522         MULT/SUD        16.5E2         MULT/SUI        16.7A2         MULT/SUIC       16.722         MULT/SUID       16.7E2         MULT/SUIM       16.762         MULT/SUM        16.562         MULT/U          16.1A2         MULT/UC         16.122         MULT/UD         16.1E2         MULT/UM         16.162G         ORNOT           11.28   Ra.rq,{Rb.rq          Rc< - Rav OR {NOT :                                 /#b.ib},Rc.wq         Rbv}F         RC              18.E000 Ra.wq                 Ra< - intr_flag;D                                                       intr_flag< - 0I         RET             1A.2    [Ra.wq],(Rb.ab),hint  Ra< - PC; PC< - RbvCA                                                       AND {NOT 3} I         RPCC            18.C000 Ra.wq                 Ra< - Process cycleT=                                                       counter F         RS              18.F000 Ra.wq                 Ra< - intr_flag;D                                                       intr_flag< - 1N         S4ADDL          10.02   Ra.rl,{Rb.rl          Rc< - SEXT(((SLL(Rav,2))C                                 /#b.ib},Rc.wq         + Rbv)<31:0>)TH         S4ADDQ          10.22   Ra.rq,{Rb.rq          Rc< - SLL(Rav,2) +9                                 /#b.ib},Rc.wq         Rbv N         S4SUBL          10.0B   Ra.rl,{Rb.rl          Rc< - SEXT(((SLL(Rav,2))C                                 /#b.ib},Rc.wq         - Rbv)<31:0>) H         S4SUBQ          10.2B   Ra.rq,{Rb.rq          Rc< - SLL(Rav,2) -9                                 /#b.ib},Rc.wq         RbvUN         S8ADDL          10.12   Ra.rl,{Rb.rl          Rc< - SEXT(((SLL(Rav,3))C                                 /#b.ib},Rc.wq         + Rbv)<31:0>)6  I                                                  (continued on next page)     I                      MACRO-64 Alpha AXP Architecture Quick Reference A-33M                   E     Table_A-10_(Cont.)_Common_Architecture_Instructions______________   E     Mnemonic________Code____Operands______________Operation__________   D     S8ADDQ          10.32   Ra.rq,{Rb.rq          Rc< - SLL(Rav,3) +5                             /#b.ib},Rc.wq         Rbv_J     S8SUBL          10.1B   Ra.rl,{Rb.rl          Rc< - SEXT(((SLL(Rav,3))?                             /#b.ib},Rc.wq         - Rbv)<31:0>) D     S8SUBQ          10.3B   Ra.rq,{Rb.rq          Rc< - SLL(Rav,3) -5                             /#b.ib},Rc.wq         Rbv I     SLL             12.39   Ra.rq,{Rb.rq          Rc< - SLL(Rav,Rvb<5:0>) )                             /#b.ib},Rc.wq I     SRA             12.3C   Ra.rb,{Rb.rq          Rc< - SRA(Rav,Rvb<5:0>)3)                             /#b.ib},Rc.wqII     SRL             12.34   Ra.rq,{Rb.rq          Rc< - SRL(Rav,Rvb<5:0>) )                             /#b.ib},Rc.wq 9     STF             24      Fa.rf,disp.ab(Rb.ab)  ({Rbv +aE                                                   SEXT(disp)})< - Fav39     STG             25      Fa.rg,disp.ab(Rb.ab)  ({Rbv +6E                                                   SEXT(disp)})< - Fav Y     STL             2C      Ra.rl,disp.ab(Rb.ab)  ({Rbv + SEXT(disp)})<31:0>< - Rav<31:0>3Y     STL_C           2E      Ra.ml,disp.ab(Rb.ab)  ({Rbv + SEXT(disp)})<31:0>< - Rav<31:0>69     STQ             2D      Ra.rq,disp.ab(Rb.ab)  ({Rbv + E                                                   SEXT(disp)})< - Rav39     STQ_C           2F      Ra.mq,disp.ab(Rb.ab)  ({Rbv + E                                                   SEXT(disp)})< - Rav6:     STQ_U           0F      Ra.rq,disp.ab(Rb.ab)  ({{Rbv +A                                                   SEXT(disp)} AND @                                                   NOT 7})< - Rav9     STS             26      Fa.rs,disp.ab(Rb.ab)  ({Rbv +tE                                                   SEXT(disp)})< - Favn9     STT             27      Fa.rt,disp.ab(Rb.ab)  ({Rbv + E                                                   SEXT(disp)})< - FavTA     SUBF            15.081  Fa.rf,Fb.rf,Fc.wf     Fc< - Fav - Fbv      SUBF/C          15.001     SUBF/S          15.481     SUBF/SC         15.401     SUBF/SU         15.581     SUBF/SUC        15.501     SUBF/U          15.181     SUBF/UC         15.101  E                                              (continued on next page)b    8     A-34 MACRO-64 Alpha AXP Architecture Quick Reference a  e              I         Table_A-10_(Cont.)_Common_Architecture_Instructions______________   I         Mnemonic________Code____Operands______________Operation__________   E         SUBG            15.0A1  Fa.rg,Fb.rg,Fc.wg     Fc< - Fav - Fbvq         SUBG/C          15.021         SUBG/S          15.4A1         SUBG/SC         15.421         SUBG/SU         15.5A1         SUBG/SUC        15.521         SUBG/U          15.1A1         SUBG/UC         15.121G         SUBL            10.09   Ra.rl,{Rb.rl          Rc< - SEXT((Rav - A                                 /#b.ib},Rc.wq         Rbv)<31:0>)          SUBL/V          10.49 E         SUBQ            10.29   Ra.rq,{Rb.rq          Rc< - Rav - Rbv -                                 /#b.ib},Rc.wq          SUBQ/V          10.69:E         SUBS            16.081  Fa.rs,Fb.rs,Fc.ws     Fc< - Fav - Fbvt         SUBS/C          16.001         SUBS/D          16.0C1         SUBS/M          16.041         SUBS/SU         16.581         SUBS/SUC        16.501         SUBS/SUD        16.5C1         SUBS/SUI        16.781         SUBS/SUIC       16.701         SUBS/SUID       16.7C1         SUBS/SUIM       16.741         SUBS/SUM        16.541         SUBS/U          16.181         SUBS/UC         16.101         SUBS/UD         16.1C1         SUBS/UM         16.141E         SUBT            16.0A1  Fa.rt,Fb.rt,Fc.wt     Fc< - Fav - Fbv          SUBT/C          16.021         SUBT/D          16.0E1         SUBT/M          16.061         SUBT/SU         16.5A1         SUBT/SUC        16.521         SUBT/SUD        16.5E1  I                                                  (continued on next page)p    I                      MACRO-64 Alpha AXP Architecture Quick Reference A-35F =                 E     Table_A-10_(Cont.)_Common_Architecture_Instructions______________   E     Mnemonic________Code____Operands______________Operation__________        SUBT/SUI        16.7A1     SUBT/SUIC       16.721     SUBT/SUID       16.7E1     SUBT/SUIM       16.761     SUBT/SUM        16.561     SUBT/U          16.1A1     SUBT/UC         16.121     SUBT/UD         16.1E1     SUBT/UM         16.161C     TRAPB           18.0000                       Drain any pending 7                                                   traps ?     UMULH           13.30   Ra.rq,{Rb.rq          Rc< - {Rav *U >                             /#b.ib},Rc.wq         Rbv}<127:64>>     WMB             18.4400                       Write memory9                                                   barrier C     XOR             11.40   Ra.rq,{Rb.rq          Rc< - Rav XOR Rbv )                             /#b.ib},Rc.wq E     ZAP             12.30   Ra.rq,{Rb.rq          Rc< - Zap from Rav, D                             /#b.iq},Rc.wq         byte mask Rbv<7:0>@     ZAPNOT          12.31   Ra.rq,{Rb.rq          Rc< - Zap fromD                             /#b.iq},Rc.wq         Rav, byte mask NOTE     ______________________________________________Rbv<7:0>___________                                       8     A-36 MACRO-64 Alpha AXP Architecture Quick Reference ,  r                    I                                                                         B I         _________________________________________________________________   I                                                 Programming with MACRO-64     I               This appendix contains information to help you program more I               effectively using the MACRO-64 assembly language within theaI               framework of the OpenVMS Calling Standard. It discusses the $               following information:  0               o  Programming hints (Section B.1)  ;               o  The OpenVMS Calling Standard (Section B.2)   C               o  Accessing memory with base registers (Section B.3)t  7               o  Types of data structures (Section B.4)   0               o  Types of routines (Section B.5)  ?               o  Establishing self-addressability (Section B.6)   C               o  Optimization and automatic alignment (Section B.7)   E               For more information on the AXP environment, you should 9               become familiar with the following manuals:M  4               o  Alpha Architecture Reference Manual  )               o  OpenVMS Calling Standardm  '               o  Alpha AXP architecture,  &         B.1 MACRO-64 Programming Hints  D               To assist you in MACRO-64 programming, several example?               programs are placed in the SYS$EXAMPLES directory.@               (SYS$EXAMPLES:MACRO64$*.M64) on your system duringD               installation. In order of increasing complexity, these.               example programs are as follows:  F               o  MACRO64$HELLO.M64-A simple "Hello World" program that:                  demonstrates the calling standard macros.  I                                             Programming with MACRO-64 B-1. ,  w              @           o  MACRO64$WHAMI.M64-A program that displays the WHAMI@              internal processor register and demonstrates making0              system service calls from MACRO-64.  D           o  MACRO64$PI.M64-A program that computes the mathematical=              constant PI to a specified number of digits, and @              demonstrates general MACRO-64 programming concepts,?              optimization techniques, and user-defined register               symbols.   ?           The remainder of this section contains some hints for "           programming in MACRO-64.  &     B.1.1 STARLET.MLB Migration Macros  @           A large number of macros in STARLET.MLB work correctlyD           with MACRO-64. Some of the macros in STARLET.MLB, however,>           generate instruction statements designed exclusivelyA           for use with the macro migration compiler, the MACRO-320A           Compiler for OpenVMS AXP. Because these macros generate E           VAX instructions, they are not suitable for use with MACRO- A           64. If you attempt to use one of these VAX instruction- D           generating macros with MACRO-64, the assembler displays an1           error message similar to the following:   @               Macro XXXXX is not supported for use with MACRO-64  A           MACRO-64 defines corresponding macros by the same names @           in MACRO64.MLB, which prevents a series of potentially;           misleading diagnostics. Because MACRO-64 searches B           MACRO64.MLB before STARLET.MLB, the macro definitions inE           MACRO64.MLB occlude those of the same names in STARLET.MLB.   A           You can still perform the operations with MACRO-64 that,B           these STARLET macros perform. For example, the following?           STARLET macro invocation does not work with MACRO-64:p  2                   $ALLOC_S DEVNAM=OUTPUT_DEV_DESCR  @           However, you can use MACRO-64's $CALL macro instead as           follows:  <                   $CALL SYS$ALLOC, ARGS=<OUTPUT_DEV_DESCR/A>    !     B-2 Programming with MACRO-64T                   C               As with other languages, you can call system services A               from MACRO-64. See Chapter 6 for information on the_?               $CALL macro. Refer to the OpenVMS System Services A               Reference Manual for information on calling OpenVMS B               system services. After installing MACRO-64, refer toE               SYS$EXAMPLES:MACRO64$WHAMI.M64 for an example of how to 1               call system services from MACRO-64.B           B.1.2 Integer Division  B               While the Alpha AXP architecture does not provide anI               instruction for integer division, you can use the OTS$DIV_L+E               and OTS$DIV_I routines to perform quadword and longword F               integer division, respectively. For an example of how toH               use these routines, see the MACRO64$PI.M64 example program,               in the SYS$EXAMPLES directory.  6         B.1.3 User-Defined Register Symbols and Macros  C               The macros described in Chapter 6 accept user-defined B               register symbols in place of the predefined registerA               symbols. When writing your own macros, you may wishaD               to allow for user-defined register symbols as well. ToB               help you do so, the %TYPE() lexical operator returnsC               MACRO64$TYPE_GENREG and MACRO64$TYPE_FLTREG for user- I               defined integer and floating-point registers, respectively.cA               In addition, MACRO-64 supplies you with two lexical -               operators: %IREG() and %FREG().   (         B.2 The OpenVMS Calling Standard  C               All OpenVMS languages supplied by Digital support the I               OpenVMS Calling Standard. With most compiled AXP languages, H               the OpenVMS Calling Standard is invisible to you. However,C               when programming with the MACRO-64 assembly language, C               you are responsible for defining the appropriate data D               structures and using appropriate instruction sequencesI               in order to implement routines that comply with the OpenVMS                Calling Standard.m  G               See Chapter 6 for a description of several library macros <               that are supplied with the MACRO-64 Assembler.      I                                             Programming with MACRO-64 B-3                    >           An important role of the OpenVMS Calling Standard isB           support for debugging, exception handling, and tracebackC           routines. These routines are aided by the OpenVMS Calling C           Standard data structures and conventions to determine the B           current routine and the source of its call. In addition,A           these structures and conventions enable the debugger to A           interpret other information, such as data stored on the             stack or in registers.  C           Again, when programming in MACRO-64 assembly language, it_E           is important that you define the data structures and adhere E           to the conventions defined by the OpenVMS Calling Standard.   E           Example B-1 shows a simple routine, ROUTINE1, that does theU           following:  9           o  Takes a single, longword parameter as input.U  >           o  Calls another function, ROUTINE2, passing its own2              parameter as a parameter to ROUTINE2.  D           o  Adds the return value from ROUTINE2 and the value of anD              external longword, I, storing the result in a register.  D           o  Returns the result of the addition to its caller in R0.  E     B.2.1 Effects on Assembly-Time when Using Calling-Standard Macros   ?           The calling-standard macros provided with MACRO-64 in E           MACRO64.MLB are designed to make programming in conformance#E           with the OpenVMS Calling Standard significantly easier. Seea6           Chapter 6 for a description of these macros.  D           In general, these macros generate a minimum of instructionE           and data-directive statements, the job these macros perform6D           is complex and can involve several thousand lines of macro@           expansion assembly-time statements. When you use theseE           macros you may notice increased assembly time and increasedU@           memory usage at assembly time. Nonetheless, use of theA           calling-standard macros should significantly speed yourt%           program development effort.         !     B-4 Programming with MACRO-64h c  e              .               Example B-1 Routine Call Example  V                       $ROUTINE ROUTINE1, KIND=STACK, SAVED_REGS=<R2,FP>, ARGLIST=<I32>&                       $LINKAGE_SECTIONM                       I_ADDR: .address I              ; Linkage to external I6#                       $CODE_SECTION Y                                                       ; The prologue instruction sequence5S                                                       ; is generated by $ROUTINE by ?                                                       ; default   $                       ; Routine bodyM                       .BASE   R27,$LS                 ; Inform assembler thatTN                                                       ; R27 -> linkage section?                       LDQ     R0, I_ADDR              ; R0 -> I ?                       LDL     R2, (R0)                ; R2 <- I U                       MOV     1, R25                  ; AI <- 1 (R16 already contains F                                                       ;  the argument)X                       $CALL   ROUTINE2                ; Call ROUTINE2, R27->linkage sectL                       ADDL    R2, R0, R0              ; retval <- retval + IV                       $RETURN                         ; $RETURN generates the epilogueA                                                       ; sequence. +                       $END_ROUTINE ROUTINE1   0         B.3 Accessing Memory with Base Registers  I               The Alpha AXP architecture is a base-register architecture. F               Memory locations can only be accessed relative to a base:               address stored in one of the base registers.  G               The Alpha AXP architecture has 31 general base registers,vC               R0 through R30. R31 is a special base register, which:D               always reads as 0. Any attempt to store a value in R31               is ignored.   F               Since memory-reference instructions use a 16-bit, signedF               displacement relative to the base address, elevated-modeC               programs may access the low and high 32K bytes of the D               virtual address space relative to R31. See Figure B-1.              I                                             Programming with MACRO-64 B-5  l  -              B           However, these areas of virtual memory are typically not+           accessible to user-mode programs._  E           The following sections describe several methods you can use)0           to access memory using base addresses.    $           Base-Register Architecture  >           Base-register architectures use different methods toB           obtain an initial base address for a routine. Typically,>           base-register architectures load the current program>           counter (PC) into a base register. Thus, data can beB           accessed relative to a location in the code. This methodE           is inconsistent with the high-performance objectives of the ;           Alpha AXP architecture for the following reasons:.  C           o  It requires placing data areas adjacent to code areas,(D              which results in inefficient use of the instruction and              data caches.p  ?           o  The memory locations near the boundary of the data A              area and code would likely be duplicated in both the(C              instruction cache and the data cache, which diminishesE9              the effectiveness of the caching algorithms.a             Procedure Value)  B           The OpenVMS Calling Standard simplifies obtaining a baseA           address without requiring the data and code areas to be C           adjacent. When a program or routine needs to call another ?           routine, it must load R27 with a procedure value. The ?           procedure value is a special base address that is the B           address of the procedure descriptor of the routine it is           calling.             Procedure Descriptor  C           The procedure value for a given routine is the address of B           the procedure descriptor for that routine. Section B.4.1<           describes the procedure descriptor in more detail.  D           The procedure descriptor is a data block that resides in aC           special data area owned by the routine. This data area is %           called the linkage section.   !     B-6 Programming with MACRO-64  c                 D               Unlike VAX external routine names, which reference itsC               entry point, AXP external routine names reference the B               procedure descriptor that contains the entry point's               address.  A               Since the called routine has the address of its ownrE               procedure descriptor in R27, it can access not only itsoD               own procedure descriptor, but more importantly, it canD               use that address as a base address and access any dataF               that is within 32K bytes on either side of its procedure               descriptor.                  Linkage Section   B               The special data area where the procedure descriptor@               resides is called the linkage section. The linkageF               section is a psect that contains the routine's procedureD               descriptor. The linkage section performs the following               functions:  G               o  Allows other routines to link to the routine using the &                  procedure descriptor.  E               o  Uses it to link to other areas of memory in order toS(                  receive and store data.  E               o  Stores the addresses of other routines, allowing the 0                  routine to call those routines.  ?               Figure B-2 shows how you access memory using baseS               addresses:  H               1  The called routine can access memory in its own linkageB                  section relative to R27 since R27 contains a baseF                  address within its linkage section, specifically, the5                  address of its procedure descriptor.   A               2  Since memory-reference instructions use a 16-bitaG                  displacement relative to the base address, the linkage C                  section can be up to 64K bytes in size with direct (                  access relative to R27.  I                  In addition, the linkage section psect typically has the H                  NOWRT attribute and contains only address constants andH                  possibly other constants in order to facilitate placingG                  the linkage section in a shared section in a shareablep                  image.t  I                                             Programming with MACRO-64 B-7  T  I              @           3  If the called routine needs to access memory beyondB              its own linkage section, it can store additional baseB              addresses in its linkage section, load them into baseD              registers as needed, and access any legitimate location              in memory.   B           4  To access read/write data, a separate read/write dataA              section is defined in a different psect with the WRT C              attribute and the address of the read/write section is +              stored in the linkage section.   A           As shown in Figure B-2, the special base address passed ;           in R27 provides the called routine with a seed of B           addressability from which it can directly access its ownE           linkage section and from which it can indirectly access all C           of memory. Each routine in a call chain receives its seed ,           of addressability from its caller.  !           MAIN Program Call Chain_  B           The main routine in a program works in the same way. The>           operating system passes it a base address within its@           own linkage section in R27 just like any other calling?           standard-conforming routine. The operating system can_B           establish its own seed of addressability in a variety ofC           ways. The important programming consideration is that the D           main routine is given its requisite seed of addressabilityC           through the base address passed in R27 when the operatinghA           system calls the main routine. The main routine must incC           turn pass a seed of addressability in R27 to any routinesP7           that it calls, and so on down the call chain.e  ?           Figure B-3 shows program startup and the program callm           chain.  @           The call chain in Figure B-3 shows a typical program'sC           call chain originating with the transfer to the program's @           entry point (MAIN) from the operating system. The MAIN@           routine calls routine A, which in turn calls B. A fullB           prologue and epilogue are required for routines MAIN andB           A since they both make standard calls. The full prologueE           allocates the fixed stack area and saves the return address D           (R26), procedure value (R27), frame pointer (R29), and anyA           preserved registers that are to be used by the routine.oD           Finally, the full prologue establishes the routine's frameA           as the current frame. If MAIN or A need to access theirSC           respective linkage sections after making a standard call,a  !     B-8 Programming with MACRO-64t t  e              G               they will save a preserved register in the prologue, moveAG               R27 to that register before using R27 in a standard call,lG               use that register to access the linkage section after theaF               call, and restore that register in the epilogue. Since BI               does not make any standard calls, its prologue and epiloguee/               can be significantly streamlined.e  ?               Note that all three routines access data in theirgF               respective linkage sections relative to the base addressF               that is in R27 on entry. The caller refers to the calleeF               by the address of the callee's procedure descriptor. TheG               procedure-descriptor address is also called the procedure F               value (PV), and it is this address that is passed to theF               callee in R27. To make a call, the caller must store theE               address of the callee's procedure descriptor in its owneH               linkage section. The caller can then load R27 from its ownI               linkage section before the call. The caller then goes on to,G               obtain the address of the callee's code from the callee'sgG               procedure descriptor. With the callee's code address (CA)ME               in R26 and the callee's procedure-descriptor address innG               R27, the caller can transfer control to the callee with a G               jump-to-subroutine (JSR) instruction through R26, storing E               the return address in R26. A more optimal call sequencen=               using a linkage pair is shown in Section B.4.3.4  $         B.4 Types of Data Structures  F               This section describes the OpenVMS Calling Standard dataG               structures and how to use them in practical applications.A  F               The three data structures defined by the OpenVMS CallingG               Standard that you should be familiar with are as follows:T  %               o  Procedure descriptorl                  o  Signature block                 o  Linkage pair4              I                                             Programming with MACRO-64 B-9e C  6                   B.4.1 Procedure Descriptor  <           The procedure descriptor contains information that>           describes the routine. More importantly, it containsB           the address of the code for the routine. It includes the            following information:  !           o  Stack usage (if any)   (           o  Register save/restore masks             o  Exception handlerse  <           Usually, a routine's name references the routine's=           procedure descriptor rather than the address of its B           code. For example, a global name for an external routine?           represents the address where the procedure descriptornB           resides, not the address of the routine's code. ProgramsC           that call the routine obtain the address of its code from ;           its procedure descriptor or using a linkage pair.t  C           The .PROCEDURE_DESCRIPTOR and .LOCAL_PROCEDURE_DESCRIPTORc?           assembler directives define the name of the procedures<           descriptor, and indicate that the block of storage:           that follows is the procedure descriptor for the6           specified routine. .PROCEDURE_DESCRIPTOR and=           .LOCAL_PROCEDURE_DESCRIPTOR also associate the codesA           address of the routine's entry point with the procedureW@           name. The association between the code address and theC           procedure name allows the assembler and linker to processuB           the .CODE_ADDRESS and .LINKAGE_PAIR directives. For more:           information on linkage pairs, see Section B.4.3.  <           You need to declare the correct amount of storage,5           and specify the correct initial values. Thew?           .PROCEDURE_DESCRIPTOR and .LOCAL_PROCEDURE_DESCRIPTOR @           directives do not create the storage for the procedureD           descriptor. Instead, they mark the storage that follows asD           a procedure descriptor, which results in a special object-C           module record. Use the $ROUTINE and $PROCEDURE_DESCRIPTORhA           macros to both mark the procedure descriptor and define C           the storage for the procedure descriptor. For information @           on these macros, see Chapter 6. For information on the>           procedure descriptor format, see the OpenVMS Calling           Standard.n  "     B-10 Programming with MACRO-64    o                       B.4.2 Signature Block   F               The signature block describes the parameters, parameter-D               passing methods, and return value used by the routine.C               Using the signature block is optional. If it is used,gE               the procedure descriptor references it. You can use thetE               $ROUTINE and $PROCEDURE_DESCRIPTOR macros to define theaC               signature block. For information on these macros, seen               Chapter 6.           B.4.3 Linkage Pair  H               You can make calls to routines more efficient by using theH               .LINKAGE_PAIR and .LOCAL_LINKAGE directives. .LINKAGE_PAIRH               and .LOCAL_LINKAGE store both the address of the specifiedE               routine's code and procedure descriptor (a total of twoe               quadwords).d  G               For example, the assembler provides the .CODE_ADDRESS andaG               .LOCAL_CODE_ADDRESS directives to obtain the address of a G               routine's code (a quadword). To obtain the address of theeI               routine's code and procedure descriptor, you can use eithersE               the .CODE_ADDRESS or .LOCAL_CODE_ADDRESS in conjunction F               with the .ADDRESS directive. The following example showsH               how to use these directives to obtain the code address and0               procedure descriptor of routine X:  S                   .CODE_ADDRESS X         ; Store address of X's code (entry point) U                   .ADDRESS      X         ; Store address of X's procedure descriptori  ?               .LINKAGE_PAIR performs the same function as usingSB               .CODE_ADDRESS and .ADDRESS together, as shown in the                following example:  !                   .LINKAGE_PAIR Xg  -               Using Linkage Pairs in Routinesa  G               Another example of how you can use linkage pairs is shownxF               in Example B-2 and Example B-3. Example B-2 shows a code8               sequence that does not use a linkage pair.  7               Example B-2 Routine Without Linkage Pairs   I                                                  (continued on next page)l  I                                            Programming with MACRO-64 B-11o n  f              ;           Example B-2 (Cont.) Routine Without Linkage Pairs   %                   .enable local_blockp  '                   .psect $LINKAGE,noexeE8           LS:     .procedure_descriptor MY_PROC, MY_CODE;                   ; MY_PROC procedure descriptor details... R           X_ADDR: .address X                      ; Store address of X's proc desc  "                   .psect $CODE,exe)           MY_CODE: ; R27 -> LS upon entryi3                   ; Prologue omitted for clarity... J                   LDQ     R27,X_ADDR-LS(R27)      ; R27 -> proc desc for XH                   LDQ     R26,8(R27)              ; R26 -> code for X  1H                   JSR     R26,(R26)               ; CALL X             23                   ; Epilogue omitted for clarity...   B           While the previous code sequence works correctly, it has;           two immediate stalls in the instruction sequence:2  C           1  The first stall occurs when the second LDQ instruction A              must wait for the preceding load to R27 to complete.   B           2  The second stall occurs when the JSR instruction must<              wait for the preceding load to R26 to complete.  <           Since routine calls occur frequently, these stallsC           significantly increase the amount of time for the routine            to execute.e  @           Example B-3 is similar to Example B-2 except it uses a)           linkage pair to call routine X.E  0           Example B-3 Routine With Linkage Pairs  %                   .enable local_block   '                   .psect $LINKAGE,noexer8           LS:     .procedure_descriptor MY_PROC, MY_CODE9                   ;MYPROC procedure descriptor details... M           X_LP:   .LINKAGE_PAIR X                 ; Store address of X's codeeN                                                   ; followed by address of X's=                                                   ; proc desct  E                                              (continued on next page)o  "     B-12 Programming with MACRO-64 i  d              <               Example B-3 (Cont.) Routine With Linkage Pairs  &                       .psect $CODE,exe-               MY_CODE: ; R27 -> LS upon entry 7                       ; Prologue omitted for clarity... I                       LDQ     R26,<X_LP+0>-LS(R27)    ; R26 -> code for X-N                       LDQ     R27,<X_LP+8>-LS(R27)    ; R27 -> proc desc for X>                       JSR     R26,(R26)               ; CALL X7                       ; Epilogue omitted for clarity...o  C               The same number of instructions are required, but the B               two immediate stalls in the instruction sequence are               eliminated.o  C               You can also use the $LINKAGE_PAIR macro or the $CALL I               macro. For more information on these macros, see Chapter 6.nI               Note that the $CALL macro generates an instruction sequencev3               similar to that shown in Example B-3.s           B.5 Types of Routinesr  A               The OpenVMS Calling Standard defines four differentlF               types of routines with four different kinds of procedure               descriptors.  C               The format varies slightly for each kind of procedure 9               descriptor. The four types of routines are:e                 o  Null frame                  o  Register framed  1               o  Stack frame (fixed and variable)e                 o  Bound frame  G               A null-frame routine is a light-weight routine similar in G               concept to a JSB-linkage routine on a VAX system. A null- H               frame routine executes in the context of its caller and isI               therefore restricted in the operations that it can perform.tF               As shown in Table B-1, a null-frame routine requires the?               least overhead and offers the least capabilities.   @               A register-frame routine creates its own frame andE               therefore executes in its own context. A register-framerI               routine is an intermediate-weight routine with intermediater  I                                            Programming with MACRO-64 B-13r e  i              =           capabilities and overhead. A register-frame routinea<           maintains the context of its callers in registers.  =           A stack-frame routine has two categories: fixed and            variable:i  B           o  With the fixed-frame stack, the stack-frame size doesB              not vary. A fixed-stack frame routine creates its ownE              frame and stores the context of its caller on the stack.rA              A fixed-stack frame routine is also an intermediate- >              weight routine with intermediate capabilities and>              overhead. The only significant capability lackingD              with a fixed-stack frame routine is the ability to make              standard calls.  @           o  With the variable frame stack, the stack-frame sizeA              may vary. A variable-stack frame routine is the fulliB              function, heavyweight-type of routine. It creates itsD              own stack frame and stores the context of its caller onD              the stack. The variable-stack frame routine is the only:              type of routine that can make standard calls.  =           A bound-frame routine is generally used in compiled B           languages such as Ada and Pascal that require a dynamic,B           uplevel link to data in an outer routine. Most assembly-E           language programming does not involve bound-frame routines.        B.5.1 Routine Capabilities  D           The types of operations that a routine may perform and theC           amount of required overhead in the routine's prologue and D           epilogue instruction sequences are different for each type           of routine.   C           The capabilities and overhead requirements of null-frame, E           register-frame, fixed-stack frame, and variable-stack frame /           routines are summarized in Table B-1.,                "     B-14 Programming with MACRO-64 t                 I         Table_B-1_Frame_Attributes_______________________________________d  7                                               Variable- ,                                       Fixed-G                                       RegisterRegisterFixed-  Variable- C                               Null                    Stack   Stack I         ______________________Frame___Frame___Frame___Frame___Frame______   @         Executes in Frame of  Yes     No      No      No      No         Caller  C         Where Caller's        -       RegisterRegisterstack   Stack          Context is Kept   A         Can Allocate Stack    -       Yes     Yes     Yes     YesI         in Proloque   A         Must Allocate Stack   -       No      No      Yes     Yes          in Prologuec  A         Can Allocate Stack    RestrictNo      Yes     No      Yesk         in Routine Bodyt  A         Can Have an           No      Yes     Yes     Yes     Yeso         Exception Handlero  A         Can Save/Restore      RestrictNo      No      Yes     Yes          Registerss  A         Can Make Standard     RestrictNo      No      No      YestI         Calls____________________________________________________________n  G               For more information on routines, see the OpenVMS Callinge               Standard.   8         B.5.2 Entry Prologue and Exit Epilogue Sequences  E               In general, a standard sequence of instructions is usediD               when a routine first starts and when it completes. TheC               following code example shows a typical entry prologue D               sequence for a variable stack-frame procedure. SeveralF               elements of the prologue may be omitted for less complex               routines.t    I                                            Programming with MACRO-64 B-15s i  a              H           ENTRY:  LDA     SP, -32(SP)     ; Allocate fixed-stack area  1@                   STQ     R27, (SP)       ; Save procedure value?                   STQ     R26, 8(SP)      ; Save return address Q                   STQ     R2, 16(SP)      ; Save any preserved regs that are usedh7                   STQ     FP, 24(SP)      ; Save old FP C                   MOV     SP, FP          ; Establish current frame K                   $END_PROLOGUE           ; Marks the end of the proloque 2   ?           1  The ENTRY label marks the code entry point for theB              routine.p  C           2  The $END_PROLOGUE macro is used to mark the end of the               prologue.  B           The following code example shows a typical exit epilogue@           sequence for a variable-stack frame procedure. SeveralA           elements of the epilogue may be omitted for routines ofs           less complexity.  P                   $BEGIN_EPILOGUE         ; Mark the beginning of the epilogue 1K                   MOV     FP, SP          ; Release the variable stack areaa@                   LDQ     R28, 8(FP)      ; Fetch return addressG                   LDQ     R2, 16(FP)      ; Restore preserved registerstF                   LDQ     FP, 24(FP)      ; Reestablish caller's frameH                   LDA     SP, 32(SP)      ; Release the fixed-stack area<                   RET     R28             ; Return to callerJ                   $END_EPILOGUE           ; Mark the end of the epilogue 1  C           1  In this example, the $BEGIN_EPILOGUE and $END_EPILOGUEoD              macros are used to begin and end the epilogue sequence.  E           The $ROUTINE macro optionally generates a standard prologueeB           instruction sequence at the beginning of the routine. InD           addition, you can also use the $RETURN macro to generate aC           standard epilogue sequence. For more information on thesel            macros, see Chapter 6.  (     B.6 Establishing Self-Addressability  D           A MACRO-64 routine can establish addressability to its ownE           linkage section without the help of its caller (the calling >           routine). In this case, the caller does not pass theB           procedure value in R27 as in a standard call. Therefore,D           the routine must establish its own base address within its           linkage section.  "     B-16 Programming with MACRO-64    t              E               To accomplish self-addressability, the code and linkage I               sections must be adjacent to each other. This requires them I               to reside in the same psect. Because the assembler does not I               allow placement of data in an EXE/NOMIX psect, instructions E               must be placed in an EXE/MIX psect. When debugging, the F               debugger views execution to have transferred into a dataE               area because the debugger views all MIX psects as data.   F                 ________________________ NOTE ________________________  :                 The debugger can correctly display decodedB                 instructions in a MIX psect, but it cannot achieveD                 source-line /program-counter correlation and source-                 line scrolling.S  F                 ______________________________________________________  I               Example B-4 represents the CLEAR_X_ARRAY routine, which hasS&               no procedure descriptor.  5               Example B-4 Establishing a Base Address   <                       .psect CLEAR_X_ARRAY_CODE,exe,mix,quad               X_ARRAY_ADDR:i&                       .address X_ARRAY               X_ARRAY_SIZE:m7                       .long <X_ARRAY_END - X_ARRAY> / 8r                 CLEAR_X_ARRAY::hA                       BSR     R1,10$                  ; R1 -> 10$eF               10$:    LDQ     R22,X_ARRAY_ADDR-10$(R1); R22 -> X_ARRAYH                       LDL     R23,X_ARRAY_SIZE-10$(R1); R23 <- REMAININGJ               20$:    CLR     R31,(R22)               ; [X_ARRAY_PTR] <- 0R                       LDA     R22,8(R22)              ; X_ARRAY_PTR<-X_ARRAY_PTR+8N                       LDA     R23,-1(R23)             ; REMAINING<-REMAINING-1O                       BGT     R23,20$                 ; Branch if REMAINING > 0 >                       RET     (R26)                   ; Return                       .end  E               Other routines may call the CLEAR_X_ARRAY routine usingnB               only its code address and a nonstandard linkage. TheB               CLEAR_X_ARRAY routine executes in the context of itsF               caller; it does not create its own frame. It establishesH               a base address in its code section and because its linkage  I                                            Programming with MACRO-64 B-17     c              E           section is adjacent to its code section, it can access dataa!           in its linkage section.s  ,     B.7 Optimization and Automatic Alignment  8           MACRO-64 provides the following optimizations:  %           o  Automatic data alignment   %           o  Automatic code alignment              o  Scheduling              o  Peepholingo  C           By default, all optimizations and automatic alignment are A           off. When invoking MACRO-64, the default qualifiers are '           /NOOPTIMIZE and /NOALIGNMENT.   D           You can control optimization and automatic alignment using1           the following qualfiers and directives:t  4           o  The /OPTIMIZE and /ALIGNMENT qualifiers  0           o  The .ENABLE and .DISABLE directives  7           o  The .BEGIN_EXACT and .END_EXACT directivesu  B           The .ENABLE and .DISABLE directives control optimization@           and automatic code alignment for an assembly unit; youA           cannot use these directives to control optimization and A           automatic code alignment for a range of statements. UserD           .BEGIN_EXACT and .END_EXACT to suppress optimization for a           range of statements.  "     B.7.1 Automatic Data Alignment  @           Access to naturally aligned data is faster than access<           to unaligned data. MACRO-64 does not align data by?           default. Instead, it places data exactly as specifiediB           with no padding. With automatic data alignment selected,@           data directives are automatically aligned on a natural?           boundary. Pad bytes are added as necessary to achieve @           natural alignment. Labels that occur with the data are.           automatically aligned with the data.  "     B-18 Programming with MACRO-64 t  s              *         B.7.1.1 Controlling Data Alignment  E               You can control when you want to have data alignment inNG               your program. You do this by using the .ENABLE ALIGN_DATAeE               and .DISABLE ALIGN_DATA directives. Note that automatic F               data alignment is disabled by default. Example B-5 shows7               how to enable and disable data alignment.n  ?               Example B-5 Enabling and Disabling Data Alignmentb  #               .PSECT D1,DATA,NONEXE C               .DISABLE ALIGN_DATA     ; This is the default state 1 2               .BYTE   1               ; offset = 02               .QUAD   2               ; offset = 1"               .PSECT D2,DATA,NOEXEE               .ENABLE ALIGN_DATA      ; Turn on automatic alignment 2 2               .BYTE   1               ; offset = 0Y               .QUAD   2               ; offset = 8 (pad bytes are added at offsets 1 - 7)   G               1  The .DISABLE ALIGN_DATA directive causes the assembleroA                  to allocate data at the current location withoutnF                  padding, regardless of whether it is within a natural                  boundary.  F               2  The .ENABLE ALIGN_DATA directive causes the assemblerB                  to align data objects on natural rather than byte                  boundaries.  7         B.7.1.2 Directives for Automatic Data Alignmentw  G               The MACRO-64 data-storage directives in Table B-2 provide ,               optional, automatic alignment.  I               Table_B-2_Directives_Using_Automatic_Alignment_____________a  I               Directive_____________Alignment_Boundary___________________B  ,               .WORD                 word (2)  ,               .SIGNED_WORD          word (2)  0               .LONG                 longword (4)  0               .ADDRESS              quadword (8)  I                                                  (continued on next page)i  I                                            Programming with MACRO-64 B-19d s  f              E           Table_B-2_(Cont.)_Directives_Using_Automatic_Alignment_____u  E           Directive_____________Alignment_Boundary___________________   -           .OCTA                 octaword (16)>  ,           .QUAD                 quadword (8)  ,           .CODE_ADDRESS         quadword (8)  ,           .LOCAL_CODE_ADDRESS   quadword (8)  -           .LINKAGE_PAIR         octaword (16)e  -           .LOCAL_LINKAGE_PAIR   octaword (16)r  ,           .PROCEDURE_           quadword (8)           DESCRIPTOR  ,           .LOCAL_PROCEDURE_     quadword (8)           DESCRIPTOR  ,           .F_FLOATING (.FLOAT)  longword (4)  ,           .D_FLOATING           quadword (8)           (.DOUBLE)   ,           .G_FLOATING           quadword (8)  ,           .S_FLOATING           longword (4)  ,           .T_FLOATING           quadword (8)  ,           .BLKA                 quadword (8)  ,           .BLKD                 quadword (8)  ,           .BLKF                 longword (4)  ,           .BLKG                 quadword (8)  ,           .BLKL                 longword (4)  -           .BLKO                 octaword (16)a  ,           .BLKQ                 quadword (8)  ,           .BLKS                 longword (4)  ,           .BLKT                 quadword (8)  (           .BLKW                 word (2)  ,           .ASCID                quadword (8)  E           .INSTRUCTION__________longword_(4)_________________________   D           Specify a .PSECT directive alignment attribute that alignsB           the psect on a boundary that is at least as stringent as/           the automatically aligned data items.n  "     B-20 Programming with MACRO-64 A  -              ,         B.7.2 Automatic Code Label Alignment  I               Automatic code label alignment improves I-cache utilization C               and multi-instruction issue. This optimization alignsgH               certain code labels to a quadword boundary by padding withE               NOP and FNOP instructions. Use the /ENVIRONMENT=NOFLOAT>6               qualifier to suppress FNOP instructions.  F               Code labels that are the target of backward branches areB               aligned. Also, labels that are the target of forwardE               branches that are not also the target of a fall through                are aligned.  I               Use the /ALIGNMENT=CODE qualifier or the .ENABLE ALIGN_CODEAA               directive to select automatic code label alignment.n  %         B.7.3 Scheduling Optimization   H               Scheduling reorders instructions to reduce pipeline stallsD               and increases the chances for multi-instruction issue.C               It only reorders instructions; it does not change thefE               instructions or the registers used in the instructions.oH               In addition, instructions are not scheduled across labels.C               Therefore, the structure of your program is retained.t  F                 ________________________ Note ________________________  F                 If you use the same register for two or more logically?                 distinct actions, the scheduler schedules theseeD                 actions serially in the sequence you specify. If youA                 use different registers for two or more logicallyt=                 distinct actions, the scheduler schedules the D                 actions in parallel, which provides faster execution                 performance.  F                 ______________________________________________________  A               Use the /OPTIMIZE=SCHEDULE qualifier or the .ENABLEeC               SCHEDULE directive to select scheduling optimization.o            I                                            Programming with MACRO-64 B-21i r  i                   B.7.4 Peephole Optimization   D           Peephole optimization restructures your program for fasterD           execution. To do so, it reduces the number of instructions@           executed and replaces long-executing instructions withA           instructions that require less execution time. Although C           this optimization may increase the number of instructions @           in memory, the number actually executed, as you followA           the code paths, decreases or remains the same. PeepholerD           optimization matches short code patterns and replaces themD           with more optimal sequences. It also eliminates dead code.C           (Note that dead code is often created by the code changes E           made by peephole optimization. This dead code is eliminatedsA           by successive iterations where peephole optimization istC           selected.) Peephole optimization eliminates some branches D           by inlining or replicating short sequences from the branch           target.   =           Use the /OPTIMIZE=PEEPHOLE qualifier or the .ENABLE =           PEEPHOLE directive to select peephole optimization.y  (     B.7.5 Using MACRO-64 for Performance  ?           High-order language compilers do optimizations callede=           loop unrolling and inlining. MACRO-64 allows you to =           perform these optimizations manually through codingrD           techniques, although it does not offer specific qualifiers0           or directives for these optimizations.  D           Loop unrolling reduces the number of branches that must beE           executed. You can unroll loops using the .REPEAT directive.u<           The following example shows manual loop unrolling:  3           10$:                          ; Copy loop D           .repeat 10                    ; Unroll the loop, factor=10B               LDA     R18, -1(R18)      ; Decrement quadword countF               BLT     R18, 20$          ; Branch if quadword count < 09               LDQ     R0, (R17)         ; Load a quadword_<               STQ     R0, (R16)         ; Store the quadwordF               LDA     R16, 8(R16)       ; Increment the target addressF               LDA     R17, 8(R17)       ; Increment the source address               BR 10$           .endr            20$:  "     B-22 Programming with MACRO-64 c                 B               Loop unrolling complemented with MACRO-64 schedulingC               and peephole optimizations can significantly increase G               performance. For better loop scheduling, you can make thet<               counter decrement and the loop exit separable.  7               10$:                          ; Copy loop H               .repeat 10                    ; Unroll the loop, factor=10F                   LDA     R18, -1(R18)      ; Decrement quadword count=                   LDQ     R0, (R17)         ; Load a quadwordaJ                   BLT     R18, 20$          ; Branch if quadword count < 0@                   STQ     R0, (R16)         ; Store the quadwordJ                   LDA     R16, 8(R16)       ; Increment the target addressJ                   LDA     R17, 8(R17)       ; Increment the source address                   BR 10$               .endrf               20$:  G               High-order language compilers often inline a routine call G               if the called routine is small and is defined in the sameaG               module from which it is called. To inline a routine call,sE               the compiler replaces the routine call with the body ofsG               the called routine. You can use macros to manually inlinec2               short, local routines with MACRO-64.  *         B.7.6 Viewing Optimization Results  C               You can view the results of optimization by comparing D               code from before and after optimization. Use the /LISTD               and /MACHINE_CODE command-line qualifiers described inG               Section 1.2.1. Using these qualifiers provides you with a I               binary machine-code listing, which you can also use to view :               the results of automatic alignment features.  G               Many of the other OpenVMS AXP languages offer a /MACHINE_OA               CODE command-line qualifier that shows the assembly G               language generated for your source program in the listing E               file. You can often use this feature to learn about AXPi<               assembly language and optimization techniques.              I                                            Programming with MACRO-64 B-23p l  i                    I                                                                         CsI         _________________________________________________________________.  I                                                   Using LSE with MACRO-64l    A               This appendix explains how to use the DEC Language-eD               Sensitive Editor (LSE) with the MACRO-64 language. ForI               LSE to function correctly, LSE must be installed before thei!               MACRO-64 assembler.P           C.1 Invoking LSE  B               To use LSE with the MACRO-64 language, you must nameF               your program source file with a .M64 file extension. ForI               example, to edit a file named TEST.M64, enter the followingp               command:                 $ LSE TEST.M64  F               Using the .M64 file extension invokes the LSE editor and>               places you in the MACRO-64 language environment.  F               If you choose to use a different file extension, you canE               still use LSE in the MACRO-64 language environment. ForUI               example, to edit a file named TEST.ASM, enter the followingr               command:  -               $ LSE/LANGUAGE=MACRO64 TEST.ASMg  A               If you use LSE with MACRO-64, and you want the samedD               behavior on the OpenVMS AXP operating system as on theC               OpenVMS VAX operating system, enter the following LSEr               command:  (               $ SET COMMAND LANGUAGE VMS            I                                               Using LSE with MACRO-64 C-1s                        C.2 Running Diagnosticsg  B           You can run diagnostics in LSE to debug programs without?           leaving the LSE editor. For more information, see thes@           Guide to Language-Sensitive Editor for VMS Systems and%           the MACRO-64 release notes.a  D           When running diagnostics in an LSE editing session, MACRO-B           64 displays error messages of different severity levels.A           For more information on error messages, see Appendix E.t                                                                           C-2 Using LSE with MACRO-64                          I                                                                         DrI         _________________________________________________________________,  I                                                Differences from VAX MACROi    F               MACRO-64 is a new product that provides a macro assemblyD               language for the native Alpha AXP instruction set. TheG               MACRO-64 instruction set is completely different from thepH               VAX MACRO instruction set. Although many of the directivesG               are the same between VAX MACRO and MACRO-64, it would not I               be practical to share instruction sequences between the two !               assembly languages.   H               While MACRO-64 is compatible with VAX MACRO, even allowingB               shared source modules between VAX MACRO and MACRO-64G               using common assembler directives and through conditional I               assembly, several differences exist. This appendix contains A               two sections describing the differences in assembly-1               directives and features as follows:   H               o  Section D.1 describes new features in MACRO-64 that are*                  not present in VAX MACRO.  I               o  Section D.2 describes features in VAX MACRO that are not %                  present in MACRO-64.   *         D.1 Assembler Features in MACRO-64  E               This section describes MACRO-64 features not present ins"               VAX MACRO. They are:                  o  .BASE directive  B                  The .BASE directive is provided for implicit base"                  register support.  F               o  .PROCEDURE_DESCRIPTOR and .LOCAL_PROCEDURE_DESCRIPTOR                  directivesn      I                                            Differences from VAX MACRO D-1     c              @              These directives mark the specified identifier as aA              procedure descriptor. .PROCEDURE_DESCRIPTOR declaresa=              an identifier as a global label that defines thew;              address of the procedure's description (a data @              address) and associates the procedure's entry point=              (a code address) with the name of the procedure.iD              .LOCAL_PROCEDURE_DESCRIPTOR performs a similar functionB              by defining a local label rather than a global label.C              No storage is allocated. For more information on thesei'              directives, see Chapter 5.l  =           o  .LINKAGE_PAIR and .LOCAL_LINKAGE_PAIR directivesN  ?              These directives cause a linkage pair to be stored A              at the current psect and current location counter. A D              linkage pair consists of a code address and the addressA              of the specified identifier. For more information ona-              these directives, see Chapter 5.o  =           o  .CODE_ADDRESS and .LOCAL_CODE_ADDRESS directivesn  ?              These directives cause the code address(es) of thea@              specified identifier(s) to be placed at the currentB              psect and current location counter. See Chapter 5 for              more information.                                        "     D-2 Differences from VAX MACRO a                                 o  .ELSE directive  ?                  MACRO-64 introduces a new conditional-assemblycE                  directive, .ELSE. You can use it in conjunction withyB                  the .IF and .ENDC directives (common to VAX MACROE                  and MACRO-64) to specify a sequence of statements toiC                  be assembled when the condition in the controlling E                  .IF directive is false. While the .ELSE directive is G                  similar to VAX MACRO's .IF_FALSE directive, it differsrD                  in that you may specify at most one .ELSE directiveF                  within an .IF/.ENDC block. .IF_FALSE is also providedD                  for VAX MACRO compatibility. See Chapter 5 for more                  information.n  #               o  .INCLUDE directiveb  I                  MACRO-64 provides a new .INCLUDE directive that causes a I                  specified file to be textually included in the assembly. <                  The format of this directive is as follows:  H                  .INCLUDE "file_specification" ["Directory_search_list"]  H                  The effect of the .INCLUDE directive is similar to thatH                  of the #include directive in C or the REQUIRE statement                  in BLISS.  9               o  Optional case sensitivity in identifiersL  H                  You can specify the /NAMES=AS_IS command-line qualifierH                  to cause the assembler to distinguish between uppercaseI                  and lowercase letters in identifiers and external symbol B                  names. The default is /NAMES=UPPERCASE; uppercaseD                  and lowercase letters are not distinguished as with?                  VAX MACRO. See Chapter 1 for more information.D  B               o  Lexical operator support for 12 lexical operators  G                  MACRO-64 provides 12 lexical operators, three of which C                  are compatible with VAX MACRO's three macro string E                  operators. You can use MACRO-64 lexical operators in_F                  any context and you are not restricted to macros. See0                  Chapter 3 for more information.  '               o  Lexical string symbols   4                  See Chapter 3 for more information.  -               o  Lexical escape operator (%%)n  4                  See Chapter 3 for more information.  I                                            Differences from VAX MACRO D-3C .  i              :           o  Lexical substitution operator (%lexsym_name%)  0              See Chapter 3 for more information.  :           o  More liberal use of the value-of operator (\)  B              MACRO-64 as well as VAX MACRO recognizes the value-of?              operator (\)  in macro invocations and in default-LB              value strings for parameters in .MACRO directives. InD              addition, MACRO-64 recognizes the value-of operator (\)'              in the following contexts:E  C              -  With either or both of the two arguments in the .IF.7                 DIFFERENT and .IF IDENTICAL directives.u  D              -  With the argument to the .IF BLANK and .IF NOT_BLANK                 directives.T  ?              -  With the second argument to the .NCHR and .IRPCo                 directives.   D              -  With the second and subsequent arguments to the .IRP                 directive.  B              -  With arguments to lexical operators. See Chapter 4%                 for more information.o                                      "     D-4 Differences from VAX MACRO                                   o  MACRO64$ symbol  H                  MACRO-64 implicitly defines a new symbol, MACRO64$, forD                  use in conditional assembly. This symbol is defined@                  in all uppercase and all lowercase letters whenD                  /NAMES=AS_IS is specified on the command line. This1                  symbol might be used as follows:a  +                  .MACRO ADDRESS32 EXPR_LIST )                      .IF DEFINED MACRO64$n$                      .LONG EXPR_LIST                      .IF_FALSE'                      .ADDRESS EXPR_LIST                       .ENDC                   .ENDM ADDRESS32"                  ADDRESS32 <A,B,C>  )               o  Automatic data alignment   H                  .ENABLE_ALIGN_DATA causes data to be naturally aligned.                  See Chapter 5.i                 o  Optimizations  >                  The assembler optionally performs a number of@                  optimizations. See Chapter 2 (command line) and%                  Chapter 5 (.ENABLE).t                 o  $OPDEF macro   B                  $OPDEF is supplied in place of VAX MACRO's .OPDEF                  directive.   1               o  OpenVMS Calling Standard macros:N  5                  $ROUTINE              $SEND_PROLOGUEa  7                  $CALL                 $LINKAGE_SECTIONm  4                  $CODE_SECTION         $DATA_SECTION  6                  $LINKAGE_PAIR         $BEGIN_EPILOGUE  4                  $RETURN               $END_EPILOGUE  5                  $PROCEDURE_           $RESET_LP_LIST                   DESCRIPTORh  '               o  .INSTRUCTION directive   H                  For more information on the .INSTRUCTION directive, see                  Chapter 5.u  I                                            Differences from VAX MACRO D-5N    _              3           o  .BEGIN_EXACT and .END_EXACT directivesr  E              For more information on these directives, see Chapter 5.e  "           o  /[NO]DEFINE qualifier  <              MACRO-64 includes a new command-line qualifier,C              /[NO]DEFINE. It defines one or more numeric symbols by E              performing the same function as direct symbol assignmentnD              in your source program. For more information about this&              qualifier, see Chapter 1.              o  Preprocessor output  <              MACRO-64 provides a new command-line qualifier,B              PREPROCESSOR_ONLY and a new symbolic argument for theB              .ENABLE and .DISABLE directives, PREPROCESSOR_OUTPUT,D              that you can use to produce a preprocessor-output file.  >              For more information about the /PREPROCESSOR_ONLY<              command-line qualifier, see Chapter 1. For moreD              information about the PREPROCESSOR_OUTPUT argument, seeD              the descriptions of the .ENABLE and .DISABLE directives              in Chapter 5.             o  Register symbolsn  D              Unlike VAX MACRO register symbols, MACRO-64 symbols areD              not permanently reserved. You can delete the definitionD              of any predefined register symbol (using the .UNDEFINE_B              REG directive) or define your own (using the .DEFINE_-              FREG or .DEFINE_IREG directive).h  =              For more information about register symbols, seee>              Chapter 1. For a list of OpenVMS Calling Standard@              register symbols you can use with MACRO-64 supplied>              macros, see Chapter 6. For more information aboutC              defining register symbols and deleting register symbolh(              definitions, see Chapter 5.  2     D.2 VAX MACRO Features Not Present in MACRO-64  B           This section contains features in VAX MACRO that are not(           present in MACRO-64. They are:  "           o  EXE/NOEXE restriction  "     D-6 Differences from VAX MACRO g  d              D                  MACRO-64 allows only instructions to be placed in aE                  psect with either the EXE or MIX attributes or both.iG                  You can place data in a psect with either the NOEXE or I                  MIX attributes or both. VAX MACRO allows instructions orc9                  data to be arbitrarily placed in psects.   C               o  Setting the current location in an EXE/NOMIX psect   I                  MACRO-64 does not permit the current location counter to I                  be changed in a psect with the EXE and NOMIX attributes. :                  VAX MACRO does not have this restriction.  9               o  Overlapping and replacement initializers   F                  VAX MACRO allows you to reassign the current locationG                  counter and store data initial values and instructionsmD                  over previous data initial values and instructions.F                  MACRO-64 provides a similar capability. However, thisH                  capability is only available in psects that have eitherD                  the NOEXE or MIX attribute, or both. Furthermore, aI                  replacement initial value must start at exactly the same F                  psect offset and be of exactly the same length as theI                  initial value it replaces. VAX MACRO does not have these                   restrictions.  &               o  Radix unary operators  G                  VAX MACRO allows unary radix operators on expressions. F                  MACRO-64 allows unary radix operators only to specifyI                  the radix of numeric constants. The octal constant ^O123hE                  is valid with both VAX MACRO and MACRO-64. The octaltF                  expression ^O(10 + 10) is valid with VAX MACRO; it is)                  not valid with MACRO-64.   +               o  The register mask operatord  H                  The VAX MACRO ^M operator is not supported on MACRO-64.F                  Because register masks are not needed by any MACRO-64F                  instructions or directives, there is no need for this                  operator.  -               o  .ALIGN does not support PAGE   H                  Because the Alpha architecture has variable page sizes,E                  MACRO-64 does not support PAGE as an argument to the "                  .ALIGN directive.  ?               o  No count specifiers on data-storage directives   I                                            Differences from VAX MACRO D-7  e  o              E              MACRO-64 does not allow a repeat count expression on anynC              data-storage directive such as .BYTE or .WORD. You cane?              use the %REPEAT lexical function for this purpose.c  >           o  No support for the .CROSS and .NOCROSS directives  B              There is no support for these directives in MACRO-64.  "           o  No support for .DEBUG  @              There is no support for this directive in MACRO-64.B              However, even though this directive is not supported,A              MACRO-64 provides symbolic information in the object ,              module for use by the debugger.  "           o  No .DEFAULT directive  :              This directive in not applicable on MACRO-64.  1           o  .ENABLE/.DISABLE directive arguments   B              The MACRO-64 assembler does not support the following=              arguments to the .ENABLE or .DISABLE directives:_  3              -  ABSOLUTE-not applicable on MACRO-64                 -  DEBUGh                -  SUPPRESSIONh                -  TRACEBACKs                -  TRUNCATION  '           o  .END directive differences-  E              VAX MACRO requires the .END directive. MACRO-64 does notsC              require this directive. MACRO-64 requires the optional ?              identifier that follows the .END directive to be ag6              previously declared procedure descriptor.  +           o  .ENTRY directive not supported   E              A $ROUTINE macro that accomplishes a similar function is               used.  !           o  No .GLOBAL directive   >              There is no support for this directive. VAX MACROE              provided this directive for MACRO-11 compatibility only.   %           o  No .H_FLOATING directivex  E              Since this data type is not a native MACRO-64 type, thisv(              directive is not supported.  "     D-8 Differences from VAX MACRO l  n              #               o  No .LINK directiveA  8                  There is no support for this directive.  #               o  No .MASK directive   >                  This directive is not applicable to MACRO-64.  $               o  No .NTYPE directive  G                  This directive is not supported by MACRO-64. The %TYPE >                  lexical operator provides a similar function.  $               o  No .OPDEF directive  I                  There is no support for this directive. The $OPDEF macro -                  provides a similar function.t  0               o  Differences in .PSECT directive  H                  The following .PSECT arguments are not supported: PAGE,                  LIB, and USR.  $               o  No .REFn directives  :                  There is no support for these directives.  2               o  Differences in .RESTORE directive  F                  On successive .RESTOREs for the same psect, VAX MACROC                  restores the current location counter value as the F                  last location counter value saved for the psect beingI                  restored. MACRO-64 restores the current location counter_B                  value as the location counter value saved for the*                  matching .SAVE directive.  '               o  No .TRANSFER directiveA  8                  There is no support for this directive.  1               o  Differences with .ENDM and .ENDRo  F                  VAX MACRO considers the .ENDM and .ENDR directives toH                  be synonyms of each other. MACRO-64 considers .ENDM andE                  .ENDR to be distinct. You must end macro definitionsiF                  with .ENDM and you must end repeat ranges with .ENDR.  I                                            Differences from VAX MACRO D-9A -  i                    I                                                                         ERI         _________________________________________________________________   I                                                            Error Messagesx    I               This appendix describes the messages produced by the MACRO- 3               64 Assembler for OpenVMS AXP Systems.   A               The description of each message gives the severity,aC               followed by additional explanatory text and suggestedc               action.u  @          ADDTRUNC,  Storing an address expression into a storageG             allocation less than the size of an address results in datac             truncation.e  C             Informational: The assembler stored a value that is too H             large for the allocated space, resulting in data truncation.  /             User Action: Allocate more storage.r  D          ALIGNFILLIGN,  The optional .ALIGN fill pattern argument is@             ignored in psects with the EXE and NOMIX attributes.  G             Warning: The optional fill pattern is ignored because it is G             only valid for psects that do not possess the EXE and NOMIX              attributes..  G             User Action: Omit the fill pattern or specify the MIX psectl             attribute.  G          ALIGNFILLTRUNC,  The value you specify for the .ALIGN optionaleH             fill pattern must be an integer in the range of 0 . . . 255.D             Data truncation occurs with the currently specified fill/             pattern in a byte storage location.   F             Warning: The value you specify as the fill pattern for theE             .ALIGN directive must be within the range of 0 . . . 255.iG             Data truncation occurs whenever you specify a value that isR"             outside of this range.  F             User Action: Specify a smaller value for the fill pattern.  I                                                        Error Messages E-1  o  a              D       ALIGNLABELIGN, The ALIGN_LABEL option has been replaced by the          ALIGN_CODE option.r  ?          Error: The ALIGN_LABEL option has been replaced by theO          ALIGN_CODE option.   5          User Action: Use the recommended new option.h  =       ALIGNTOBIG, Specified alignment is too large for PSECT.e  @          Error: The alignment you specified is too large for the          current psect.o  C          User Action: Check the psect attributes to insure that therB          psect alignment is greater than or equal to the alignment          you are requesting.  D       ASCIITRUNC, ASCII constant contains too many characters; value          is truncated.  <          Error: Your ASCII constant contains more than eightD          characters with the ^A or ^a radix specifier. The assembler&          deletes the extra characters.  ?          User Action: Check your source code. Use eight or less           characters.  4       BADALIGN, Alignment specifier is out of range.  ?          Error: The alignment specifier used with the .PSECT or *          .ALIGN directive is out of range.  @          User Action: For a description of the .PSECT and .ALIGN#          directives, see Chapter 5.X  0       BADENDARG, Bad argument to .END directive.  >          Error: The optional argument to the .END directive is          invalid.M  D          User Action: If you specify the argument, it must referenceB          a procedure descriptor within the module. Specify a valid8          procedure descriptor name or omit the argument.  <       BADINSARG, Argument N is invalid for this instruction.  <          Error: The argument number shown is invalid for the          instruction.   ?          User Action: Check the argument and required format ase(          specified in the documentation.       E-2 Error Messages i  y              3          BADLIB,  Error opening library file XXXXX.I  H             Error: The assembler encountered an error when attempting to,             open the indicated library file.  D             User Action: Check the file format and file protections.  8          BADMACPARAMNAME,  Illegal macro parameter name.  A             Error: The indicated macro parameter name is illegal.   G             User Action: Examine your source code and see Chapter 1 forL4             information about valid parameter names.  +          BADMACRONAME,  Illegal macro name.r  7             Error: The indicated macro name is illegal.h  E             User Action: Check your source code and see Chapter 2 for 0             information about valid macro names.  8          BADOPERAND,  Invalid operand type for operator.  ?             Error: The resolved operand type is invalid for thec             specified operator.   E             User Action: See the descriptions of operators, operands,p)             and expressions in Chapter 2.a  0          BADPARAMSTR,  Illegal parameter string.  H             Error: The string specified as a macro parameter is invalid.  G             User Action: Examine your source code and see Chapter 1 for 4             information about valid parameter names.  6          BADSYSCALL,  Internal error. Bad system call.  C             Error: The assembler encountered an unexpected internalo0             error when performing a system call.  7             User Action: Report the problem to Digital.t  G          BASEFAIL,  Argument N is invalid. The assembler failed to find(H             a base register specified with a previous .BASE directive to>             form a register expression of the form offset(Rn).  F             Error: The assembler could not find a base register, whichD             you specified with a previous .BASE directive, to form a=             valid register expression of the form offset(Rn).   A             User Action: Check the instruction in the source codeuC             and see Chapter 5 for information about using the .BASE              directive.  I                                                        Error Messages E-3                    ?       BASERANGE, Argument N invalid. The assembler attempted to B          use base register Rn to form a register expression of theB          form offset(Rn). However, the argument offset exceeds the/          allowable range of -32,768 to +32,767.   ?          Error: The assembler attempted to use a base register, @          which you specified with a previous .BASE directive, toA          form a valid register expression of the form offset(Rn). B          This attempt failed because the specified argument offset@          exceeded the valid range of the base register offset (_>          32,768 to +32,767). The register cited in the message@          represents the register that produced an offset closest,          to the range of -32,768 to +32,767.  >          User Action: Check the instruction in the source code@          and see Chapter 5 for information about using the .BASE          directive.O  E       BEGEXPSC, .BEGIN_EXACT is invalid in a psect with the NOEXE ande          NOMIX attributes.  E          Error: A .BEGIN_EXACT directive is not valid in a psect withE(          the NOEXE and NOMIX attributes.  -          User Action: Check your source code.o  B       BYTEALIGNIGN, The BYTE_ALIGN option has been replaced by the          ALIGN_DATA option.r  E          Error: The BYTE_ALIGN option has been replaced by the ALIGN_           DATA option.   5          User Action: Use the recommended new option.N  2       CONPSECTATTR, Contradictory PSECT attribute.  E          Error: A previously specified psect attribute conflicts with_%          the flagged psect attribute._  C          User Action: See Chapter 5 for a description of the .PSECT (          directive and psect attributes.  ;       CONTEOF, Assembler encountered end of file after line           continuation.  B          Error: The assembler encountered end of file after a line'          that specified a continuation.   -          User Action: Check your source code.        E-4 Error Messages t                 F          DATAALIGNTOBIG,  Data requires alignment too large for PSECT.  F             Error: The alignment required for a specified data item is$             too large for the psect.  F             User Action: Check the psect attributes to insure that theD             psect alignment is greater than or equal to the requiredH             alignment of the data items. See Chapter 5 for a description9             of the .PSECT directive and psect attributes.l  G          DATANOTINNOEXE,  Data declarations must be in a psect with thef#             MIX or NOEXE attribute.A  H             Error: A data declaration, such as a data-storage directive,>             has been specified in a psect with incorrect psect             attributes.O  A             User Action: Make sure the psect has the MIX or NOEXE H             attribute set. See Chapter 5 for a description of the .PSECT+             directive and psect attributes..  E          DIRNOTINNOEXE,  Directive must be in a psect with the MIX ory             NOEXE attribute.  H             Error: The directive you specify must appear in a psect with+             the MIX or NOEXE attribute set.   F             User Action: Make sure you specify a psect with the MIX orG             NOEXE attribute set. See Chapter 5 for a description of the 2             .PSECT directive and psect attributes.  F          DISPTOOLGE,  Branch offset is too large for this instruction.  A             Error: The offset you specified is too large for this              instruction.  C             User Action: Check the range of the specified target totG             insure it falls between -1048576 . . . +1048575, inclusive.   =          DUPLEXTERN,  External item has multiple definitions.r  C             Error: The item you declared as externally defined withiF             the .EXTERNAL attribute has another conflicting definition&             within this assembly unit.  F             User Action: Check the definitions for the specified item.  ,          DUPLGLOBAL,  Duplicate global name.  C             Warning: The assember detected a duplicate global name.i  D             User Action: Check all references in your source code to             this name.  I                                                        Error Messages E-5  b  r              6       DUPMACPARAMNAME, Duplicate macro parameter name.  B          Error: The assembler detected a duplicate macro parameter          name.  -          User Action: Check your source code.e  C       ENDEXPSC, .END_EXACT is invalid in a psect with the NOEXE andM          NOMIX attributes.  C          Error: A .END_EXACT directive is not valid in a psect with (          the NOEXE and NOMIX attributes.  -          User Action: Check your source code.c  0       EOLEXP, Assembler expected an end of line.  E          Error: The assembler expected no more input from the current           line.  -          User Action: Check your source code.   B       ESCAPE, Illegal escape sequence in string literal; assembler           expected \, ", x, or X.  ?          Error: The escape sequence you specified in the stringa          literal is illegal.  -          User Action: Check your source code.f  ?       EXP32BITTRUNC, Assembler expected an integer in the rangeiF          0 . . . (2^32)-1 for an unsigned expression OR -(2^31) . .  .A          +(2^31)-1 for a signed expression. Data truncation to 32           bits.  D          Warning: The assembler found an integer that was not within          the expected range.  >          User Action: Check your source code. The literal must@          be within the range of 0 . . . (2^32)-1 for an unsignedG          expression OR -(2^31) . . . +(2^31)-1 for a signed expression. +          Data truncation to 32 bits occurs.   >       EXP32BITTYPE, Assembler expected an integer in the rangeC          0 . . . (2^32)-1 for unsigned expression OR -(2^31) . .  .r)          +(2^31)-1 for signed expression.r  @          Error: The assembler expected an unsigned integer valueG          within the range of 0 . . . (2^32)-1 or a signed integer valueo8          within in the range of -(2^31) . . . +(2^31)-1.  -          User Action: Check your source code.        E-6 Error Messages                   F          EXPBINEXPTERM,  Assembler found XXXXX when expecting a binary.             operator or expression terminator.  H             Error: The assembler expected a binary operator, such as theE             plus sign (+)  for binary addition, or an item to end theO<             expression, such as the right-angle bracket (>).  H             User Action: Check the flagged item in the source statement.  H          EXPFPREG,  Argument N is invalid. Assembler expected a floating             point register.   A             Error: The instruction argument cited is invalid. Then9             assembler expected a floating-point register.   C             User Action: Check your source code and the instructionH             documentation.  H          EXPGENREG,  Argument N is invalid. Assembler expected a general             register.   A             Error: The instruction argument cited is invalid. Ther2             assembler expected a general register.  C             User Action: Check your source code and the instruction              documentation.  A          EXPIDPROC,  Argument N is invalid. Assembler expected anh6             identifier representing a procedure value.  H             Error: The argument cited is invalid. The assembler expected@             a user identifier that represents a procedure value.  C             User Action: Check your source code and the instructionV             documentation.  D          EXPINTPAL,  Assembler expected an integer expression or PAL             opcode.o  ;             Error: Integer expession or PAL opcode missing.o  H             User Action: Replace the flagged item with an integer or PAL             opcode.o  C          EXPLAB,  Argument N is invalid. Assembler expected a labela&             defined in the same psect.  H             Error: The cited argument is invalid. The assembler expected@             a label definition to occur in the same psect as its             reference.  C             User Action: Check your source code and the instructioni             documentation.  I                                                        Error Messages E-7f n                 E       EXPLITVAL, Argument N is invalid. Assembler expected an integer :          literal value in the inclusive range 0 . . . 255.  >          Error: The instruction argument cited is invalid. TheB          assembler expected an integer literal within the range of          0 . . . 255.i  @          User Action: Check your source code and the instruction          documentation.d  :       EXPMACRONAME, Assembler expected a valid macro name.  A          Error: The assembler expected a valid macro name in thisE          context.   D          User Action: Check your source code to insure that the itemE          flagged is a user identifier, opcode, or nonmacro directive.   ?       EXPPALOPLIT, Argument N is invalid. Assembler expected an G          integer literal value in the inclusive range 0 . . . 67108863.e  >          Error: The instruction argument cited is invalid. The/          assembler expected an integer literal.t  @          User Action: Check your source code and the instruction          documentation.   D       EXPREGOFF, Argument N is invalid. Assembler expected a general4          register expression of the form offset(Rn).  E          Error: The cited argument is invalid. The assembler expectedlE          a general register expression of the form integer_offset(Rn)           for this argument.v  ?          User Action: Check the source code and the instruction           documentation.s  =       EXPRESEXP, Argument N is invalid. Assembler expected aneB          expression with no forward references resolvable to psect          +/- offset.  E          Error: The argument cited is invalid. The assembler expected 2          an expression with no forward references.  @          User Action: Check your source code and the instruction          documentation.o       E-8 Error Messages                   ?          EXPSTACKOVER,  Internal SEM expression stack overflow.   2             Fatal: An internal error has occurred.  E             User Action: Gather as much information as possible about G             the circumstances under which the error occurred and reporte#             the problem to Digital.   =          EXPTOOCMPLX,  Expression is too complex to evaluate.   E             Error: The expression is too complex for the assembler to              evaluate.e  E             User Action: Try grouping the expression components usingNB             angle brackets (< >). The most complex expression formH             handled by the assembler resolves to the form: <psect/symbolA             +/- offset> OPERATOR <psect/symbol +/- offset>, wherehH             OPERATOR is one of: +, -, *, /, @, \, &, or !. See Chapter 2C             for further descriptions of the assembler evaluation of              expressions.  H          EXPZEROFF,  Argument N is invalid. Assembler expected a general:             register expression of the form 0(Rn) or (Rn).  H             Error: The cited argument is invalid. The assembler expected<             a general register expression of the form 0(Rn).  E             User Action: Check your source code and see Chapter 2 forI;             information about general register expressions.   C          FOUNDEXP,  Assembler found XXXXX when expecting one of then             following: XXXXX.e  G             Error: The assembler found an unexpected item in a locationc-             where it expected something else.g  ?             User Action: Check the unexpected item found in theiC             source statement. Examine those items cited as expecteda4             as alternatives for the unexpected item.  G          FREGDEF,  You cannot define a floating-point register in terms.#             of an integer register.a  B             Warning: You are attempting to define a floating-point<             register symbol in terms of an integer register.  G             User Action: Specify either a floating-point register or an H             expression within the range of 0 to 31 with the .DEFINE_FREGG             directive. See Chapter 5 for information about the .DEFINE_i             FREG directive.p  I                                                        Error Messages E-9     E                      GENERROR, Generated ERROR:  =          Error: This statement was generated using the .ERRORh          directive.   /          User Action: Examine your source code.e          GENPRINT, Generated PRINT:  E          Informational: This statement was generated using the .PRINTo          directive.l  /          User Action: Examine your source code.A  !       GENWARN, Generated WARNING:t  A          Warning: This statement was generated using the .WARNINGr          directive.e  /          User Action: Examine your source code.o  D       HEXSTR, Illegal hexadecimal escape sequence in string literal.  E          Error: The specified hexadecimal escape sequence is invalid.   C          User Action: Check your source code and the documentation.   B       IDENTTRUNC, The string length of the module IDENT is greater>          than 31 characters. It is truncated to 31 characters.  C          Warning: The string argument you specified with the .IDENT           directive is too long.   <          User Action: Specify a shorter string argument. See>          Chapter 5 for information about the .IDENT directive.  B       IDFOUND, Assembler found identifier in the opcode field whenA          expecting one of the following: opcode, directive, macrou*          invocation, or symbol definition.  B          Error: The identifier cited was unexpected. The assemblerD          expected either an opcode, a directive, a macro invocation,           or a symbol definition.  -          User Action: Check your source code.I  9       IDTOOLONG, Identifier is longer than 31 characters.T  E          Error: The identifier exceeds the 31 character maximum size.e  A          User Action: Check your source code and either rename oro!          truncate the identifier.        E-10 Error Messagesl c  p              +          ILLASCII,  Illegal ASCII constant.r  E             Error: The assembler found an illegal ASCII constant withc)             the 6A or ^a radix specifier.o  0             User Action: Check your source code.  *          ILLBIN,  Illegal binary constant.  F             Error: The assembler found an illegal binary constant with)             the ^B or ^b radix specifier.o  0             User Action: Check your source code.  +          ILLDEC,  Illegal decimal constant.f  F             Error: The assembler found an illegal binary constant with)             the ^D or ^d radix specifier.   0             User Action: Check your source code.  @          ILLEXPON,  Illegal exponent in floating-point constant.  H             Error: The specified exponent of the floating-point constant             is illegal.p  E             User Action: Check your source code and see Chapter 5 for 7             information about floating-point constants.i  4          ILLFLOAT,  Illegal floating-point constant.  D             Error: The specified floating-point constant is illegal.  E             User Action: Check your source code and see Chapter 5 for 7             information about floating-point constants.   /          ILLHEX,  Illegal hexadecimal constant.s  F             Error: The assembler found an illegal binary constant with)             the ^X or ^x radix specifier.r  0             User Action: Check your source code.  (          ILLIFOP,  Illegal .IF operator.  @             Error: An illegal operator was encountered as an .IF             operator.   E             User Action: Check your source code and see Chapter 5 for 0             information about the .IF directive.  I                                                       Error Messages E-11                    3       ILLINCL, Illegal .INCLUDE file specification.   =          Error: The assembler encountered an illegal .INCLUDE,          directive.T  B          User Action: Check your source code and see Chapter 5 for2          information about the .INCLUDE directive.  %       ILLOCT, Illegal octal constant.   C          Error: The assembler found an illegal binary constant with &          the ^O or ^o radix specifier.  -          User Action: Check your source code.s  9       ILLOPERANDMIX, Illegal operand mixing for operator.o  @          Error: The resolved operand types are invalid when used.          together with the specified operator.  B          User Action: See the descriptions of operators, operands,&          and expressions in Chapter 2.  <       ILLPROCRET, Illegal procedure return; linkage registerA          (argument 1) must be R31 when software hint (argument 3)i          is 1.  )          Error: Illegal procedure return.e  D          User Action: Check the instruction arguments. When argumentB          3, software hint, is 1, the first argument specifying the&          linkage register must be R31.  D       ILLRADIX, Illegal radix specifier in numeric constant; specify          A, B, C, D, O, or X.u  ?          Error: The assembler found an illegal radix specifier.E  D          User Action: Check your source code and use one of A, B, C,          D, O, or X.  C       INCLDEPTH, .INCLUDE nest depth exceeds N - check for circular           .INCLUDE.  C          Error: The assembler attempted to exceed the maximum levelE          of include file depth.b  >          User Action: Check your source code for circular file          inclusion.        E-12 Error Messagese                   -          INCLOPEN,  .INCLUDE file open error.S  B             Error: The assembler could not open the included file.  F             User Action: Check the file attributes and so forth of the$             specified .INCLUDE file.  I          INSNOTINPSC,  Instructions must be in a MIX, NOEXE; MIX, EXE; orU             NOMIX, EXE PSECT.o  ?             Error: You specified an instruction in a psect withA'             incorrect psect attributes.a  E             User Action: Make sure the psect has MIX or EXE and NOMIXe             attributes set.o  G          INTERNAL,  Internal assembler error. Please report the probleme             to Digital.   2             Fatal: An internal error has occurred.  E             User Action: Gather as much information as possible aboutdG             the circumstances under which the error occurred and report #             the problem to Digital.a  G          INTERR,  Internal processing error in the SYN facility. Please *             report the problem to Digital.  2             Fatal: An internal error has occurred.  E             User Action: Gather as much information as possible about G             the circumstances under which the error occurred and report #             the problem to Digital.s  F          INVALIGNFILL,  You specified an invalid optional fill pattern&             with the .ALIGN directive.  B             Error: You specified an invalid optional fill pattern.  B             User Action: Check your source code, in particular theG             second argument to the .ALIGN directive, the alignment fill D             specifier, to insure that it resolves to an integer. SeeA             Chapter 5 for information about the .ALIGN directive.r    I                                                       Error Messages E-13e r  i              9       INVBASEEXP, Invalid expression for .BASE directive.e  @          Error: The expression is not valid for .BASE directive.  =          User Action: The expression you specified for a baseaD          register with the .BASE directive should contain no forwardE          references and resolve to one of the following at this pointiA          in assembly: psect +/- offset, external symbol referenceR?          +/- offset, integer, label +/- offset, where the labelhA          is defined in a psect with the EXE and NOMIX attributes.t?          See Chapter 5 for more information about the assemblerl#          evaluation of expressions.e  E       INVBASEREG, Invalid base register. Base register must be one ofC          R0 through R30.  7          Error: You specified an invalid base register.   C          User Action: Specify a base register as a general register E          from the range of R0 . . . R30. R31 cannot be specified as a A          base register and is implicitly defined as .BASE R31, 0.   ?       INVBRTGT, Invalid branch target. Branch target label must A          be defined in same psect as the branch instruction which           references the label.  B          Error: The specified label you reference as the target ofB          a branch instruction must be defined in the same psect in           which it is referenced.  >          User Action: See Chapter 4 for more information about          labels.  E       INVCA, You specified an invalid code address with the procedure B          descriptor. The code address must be a nontemporary labelC          defined in a psect with the EXE or MIX attribute after itsr(          use with .PROCEDURE_DESCRIPTOR.  E          Error: The code address you specified as the second argumento;          to the .PROCEDURE_DESCRIPTOR directive is invalid.n  D          User Action: The code address must be a non-temporary labelB          defined in a psect with the EXE or NOMIX attribute. Check          your source code.       E-14 Error Messagesi                   >          INVEXP,  Assembler found XXXXX when expecting a valid             expression.h  H             Error: The assembler expected one of the following: integer,F             floating-point constant, identifier, register, period (.),7             left-angle bracket (<),  or unary operator.t  F             User Action: Check the unexpected item found in the source             statement.  ?          INVEXPRFORDIR,  Invalid expression type for directive.+  E             Error: The assembler resolved value for the expression ind+             the cited directive is invalid.h  H             User Action: See Chapters 1 and 5 for more information about.             the directive arguments and types.  <          INVEXPRFORSYM,  Invalid expression type for symbol.  G             Error: The assembler resolved value for the expression that ?             is assigned to a local or global symbol is invalid..  F             User Action: Expressions assigned to a symbol must containC             no forward references and must resolve to an integer or F             psect/label +/- offset. See Chapter 2 for more informationD             about how the assembler determines symbol and expression             values.,  I          INVFPCONST,  Invalid floating-point value. Check value range fori%             floating-point data type.c  C             Error: The assembler detected an invalid floating-pointf             value.  D             User Action: Check the specified range for the directive             type.o  I          INVINSQUAL,  You specified an invalid instruction qualifier listd             for the opcode.t  C             Error: The instruction qualifier you specified with theh             opcode is invalid.  F             User Action: See Appendix A for a complete list of opcodes-             and valid instruction qualifiers..  I                                                       Error Messages E-15     d              B       INVLCA, Assembler found an invalid or undefined code address&          for the procedure descriptor.  C          Error: An invalid or undefined code address corresponds to ,          the specified procedure descriptor.  C          User Action: Check your source code for the specified codem          address.t  C       INVLISTOPT, You specified an invalid option with the .LIST org          .SHOW directive.m  A          Error: You specified an invalid option with the .LIST or           .SHOW directive.   =          User Action: See Chapter 5 for valid .LIST and .SHOWp          directive options.e  +       INVLPD, Invalid procedure descriptor.T  D          Error: You specified an invalid procedure descriptor. ThereE          was no definition of a procedure descriptor by the specified           name.  -          User Action: Check your source code.t  E       INVNLISTOPT, You specified an invalid option with the .NLIST or           .NOSHOW directive.e  B          Error: You specified an invalid option with the .NLIST or          .NO_SHOW directive.  A          User Action: See Chapter 5 for valid .NLIST and .NO_SHOW           directive options.u  @       INVOFF, You attempted to specify data intialization with a?          current psect offset that is outside the range of 0 toe          2147483647.  D          Error: The current psect offset is invalid for specifying a          data initialization.l  A          User Action: Check your source code and the value of theo          current psect offset.       E-16 Error Messages  c  o              F          INVREGNUMEXP,  Invalid register-number expression. Specify anG             integer expression between 0 and 31 or a previously definede#             or predefined register.l  E             Error: You specified an illegal expression for a register              symbol definition.  B             User Action: Specify a value between 0 and 31. You canC             also define a register in terms of a previously-defined #             or predefined register.,  E          INVREPCOUNT,  The integer value of the .REPEAT expression isxI             not within the inclusive range of 0 . . . 65535. A 0 value isn             assumed.  G             Warning: The value of the .REPEAT expression must be within(B             the range of 0 . . . 65,535, inclusive. Therefore, a 0(             expression value is assumed.  A             User Action: Specify a repetition count between 0 ande             65,535, inclusive.  E          INVSAVEOPT,  You specified an invalid option with the .SAVE_              PSECT directive.  G             Error: You specified an invalid option with the .SAVE_PSECTf             directive.  F             User Action: See Chapter 5 for valid .SAVE_PSECT directive             options.  5          INVTEMPLAB,  Invalid use of temporary label.C  E             Error: A temporary label reference is not allowed in this              context.  B             User Action: See Chapter 2 for information about using             temporary labels.c  F          INVTERM,  Assembler found N when expecting a valid expression             term.   B             Error: The assembler found an unexpected item where itE             expected one of the following expressions: floating-point I             number, integer, register, decimal point (.),  identifier, orc#             left-angle bracket (<).r  A             User Action: Check the item flagged by the assembler.y  I                                                       Error Messages E-17P T  <              B       IREGDEF, You cannot define an integer register in terms of a!          floating-point register.   B          Warning: You are attempting to define an integer register>          symbol in terms of a floating-point register. IREGDEF  >          User Action: Specify either an integer register or anA          expression within the range of 0 to 31 with the .DEFINE_v          IREG directive.  #       LABELNOTDEF, Undefined label.e  5          Error: The label you specified is undefined.k  B          User Action: See Chapters 2 and 4 for descriptions of the          valid labels.  1       LABELREDECL, Illegal redefinition of label.   A          Error: You have illegally defined this label in multiple &          places in this assembly unit.  @          User Action: Check all references to this label in your          source code.r  7       LABNOTINPSECT, Label must be declared in a PSECT.   D          Error: You are attempting to declare a temporary, local, or9          global label without first establishing a psect.F  @          User Action: Make sure you enter the appropriate .PSECTD          directive before declaring the label in your source stream.  1       LEXOPEDITSPEC, Unrecognized edit specifier.o  C          Error: The assembler does not recognize the edit specifiere(          for the %EDIT lexical operator.  B          User Action: Check your source code and see Chapter 3 for6          information about the %EDIT lexical operator.  C       LEXOPENDM, Illegal modification of .ENDM directive keyword by           lexical operation.   <          Error: While your macro definition contains a .ENDM<          directive that ends the macro definition, the .ENDMC          directive is modified by a lexical operator so that it canxC          no longer be recognized as a .ENDM directive keyword after           lexical processing.  A          User Action: Change the statement to avoid modifying theUB          .ENDM directive keyword with lexical operator processing.E          See Chapter 3 for information about using lexical operators.A       E-18 Error Messagese                   G          LEXOPENDR,  Illegal modification of .ENDR directive keyword bye             lexical operation.  E             Error: While your repeat range contains a .ENDR directive G             that ends the repeat block, the .ENDR directive is modified H             by a lexical operator so that it can no longer be recognizedB             as a .ENDR directive keyword after lexical processing.  D             User Action: Change the statement to avoid modifying theE             .ENDR directive keyword with lexical operator processing.aH             See Chapter 3 for information about using lexical operators.  G          LEXOPSYNTAX,  Illegal lexical operator syntax (missing left or G             right parenthesis, missing comma, or other lexical operator              syntax error).  E             Error: The indicated lexical operator has a syntax error.l  H             User Action: Check the source code to insure correct syntax.  C          LEXSYM,  XXXXX is already a lexical string symbol name; itc1             cannot also be a numeric symbol name.h  B             Error: You cannot define a lexical string symbol and a,             numeric symbol by the same name.  E             User Action: Check your source code and remove either then<             lexical string or the numeric symbol definition.  H          LIBMOD_BADFORMAT,  Library module XXXXX contains illegal syntaxE             (missing .MACRO or label preceding .MACRO, missing or notx9             matching .ENDM, or other macro syntax error).c  <             Error: The assembler encountered illegal syntax.  7             User Action: Check the syntax of the macro.h  6          LIBMOD_EMPTY,  Library module XXXXX is empty.  G             Warning: The assembler encountered an empty library module.   4             User Action: Replace the library module.  E          LIBMOD_EXTRA,  Library module XXXXX contains extraneous text >             after .ENDM; the assembler ignores the extra text.  G             Warning: The assembler encountered extraneous text after an:F             .ENDM directive in a library module. The assembler ignores             this text.  4             User Action: Correct the library module.  I                                                       Error Messages E-19L ,  l              7       LIBMOD_NOT_FOUND, Library module XXXXX not found.t  B          Error: The assembler could not find the indicated library          module.  A          User Action: Check the spelling of the macro library andn          module names.  C       LOCCTRNOTDATA, Location counter cannot be set in a psect withu&          the EXE and NOMIX attributes.  A          Error: You cannot modify the location counter in a psecte+          with the EXE and NOMIX attributes.l  A          User Action: If you need to modify the location counter,u=          specify the MIX psect attribute. See Chapter 5 for at0          description of the MIX psect attribute.  A       MACCASEMATCH, Library macro name is spelled using different :          alphabetic case than in .MCALL directive or macro          invocation.  C          Error: There is an alphabetic case difference between that B          specified in the macro library and what you specified for          the macro name.  >          User Action: Check the case of the macro name in yourE          source code and the case of the macro in the specified macro           library.   ?       MACEXPNEST, Macro expansion exceeds maximum nesting depth^(          (macro recursion not detected).  B          Error: The macro is not recursive but exceeds the maximum#          allowable expansion depth.E  9          User Action: Check your source code for possible           restructuring.i  E       MACPARAMGENDEF, You can specify a generated label default value,1          or a default string value, but not both.   ?          Error: You specified both a default string value and a E          generated label default value when you can only specify one.   /          User Action: Examine your source code.e       E-20 Error Messagesh                   I          MACPARAMSYNTAX,  Illegal macro parameter syntax. Assembler found .             XXXXX when expecting one of XXXXX.  5             Error: Macro parameter syntax is invalid.r  G             User Action: Try replacing the unexpected argument with one -             of those items cited as expected.   E          MACRECURSE,  Recursive macro exceeds maximum macro expansion              nesting depth.  A             Error: The macro is recursive and exceeds the maximum $             expansion nesting depth.  H             User Action: Check your source code for a missing basis step#             in the recursive macro.r  G          MACZERO,  Assembler cannot evaluate expression. A 0 expressiona             value is assumed.   H             Informational: The assembler cannot evaluate this expressionA             due to errors it encountered. Therefore, a 0 value ise             assumed.  E             User Action: Check the expression for forward or externalS             references.u  <          MAXIF,  Maximum nesting of .IF directives exceeded.  G             Error: The maximum depth nesting of .IF directives has been              exceeded.c  <             User Action: Check your source code for possible             restructuring.  H          MAXLEXOP,  More than N lexical operators encountered; check for.             a recursive lexical string symbol.  @             Error: Your source line contains an excessive numberC             of lexical operators. A recursive lexical string symbol H             definition occurs when you initially define a lexical stringD             symbol in terms of itself using the lexical substitutionE             operator. While the assembler normally interprets lexicalt?             substitution operators during lexical string symbol B             definition, it cannot in this case because the lexicalF             string symbol is not yet defined. When the assembler later  I                                                       Error Messages E-21p f                 D          expands such a lexical string symbol with the imbedded self/          reference, infinite recursion results.   B          User Action: Check your source code for recursive lexical=          string symbol definitions and redefine them to avoidt          recursion.   +       MISSENDC, Missing .ENDC directive(s).   B          Warning: The assembler could not find a terminating .ENDC          conditional directive.   -          User Action: Check your source code.e  +       MISSINGENDM, Missing .ENDM directive.S  @          Error: The assembler could not find a terminating .ENDM/          directive to match a .MACRO directive.   -          User Action: Check your source code.d  +       MISSINGENDR, Missing .ENDR directive.d  B          Error: The assembler could not find an .ENDR directive to-          terminate an .IRP or a.REPEAT block.i  -          User Action: Check your source code.e  A       MISSQUOTE, Missing closing double-quote character in stringe          literal.i  C          Error: The closing double-quote is missing from the stringr          literal.t  A          User Action: Check your source code and insert a closing +          double-quote for a string literal.i  A       MODCODLOCCTR, Restoring the location counter in the current ?          context causes an illegal modification of the locationc?          counter for a psect with the EXE and NOMIX attributes.g  A          Error: You cannot modify the location counter in a psectt+          with the EXE and NOMIX attributes.   A          User Action: If you need to modify the location counter, =          specify the MIX psect attribute. See Chapter 5 for ac0          description of the MIX psect attribute.       E-22 Error Messages  e  c              @          NOBEGEX,  Assembler encountered an unmatched .END_EXACT             directive.  D             Error: The assembler encountered an .END_EXACT directive,             before a .BEGIN_EXACT directive.  0             User Action: Check your source code.  E          NOCA,  You did not specify a code address as argument 2 with "             .PROCEDURE_DESCRIPTOR.  C             Error: You did not specify a code address as the secondO<             argument to the .PROCEDURE_DESCRIPTOR directive.  F             User Action: The code address must be a nontemporary labelE             defined in a psect with the EXE or NOMIX attribute. Checkb             your source code.   F          NOQUAL,  Instruction qualifiers are invalid with this opcode.  F             Error: You cannot specify instruction qualifiers with this             opcode.i  F             User Action: See Appendix A for a complete list of opcodes-             and valid instruction qualifiers.   B          NOTAQUAL,  An item you specified in the qualifier list is%             invalid with this opcode.   C             Error: The instruction qualifier you specified with thei             opcode is invalid.  F             User Action: See Appendix A for a complete list of opcodes-             and valid instruction qualifiers.u  >          NOTENOUGHARGS,  Not enough arguments for instruction.  ?             Error: The instruction needs one or more additionalr             arguments.  H             User Action: Check the argument numbers and required formats&             as specified in Chapter 5.  D          NOTINMACRO,  This statement must occur only within a macro.  G             Error: The statement you specified is only allowed within aA             macro.  ?             User Action: See Chapter 2 for a description of the               statement specified.  I                                                       Error Messages E-23                    -       NOTINSEM, Missing functionality in SEM.   ?          Error: This functionality is missing in the assembler.l  ;          User Action: Please report the problem to Digital.e  D       NUMSYM, XXXXX is already a numeric symbol name; it cannot also)          be a lexical string symbol name.A  @          Error: You cannot define a numeric symbol and a lexical(          string symbol by the same name.  B          User Action: Check your source code and remove either the9          numeric or the lexical string symbol definition.d  =       OPTIGN, The assembler is ignoring one or more VAX MACROt          options.   <          Informational: The assembler detected and ignored a          VAX MACRO option.  E          User Action: Remove the VAX MACRO options from your MACRO-64 3          Assembler for OpenVMS AXP Systems program.d  =       OVERLAP, Assembler detected overlapping initializers at.C          offset NN. This initial value overlaps but is not an exactt2          replacement for a previous initial value.  ?          Error: You are trying to assign or initialize multiplem:          values to the same location. This is not allowed.  -          User Action: Check your source code.d  ;       PSECTALIGNCON, PSECT alignment conflicts with earlieri          declaration.   @          Error: A previously specified psect alignment attribute4          conflicts with the flagged psect attribute.  >          User Action: Check all declarations of the psect. See@          Chapter 5 for a description of the .PSECT directive and          psect attributes.  :       PSECTATTRCON, PSECT attribute conflicts with earlier          declaration.   E          Error: A previously specified psect attribute conflicts withI%          the flagged psect attribute.   >          User Action: Check all declarations of the psect. See@          Chapter 5 for a description of the .PSECT directive and          psect attributes.       E-24 Error Messageso o  u              B          REGREDEF,  You attempted to redefine a previously defined3             register symbol with a different value.   E             Warning: You are attempting to change the definition of aiF             register symbol that either you have previously defined or)             that MACRO-64 has predefined.   E             User Action: Check for conflicts with the register-symbol B             identifier you have specified. If you wish to redefineA             a register symbol, you must first cancel its previousr8             definition with the .UNDEFINE_REG directive.  F          REDUNDELSE,  You cannot specify more than one .ELSE directive&             within a single .IF block.  @             Error: The assembler encountered more than one .ELSE0             directive within a single .IF block.  0             User Action: Check your source code.  6          RESTOREWOSAVE,  PSECT .RESTORE without .SAVE.  C             Error: You entered a .RESTORE_PSECT directive without a 9             previous corresponding .SAVE_PSECT directive.   D             User Action: Check the uses of .SAVE_PSECT and .RESTORE_&             PSECT in your source code.  A          SAVESTACKOVER,  Internal SEM PSECT .SAVE stack overflow.   2             Fatal: An internal error has occurred.  E             User Action: Gather as much information as possible abouteG             the circumstances under which the error occurred and report #             the problem to Digital.i  -          SRCREAD,  Error reading source file.t  E             Error: The assembler encountered an error in reading yourc             source file.  G             User Action: Check file specifications, protections, and sor             forth.  7          SYMBOLREDECL,  Illegal redefinition of symbol.   >             Error: The symbol is already defined as a label orH             explicitly declared as externally defined with the .EXTERNAL             directive.  7             User Action: Check all uses of this symbol.s  I                                                       Error Messages E-25l n  x              6       TOOMANYARGS, Too many arguments for instruction.  C          Error: The instruction contains one or more arguments than           necessary.t  E          User Action: Check the argument numbers and required formats #          as specified in Chapter 5.e  B       TOOMANYMACARG, You specified more arguments than are defined          for this macro.  C          Error: You specified more arguments on the macro call than +          were specified for its definition.   E          User Action: Check the macro definition and point of call ine          your source code.  2       TOOMANYMACPARAMS, Too many macro parameters.  8          Error: You specified too many macro parameters.  -          User Action: Check your source code.   )       TRUNCDATA, Data truncation warning.n  E          Warning: You specified a data value that is out of range foreC          the specified directive, which results in data truncation.f  .          User Action: Specify a smaller value.  =       UNDCA, You specified an undefined code address with thei          procedure descriptor.  E          Error: The code address you specified as the second argumentA=          to the .PROCEDURE_DESCRIPTOR directive is undefined.r  C          User Action: The code address must be a nontemporary labelaB          defined in a psect with the EXE or NOMIX attribute. Check          your source code.  ?       UNDEFSYM, Undefined symbol or label. Assembler assumes any          .EXTERNAL definition.  A          Warning: The referenced label or symbol does not have anbC          explicit definition and an external definition is assumed.x  @          User Action: Use the .EXTERNAL directive to declare the          symbol.       E-26 Error Messagest %  T              0          UNEXPELSE,  Unexpected .ELSE directive.  @             Error: The assembler encountered an unexpected .ELSE             directive.  E             User Action: Check the use of the .ELSE directive in yournC             source code to insure proper positioning with a .IF andr             .ENDC directive.  0          UNEXPENDC,  Unexpected .ENDC directive.  G             Error: The assembler could not find a terminating .ENDC fore7             a macro conditional directive, such as .IF.y  0             User Action: Check your source code.  0          UNEXPENDM,  Unexpected .ENDM directive.  @             Error: The assembler encountered an unexpected .ENDM             directive.  C             User Action: Check your source code for matching .MACRO              /.ENDM pairs.y  0          UNEXPENDR,  Unexpected .ENDR directive.  @             Error: The assembler encountered an unexpected .ENDR             directive.  D             User Action: Check your source code for matching .REPEAT2             /.ENDR and .IRP/.ENDR directive pairs.  :          UNEXPIFF,  Unexpected .IF_FALSE (.IFF) directive.  D             Error: The assembler encountered an unexpected .IF_FALSE             directive.  C             User Action: Check your source code to insure that thisY1             directive occurs within an .IF block.t  9          UNEXPIFT,  Unexpected .IF_TRUE (.IFT) directive.l  C             Error: The assembler encountered an unexpected .IF_TRUEi             directive.  C             User Action: Check your source code to insure that thise1             directive occurs within an .IF block.X  A          UNEXPIFTF,  Unexpected .IF_TRUE_FALSE (.IFTF) directive.s  D             Error: The assembler encountered an unexpected .IF_TRUE_             FALSE directive.  C             User Action: Check your source code to insure that thisC1             directive occurs within an .IF block.   I                                                       Error Messages E-27F A                 .       UNEXPMEXIT, Unexpected .MEXIT directive.  >          Error: The assembler encountered an unexpected .MEXIT          directive.o  -          User Action: Check your source code.T  6       UNKDIR, Assembler found unknown directive XXXXX.  .          Error: An internal error has occured.  B          User Action: Gather as much information as possible aboutD          the circumstances under which the error occurred and report           the problem to Digital.  ?       UNKENDISOPTION, You specified an unknown .ENABLE/.DISABLEx          option.  @          Error: The option you specified for .ENABLE/.DISABLE is          incorrect.a  A          User Action: Check the option specified with the .ENABLEe          /.DISABLE directive.a  +       UNKNOWNATTR, Unknown PSECT attribute.   D          Error: The assembler does not recognize the specified psect          attribute.   C          User Action: See Chapter 5 for a description of the .PSECTT(          directive and psect attributes.  >       UNTERMEX, Assembler detected N unterminated .BEGIN_EXACT%          directive(s) in psect XXXXX.c  A          Error: Unmatched .BEGIN_EXACT directive(s) occur for thea          indicated psect.,  -          User Action: Check your source code.   =       VAXDIR, The assembler is ignoring one or more VAX MACROnC          directives or options. Assembler continues processing with           the next line.   <          Informational: The assembler detected and ignored a'          VAX MACRO directive or option.   ?          User Action: Remove the VAX MACRO directives from yourt<          MACRO-64 Assembler for OpenVMS AXP Systems program.       E-28 Error Messagese    e              G          VMACELSE,  You cannot specify .ELSE in the same .IF block with G             either .IF_FALSE (.IFF), .IF_TRUE (.IFT), or .IF_TRUE_FALSE              (.IFTF).  F             Error: The assembler encountered an .ELSE directive withinF             the same .IF block as an .IF_FALSE, .IF_TRUE, or .IF_FALSE             directive.  E             User Action: Check your source code and remove either thea3             .ELSE directive or the .IF_x directive.e  F          WRONGMACID,  Macro name in .ENDM does not match corresponding             .MACRO.b  H             Error: The macro name you specified as the optional argumentH             to the .ENDM directive does not match the name you specified4             with the corresponding .MACRO directive.  H             User Action: Check your souce code for matching .MACRO/.ENDM             directive pairs.  D          WRONGPL,  The code address you specify with the .PROCEDURE_F             DESCRIPTOR directive must occur BEFORE its definition as a"             local or global label.  F             Error: The code address you specify as the second argumentH             to the .PROCEDURE_DESCRIPTOR directive must occur before itsF             definition as a nontemporary label defined in a psect with'             the EXE or NOMIX attribute.t  0             User Action: Check your source code.                            I                                                       Error Messages E-29T m  o                    I                                                                         FrI         _________________________________________________________________e  H                                                  MACRO-64 Listing Format    I               This appendix contains a sample MACRO-64 program, comprised:B               of Examples F-1 and F-2, that shows the listing fileD               format. Example F-3 shows the resulting output file in$               binary listing format.  H               For more information about control of the listing file andI               its contents, see the description of the .SHOW directive inm               Chapter 5.  $         Example F-1 Main Source File           .title LIST "Example":         .ident "V1.0" #         .show include, conditionalsn         .show expansions         .enable align_data"         .enable peephole, schedule           .subtitle "Definitions"."         .include "DEFINITIONS.M64"           .noshow expansions           .subtitle "Linkage"a         $linkage_section         DATA_PTR:          .address DEFAULT_DATAy         .if eq, OPTION, 1a           . = DATA_PTR            .address OPTIONAL_DATA
         .endcu  I                                                  (continued on next page)       I                                              MACRO-64 Listing Format  F-1i i                 (     Example F-1 (Cont.) Main Source File       .subtitle "Routine ZING"     .show binary     $routine ZING, kind=stack        .base r27,$ls        addq  r16,r17,r22s       addq  r1,r18,r22       addq  r19,r20,r23c       addq  r21,r22,r23        ldq   r0,DATA_PTR        .begin_exact         stq r31,0(r0)s         stq r22,8(r0)i         stq r23,16(r0)       .end_exact
       $return      $end_routine ZINGo       .end  #     Example F-2 Include Source File   +     .macro DEFINE SYMBOL, VALUE, SOFT=FALSE #       .if identical, <SOFT>, <TRUE>o         .if defined, SYMBOLN8           .print "Using /DEFINE=SYMBOL=%integer(SYMBOL)"           .mexit
         .endc        .endcD       SYMBOL = VALUE     .endm DEFINE  %     DEFINE OPTION, VALUE=0, SOFT=TRUEr  &     Example F-3 Example Listing Output  E                                              (continued on next page)                    F-2 MACRO-64 Listing Format                    2         Example F-3 (Cont.) Example Listing Output  S         LIST   Example      1       26-AUG-1993 11:38:22   MACRO-64 V1.1   Page   1oO         V1.0   Definitions           26-AUG-1993 11:38:17   [PROJ]EXAMPLE.M64;3   @                                        2 1 .title LIST "Example"9                                           2 .ident "V1.0"nI                                           3 .show include, conditionals 3 <                                           4 .show expansions>                                           5 .enable align_dataF                                           6 .enable peephole, schedule+                                           7aC                                           8 .subtitle "Definitions"nF                                           9 .include "DEFINITIONS.M64"R                                4 1      10 .macro DEFINE SYMBOL, VALUE, SOFT=FALSEK                                   1      11   .if identical, <SOFT>, <TRUE> C                                   1      12     .if defined, SYMBOLaX                                   1      13       .print "Using /DEFINE=SYMBOL=%integer(6                                             SYMBOL)" 58                                   1      14       .mexit5                                   1      15     .endcd3                                   1      16   .endcR<                                   1      17   SYMBOL = VALUE8                                   1      18 .endm DEFINE+                                   1      19oM                                   1      20 DEFINE OPTION, VALUE=0, SOFT=TRUEt-                                             1 J         %MACRO64-I-GENPRINT, (1) Generated PRINT: Using /DEFINE=OPTION=1 6  X         %MACRO64-I-MACAUXMSG1, (1) This condition occurred in the expansion of macro DEF(         INE at line 3 of its definition./         \      .print "Using /DEFINE=OPTION=1"\f  I                                                  (continued on next page),                      I                                              MACRO-64 Listing Format  F-3     r              .     Example F-3 (Cont.) Example Listing Output  F                         7 1  1           .if identical, <TRUE>, <TRUE>?                            1  1             .if defined, OPTIONfT                            1  1               .print "Using /DEFINE=OPTION=%integer(0                                         OPTION)"K     *INFO* 8              1  1* 9           .print "Using /DEFINE=OPTION=1"u4                            1  1               .mexit'                                      21s=                                      22 .noshow expansions 10:'                                      23w;                                      24 .subtitle "Linkage"S8                                      25 $linkage_section1                      0000 11        757 DATA_PTR: =     XXXXXXXXXXXXXXXX 0000 12        758 .address DEFAULT_DATA 9     0000000000000001 0008 13        759 .if eq, OPTION, 1E     0000000000000001 0008 6     0000000000000000'0000 14        760   . = DATA_PTR@     0000000000000000'0000           761   .address OPTIONAL_DATA-                      0008           762 .endc '                      0008           763 @                      0008           764 .subtitle "Routine ZING"7                      0008           765 .show binary 15cA                      0008           766 $routine ZING, kind=stackcT     16           00000000  2   *          .psect $DATA$,OCTA,NOPIC,CON,REL,LCL,NOSHR5                                         ,NOEXE,RD,WRTIT                  00000008  2   *          .psect $LINK$,OCTA,NOPIC,CON,REL,LCL,NOSHR7                                         ,NOEXE,RD,NOWRTMR                 3089 0008  2              .word MACRO64$PD_KIND ! MACRO64$PD_FLAGS;                 0008 000A  2              .word $RSA_OFFSET 1                   00 000C  2              .byte 0tT                   00 000D  2              .byte <MACRO64$FUNC_RETURN&^X1F>!<<MACRO64@                                         $EXCEPTION_MODE&^X1F>@4>I                 0001 000E  2              .word MACRO64$DEFAULT_SIGNATUREeD     0000000000000000'0010  2              .address <MACRO64$ENTRY_0>  E                                              (continued on next page)n                     F-4 MACRO-64 Listing Formate s                 2         Example F-3 (Cont.) Example Listing Output  T         LIST   Example               26-AUG-1993 11:38:22   MACRO-64 V1.1   Page   2O         V1.0   Routine ZING          26-AUG-1993 01:29:34   [PROJ]EXAMPLE.M64;3   9                 00000020 0018  2              .long $SIZEd5                     0000 001C  2              .word 0pX                     0014 001E  2              .word MACRO64$END_PROLOGUE_0-MACRO64$ENTRY.                                             _0K                 20000000 0020  2              .long MACRO64$SAVED_IREG_MASK K                 00000000 0024  2              .long MACRO64$SAVED_FREG_MASKdX                      00000000  2   *          .psect $CODE$,OCTA,PIC,CON,REL,LCL,SHR,EXE7                                             ,NORD,NOWRTtB                 23DEFFE0 0000  3              LDA $SP, -$SIZE($SP)X                 B77E0000 0004  2              .iif ne, <MACRO64$PD_FLAGS&MACRO64$M_BASE_F                                             REG_IS_FP>, STQ $PV, ($SP)H                 B75E0008 0008  2              STQ  $RA, $RSA_OFFSET($SP)X                 B7BE0010 000C  3   *          STQ  MACRO64$R29,$RSA_OFFSET+<MACRO64$RS_C8                                             OUNT*8>($SP)9                 47FE041D 0010  2            MOV  $SP, $FPl;                 00000008'0014          2090   .base r27,$lsh?               *Optimized* 17           2091   addq  r16,r17,r22r>               *Optimized*              2092   addq  r1,r18,r22?               *Optimized*              2093   addq  r19,r20,r23i?               *Optimized*              2094   addq  r21,r22,r23e?               *Optimized*              2095   ldq   r0,DATA_PTR.:                                        2096   .begin_exact=                 B7E00000 0028          2097     stq r31,0(r0) =                 B6C00008 002C          2098     stq r22,8(r0) >                 B6E00010 0030          2099     stq r23,16(r0)8                                        2100   .end_exact5                          0034          2101   $return X               *Optimized*      1                .iif ne, <MACRO64$PD_FLAGS&MACRO64$M_BASF                                             E_REG_IS_FP>, MOV $FP, $SPR               *Optimized*      1                LDQ  MACRO64$R28, $RSA_OFFSET($SP)P               *Optimized*      1                LDQ  $FP, MACRO64$FP_OFFSET($SP)C               *Optimized*      2                LDA $SP, $SIZE($SP) B               *Optimized*      1                RET  (MACRO64$R28)=                                        2205 $end_routine ZING +                          0048          2206 0                                        2207 .end  I                                                  (continued on next page)n    I                                              MACRO-64 Listing Format  F-5  e  c              .     Example F-3 (Cont.) Example Listing Output  P     LIST 18Machine Code Listing  26-AUG-1993 11:38:22   MACRO-64 V1.1   Page   3K     V1.0   $CODE$                26-AUG-1993 11:38:17   [PROJ]EXAMPLE.M64;3o  S                                     .PSECT  $CODE$, OCTA, PIC, CON, REL, LCL, SHR,- <                                             EXE, NORD, NOWRT  "                  0000       ZING::,                  0000       MACRO64$ENTRY_0:S     23DEFFE0 19  0000 20         21 LDA     SP, -32(SP)   ; SP, -32(SP) 22 ; 000766iE     B77E0000     0004               STQ     R27, (SP)     ; R27, (SP)gF     B75E0008     0008               STQ     R26, 8(SP)    ; R26, 8(SP)F     B7BE0010     000C               STQ     FP, 16(SP)    ; FP, 16(SP)B     47FE041D     0010               MOV     SP, FP        ; SP, FP3                  0014       MACRO64$END_PROLOGUE_0: S     42110416     0014               ADDQ    R16, R17, R22 ; R16, R17, R22  ; 002091 S     A41BFFF8     0018               LDQ     R0, -8(R27)   ; R0, -8(R27)    ; 002095 S     40320416     001C               ADDQ    R1, R18, R22  ; R1, R18, R22   ; 002092iS     42740417     0020               ADDQ    R19, R20, R23 ; R19, R20, R23  ; 002093 S     42B60417     0024               ADDQ    R21, R22, R23 ; R21, R22, R23  ; 002094tS     B7E00000     0028               STQ     R31, (R0)     ; R31, (R0)      ; 002097eS     B6C00008     002C               STQ     R22, 8(R0)    ; R22, 8(R0)     ; 002098sS     B6E00010     0030               STQ     R23, 16(R0)   ; R23, 16(R0)    ; 002099tS     47FD041E     0034               MOV     FP, SP        ; FP, SP         ; 002101 F     A79E0008     0038               LDQ     R28, 8(SP)    ; R28, 8(SP)F     A7BE0010     003C               LDQ     FP, 16(SP)    ; FP, 16(SP)F     23DE0020     0040               LDA     SP, 32(SP)    ; SP, 32(SP)?     6BFC8001     0044               RET     R28           ; R28p  =     Routine Size: 72 bytes,    Routine Base: $CODE$ + 0000 23n  E                                              (continued on next page)v                             F-6 MACRO-64 Listing Formato e  d              2         Example F-3 (Cont.) Example Listing Output  T                                         .PSECT  $LINK$, OCTA, NOPIC, CON, REL, LCL,-G                                                 NOSHR, NOEXE, RD, NOWRT ?         00000000     0000               .ADDRESS  OPTIONAL_DATAt6             3089     0008               .WORD   X^30896             0008     000A               .WORD   X^00084               00     000C               .BYTE   X^004               00     000D               .BYTE   X^006             0001     000E               .WORD   X^0001A         00000000     0010               .ADDRESS  MACRO64$ENTRY_0d:         00000020     0018               .LONG   X^000000206             0000     001C               .WORD   X^00006             0014     001E               .WORD   X^0014:         20000000     0020               .LONG   X^20000000:         00000000     0024               .LONG   X^00000000  I         Command: MACRO/ALPHA/LIST/MACHINE_CODE/DEFINE=OPTION=1 EXAMPLE 24o  E               1  Each page of the listing begins with a two-line page B                  header. From left to right, the first header line0                  contains the followings fields:  H                  1. The module name as specified with the first argument,                     to the .TITLE directive.  C                  2. The module's title as specified with the second 5                     argument to the .TITLE directive.2  6                  3. The date and time of the assembly.  C                  4. The MACRO-64 identification and version string.e  $                  5. The page number.  H                  From left to right, the second header line contains the#                  followings fields:r  G                     The module identification string, as specified withi)                     the .IDENT directive.c  A                     The subtitle, as specified with the .SUBTITLEp                     directive.  9                     The date and time of the source file.   2                     The source file specification.  I                                              MACRO-64 Listing Format  F-7     i              B           2  Each source line is shown in the listing to the rightC              of its listing line number. The listing line number istD              shown in decimal radix. It starts at one and increments?              for every source line and every macro library lined>              whether or not that line is actually shown in the              listing.G  B           3  The .SHOW directive controls the types of informationE              shown in the listing. The INCLUDE option causes MACRO-64eD              to show include files (files that are included with theA              .INCLUDE directive) in the listing. The CONDITIONALSiA              option causes MACRO-64 to show blocks of code in thenC              listing that have been conditionally excluded from therD              assembly. The EXPANSIONS option causes MACRO-64 to showD              macro expansion lines in the listing. See Chapter 5 for>              additional information about the .SHOW directive.  =           4  This field shows the include-file nesting level.L  B           5  With long lines, MACRO-64 shows as many characters asD              can fit within the 132-column listing width. AdditionalD              characters are shown on one or more continuation lines,0              beginning in the source text field.  C           6  MACRO-64 shows diagnostic messages in association withy?              the source code that caused the diagnostic. If thevC              diagnostic occurs in a macro expansion, MACRO-64 showsDD              the primary diagnostic citation in association with theC              macro invocation statement. In addition, if the BINARY @              or EXPANSIONS listing option is in effect, MACRO-64A              shows a secondary diagnostic citation in associations?              with the macro expansion statement that caused the /              diagnostic, as shown in callout 8.c  A           7  This field shows the macro invocation nesting level.d  D           8  As described with callout 6, MACRO-64 shows a secondaryD              diagnostic citation in association with macro expansionE              lines that cause diagnostics. MACRO-64 shows the primary >              diagnostic citation in association with the macro"              invocation statement.  @           9  MACRO-64 indicates lines that have been modified byB              lexical operators by placing an asterisk (*)  in thisB              field. MACRO-64 also indicates macro library lines by0              placing the letter L in this field.       F-8 MACRO-64 Listing Formatr                   E               10 This statement disables the EXPANSIONS option, which G                  causes MACRO-64 to suppress macro expansion lines from                   the listing.m  G               11 This field shows the current psect offset. The .PSECT,aD                  .SAVE_PSECT, and .RESTORE_PSECT directives show theC                  full 32-bit offset using eight hexadecimal digits. F                  While MACRO-64 maintains a 32-bit psect offset, otherI                  statements show only the low-order 16-bits of the offset /                  using four hexadecimal digits.n  B               12 MACRO-64 shows data initial values that have beenI                  replaced using a series of Xs where the data value woulde/                  otherwise have been displayed.u  H               13 MACRO-64 shows data initial values and other associatedB                  values in the left margin. Quadword data is shownD                  as 16 hexadecimal digits. Longword data is shown asE                  eight hexadecimal digits. Word data is shown as foursD                  hexadecimal digits. Byte data is shown as a pair ofE                  hexadecimal digits. Octaword data is shown as a pair H                  of quadwords. MACRO-64 places additional lines into theG                  listing to accommodate the display of data in the left %                  margin as necessary.=  A               14 MACRO-64 uses the single quote (') to indicate a1I                  relocatable value that cannot be bound at assembly time.0  E               15 This statement enables the BINARY listing option. It(E                  causes MACRO-64 to include in the listing only thosedF                  macro expansion lines that produce a binary result inG                  the object module. Other macro expansion lines are not<F                  included in the listing. Regular source lines are not                  affected.  D               16 While the $ROUTINE macro expands to several hundredG                  assembly statements, only those that generate a binaryxE                  result are shown in the listing while the the BINARYo%                  option is in effect.   >               17 There is no way for MACRO-64 to correlate theF                  instructions resulting from optimization on a one-to-G                  one basis with your source statements. Instead, MACRO-fE                  64 indicates instructions that can be transformed by D                  optimization by displaying the "*Optimized*" stringA                  where the instruction hexadecimal representation D                  would otherwise be displayed. MACRO-64 displays the  I                                              MACRO-64 Listing Format  F-9                    =              "*Optimized*" string only for those sequences ofl7              instructions where optimzation is enabled.   E           18 This is the Machine Code Listing section of the listing.oD              Identical in format to the Machine Code Listing section=              produced by many of Digital's other AXP languageE?              processors, it is useful in viewing the results of               optimization.  A           19 This field shows a hexadecimal representation of thee+              instruction or data directive.   B           20 This field shows the low-order 16 bits of the current2              psect offset using hexadecimal radix.  >           21 This field shows a mnemonic representation of the+              instruction or data directive.   =           22 This field shows the listing line number that is D              associated with the instruction or data directive using              decimal radix.   C           23 After each routine, MACRO-64 shows the routine size in D              bytes using decimal radix; it shows the starting offsetC              of the routine's code section using hexadecimal radix.r  C           24 At the end of the listing, MACRO-64 echoes the command(*              line used to invoke MACRO-64.                                        F-10 MACRO-64 Listing Format .  n                            F      _________________________________________________________________  F                                                                  Index    A      %%-Lexical escape operator,       Arithmetic shift operator,C.         3-5                               2-29>                                        .ASCIC directive,  5-13D      A______________________________   .ASCID directive,  5-14, B-20  >      Absolute expression,  2-23        .ASCII directive,  5-16E      Accessing memory,  B-5            ASCII string storage directive @      Address                             counted (.ASCIC),  5-13?        base register (.BASE), 5-18       string (.ASCII),  5-16 D        label, 2-18                       string descriptor (.ASCID),0        local code storage directive         5-14B          (.LOCAL_CODE_ADDRESS),          zero-terminated (.ASCIZ),0          5-91                               5-17>        storage directive (.CODE_       .ASCIZ directive,  5-17A          ADDRESS),  5-28               Assembler directives,  1-2 @      .ADDRESS directive,  5-9, B-19    Assembler, invoking,  1-3E      Address storage directive         Assembly termination directiveA7         (.ADDRESS), 5-9                   (.END),  5-51OB      Addressing                        Assignment statement,  1-2,.        controlling alignment, B-19        2-30:        to linkage section, B-16        Automatic alignment;      .ALIGN directive,  5-10             controlling,  B-18 =      /ALIGNMENT qualifier,  1-3          default command-line6<      AND operator,  2-29                    qualifiers, B-18E      Architecture instructions,        Automatic alignment directivesI6         common, A-19 to A-36             See Table B-2?      ARGS                              Automatic data alignment C        arguments, 6-16                   label addresses and,  2-20r        parameters, 6-166
      Argument         actual, 4-2         determining length, 5-107        formal, 4-2        in a macro, 4-2        number of, 5-105   F                                                                Index-1                   7                                        Character string B     B______________________________     determining length,  5-107@     .BASE directive,  5-18, 6-9        $CODE$ symbol, 6-56, 6-57E     Base register,  B-5                .CODE_ADDRESS directive, 5-28, -       defining address,  B-17            B-20 @     Base register directive            $CODE_SECTION macro, 6-230        (.BASE), 5-18                   Colon (:)<     $BEGIN_EPILOGUE macro,  6-6,        in label field,  2-3>        6-13                            Comment field, 2-2, 2-5:     .BEGIN_EXACT directive,  5-22      Common architectureC     Binary listing file,  F-1           instructions,  A-19 to A-36 =     Binary operator,  2-28              opcodes,  A-7 to A-1304     .BLKA directive,  B-20             CompatibilityC     .BLKD directive,  B-20              with VAX MACRO,  D-1 to D-9$?     .BLKF directive,  B-20             Complex expression, 2-23lA     .BLKG directive,  B-20             Conditional assembly block 2     .BLKL directive,  B-20               directive4     .BLKO directive,  B-20              .ELSE,  5-374     .BLKQ directive,  B-20              .ENDC,  5-532     .BLKS directive,  B-20              .IF,  5-64>     .BLKT directive,  B-20             Created temporary label4     .BLKW directive,  B-20              range,  2-174     .BLKx directive,  5-24              using,  4-10<     Block storage allocation           $CS symbol, 6-4, 6-56E        directive (.BLKx), 5-24         Current location counter, 2-31 0     .BYTE directive,  5-27               to 2-32  "     Byte storage directive (.BYTE)F        , 5-27                          D______________________________  5                                        Data alignment A     C______________________________     natural boundaries,  B-1813     $CALL                              Data Storage 9       calling system services,  B-2     ALIGN_DATA,  5-39 @     $CALL macro,  6-8, 6-10, 6-15      Data structures, A-1, B-9;       instruction sequence,  6-11       linkage pair,  B-11 C     Calling system services             procedure descriptor,  B-10 >       using $CALL,  B-2                 signature block,  B-11@     Calling-standard macros            $DATA$ symbol, 6-56, 6-57@       effects on assembly,  B-4        $DATA_SECTION macro, 6-24<     Character set                      Date and time lexical4       in source statement,  2-6         %TIME,  3-22<       in source statement (tab.),      /DEBUG qualifier, 1-4C          2-7                           Decodable pseudo-operations,m,                                          A-6       Index-2)                            Default valuesI          using,  4-3                      E______________________________ >         Define floating point register    %EDIT lexical,  3-11D           symbol directive (.DEFINE_      Element extraction lexical:           FREG),  5-31                      %ELEMENT, 3-13A         Define integer register symbol    %ELEMENT lexical,  3-13 @           directive (.DEFINE_IREG),       .ELSE directive,  5-37A           5-34                            .ENABL directive,  5-39 E         /DEFINE qualifier, 1-4            Enable assembler functions,m1         .DEFINE_FREG directive, 5-31         5-39nB         .DEFINE_IREG directive, 5-34      .ENABLE directive,  5-39B         Delimiter                         End conditional assemblyC          string argument,  4-5               directive (.END), 5-53L?         /DIAGNOSTIC qualifier, 1-5        .END directive,  5-51,H         Differences                       End macro definition directive:          from VAX MACRO,  D-1 to D-9         (.ENDM), 5-54@         Direct assignment statement,      .ENDC directive,  5-53@           1-2, 2-30                       .ENDM directive,  5-54@         Directives, 1-2, 5-1              .ENDR directive,  5-55I          as operators,  2-4               $END_EPILOGUE macro,  6-6, 6-25 E          for auto alignment,  B-19        .END_EXACT directive,  5-560I          general assembler,  1-2, 5-1,    $END_PROLOGUE macro,  6-6, 6-27QC             5-4                           $END_ROUTINE macro,  6-28 F          macro,  1-2, 5-1, 5-7            /ENVIRONMENT qualifier,  1-5H         Disable assembler functions       Epilogue sequence,  6-44, B-8,1           directive (.DISABLE),  5-36        B-15R;         .DISABLE directive, 5-36            beginning, 6-13 A         Displaying diagnostic messages    .ERROR directive,  5-570F          with LSE,  C-2                   Error messages,  E-1 to E-29@         Displaying error messages         .EVEN directive,  5-58A          with LSE,  C-2                   Exact instruction block E         .DOUBLE directive, 5-29             beginning (.BEGIN_EXACT), 2         Double-precision IEEE                 5-22E           directive (.T_FLOATING),          ending (.END_EXACT), 5-568F           5-140                           Exclusive OR operator,  2-29;         $DP symbol, 6-5, 6-56             Expression,  2-22 :         $DS symbol, 6-5, 6-56               absolute, 2-239         .DSABL directive, 5-36              complex, 2-23i?         .D_FLOATING directive, 5-29,        evaluation of, 2-22 :           B-20                              external, 2-238                                             global, 2-23C                                             relocatable, 2-23, 2-32 E                                             unary operators for, 2-25     I                                                                   Index-30 0                 ;     .EXTERNAL directive,  5-59         Formal argument, 4-2 :     External expression,  2-23         %FREG lexical, 3-15A     External symbol,  5-145            FUNC_RETURN argument, 6-19TC       attribute directive              .F_FLOATING directive, 5-60, -          (.EXTERNAL), 5-59               B-201       defining,  5-39, 5-59 F     %EXTRACT lexical,  3-14            G______________________________D     .EXTRN directive,  5-59            General assembler directives,  ,     F                                    1-2>     _______________________________    Global expression, 2-238     F-P control register format,       Global label, 2-3A        A-5                             Global symbol, 2-15, 5-145E7     Fields                              defining,  5-39eC       comment,  2-1, 2-5               .G_FLOATING directive, 5-62,.-       label,  2-1, 2-3                   B-20        operand,  2-1, 2-5F       operator,  2-1, 2-4              I______________________________=     .FLOAT directive,  5-60            .IDENT directive, 5-63t?     Floating-point arithmetic          Identification directivet8        directive                         (.IDENT),  5-63:       .S_FLOATING,  5-133              .IF directive, 5-64@       .T_FLOATING,  5-140              .IF_FALSE directive, 5-71?     Floating-point constants (.D_      .IF_TRUE directive, 5-71 E        FLOATING), 5-29                 .IF_TRUE_FALSE directive, 5-71 <     Floating-point number              .IF_x directive, 5-71;       arithmetic,  5-133, 5-140        .IIF directive, 5-75 E       data structures,  A-1            Immediate conditional assemblyi@       format,  2-9                       block directive (.IIF),-       .F_FLOATING,  5-60                 5-75e?       .G_FLOATING,  5-62               .INCLUDE directive, 5-77 B       in source statement,  2-9        Inclusive OR operator, 2-29A       storage,  5-29                   Indefinite repeat argumenth       storing,  5-60, 5-62@       .S_FLOATING,  5-133                directive (.IRP),  5-80B       .T_FLOATING,  5-140              Indefinite repeat characterA     Floating-point register number       directive (.IRPC),  5-83 /        lexical                         Inlining 5       %FREG,  3-15                      manual,  B-23e;     Floating-point storage              optimization,  B-22 B        directive                       Instruction directive, 5-78D       .D_FLOATING,  5-29               .INSTRUCTION directive, 5-78,-       .F_FLOATING,  5-60                 B-20C         .G_FLOATING,  5-62       Index-4C 6  o              B         Instruction formats (fig.),       Label field (tab.),  2-2<           A-1                             Labeling directiveH         Instruction operand notation,       .LOCAL_PROCEDURE_DESCRIPTOR,2           A-3                                 5-93H         Instruction qualifier notation      .PROCEDURE_DESCRIPTOR, 5-117D           ,  A-4                          Length Determining lexical9         Instruction summary                 %LENGTH, 3-183@          OpenVMS PALcode,  A-14 to        %LENGTH lexical,  3-18G             A-19                          Lexical escape operator (%%),r0         Instructions                         3-5A          as operators,  2-4               Lexical operators,  3-1t7          common architecture,  A-19 to      escape, 3-5i6             A-36                            list, 3-10;         Integer                             processing, 3-1 C          data structures,  A-1              summary of (tab.), 3-10 B          in source statement,  2-8          syntax rules, 3-1, 3-36         Integer division                    using, 3-7I          longword,  B-3                   Lexical operators (tab.),  3-10 E          quadword,  B-3                   Lexical string symbol,  3-4iG         %INTEGER lexical, 3-16              with quoted string literal,e1         Integer register number               3-4 C           lexical                         .LIBRARY directive,  5-86 B          %IREG,  3-17                     /LIBRARY qualifier,  1-6D         Invoking assembler, 1-3           $LINK$ symbol,  6-56, 6-57I         %IREG lexical, 3-17               .LINKAGE_PAIR directive,  5-88,v1         .IRP directive, 5-80                 B-20bD         .IRPC directive, 5-83             $LINKAGE_PAIR macro,  6-29G                                           $LINKAGE_SECTION macro,  6-31iF         K______________________________   Linking directive (.LINKAGE_8         Keyword argument, 4-3                PAIR), 5-88@         KIND argument, 6-5, 6-7           .LIST directive,  5-90?                                           /LIST qualifier,  1-6 C         L                                 Listing control directive 8         _______________________________     .IDENT, 5-637         Label                               .LIST, 5-90i9          created temporary,  4-10           .NLIST, 5-1092:          global,  2-3                       .NOSHOW, 5-110C          local,  2-3                      Listing directive (.SHOW, B          temporary,  2-3                     NOSHOW), 5-110, 5-1348          user-defined temporary,          Listing format7             2-16, 4-10                      binary, F-1 D         Label addresses, 2-18 to 2-22     Listing table of contents,2         Label field, 2-1, 2-3                5-139    I                                                                   Index-5h d  m              B     Local address storage              .LONG directive, 5-95, B-19A        directive (.LOCAL_CODE_         Longword storage directivet7        ADDRESS), 5-91                    (.LONG),  5-95l5     LOCAL argument,  6-11, 6-16        Loop unrolling 5     Local label,  2-3                   manual,  B-22o;       saving,  5-132                    optimization,  B-22dD     Local label block                   with scheduling and peephole>       ending,  5-39                        optimizations, B-238       starting,  5-39                  LS argument, 6-16B     Local linking directive            $LS symbol, 6-4, 6-10, 6-56*        (.LOCAL_LINKAGE_PAIR), 5-92     LSE=     Local symbol,  2-15                 displaying diagnosticm8     .LOCAL_CODE_ADDRESS directive,         messages, C-2B        5-91, B-20                       displaying error messages,.     .LOCAL_LINKAGE_PAIR directive,         C-2?        5-92, B-20                       replicating OpenVMS VAX E     .LOCAL_PROCEDURE_DESCRIPTOR            operating system behavior, .        directive, 5-93, B-20               C-1A     %LOCATE lexical,  3-19              using with MACRO-64,  C-1e     Location control directiveF       .ALIGN,  5-10                    M______________________________C       .BLKx,  5-24                     /MACHINE_CODE qualifier, 1-7m;     Location counter                   Macro arguments, 4-2u4       assigning before alignment,       actual,  4-28          2-20                           ARGS,  6-9, 6-16>       changing                          ARGS parameters,  6-16:          with EXE and NOMIX             concatenated,  4-9<             attributes, 2-32            delimited,  4-5, 4-84          with EXE or NOMIX              formal,  4-2:             attributes, 2-32            FUNC_RETURN,  6-195       current,  2-31                    keyword,  4-3e7       setting,  2-32                    KIND,  6-5, 6-7e:     Location counter alignment          LOCAL,  6-11, 6-161        directive (.ODD), 5-113          LS,  6-16o4     Location counter control            NAMES,  6-12:        directive (.EVEN), 5-58          NONSTANDARD,  6-20  8     Logical AND operator                positional,  4-37       See AND operator                  Rls,  6-9, 6-15 5     Logical exclusive OR operator       RSA_END,  6-5r8       See Exclusive OR operator         RSA_OFFSET,  6-58                                         SAVED_REGS,  6-7A     Logical inclusive OR operator       SCRATCH_REGS,  6-11, 6-18   ;       See Inclusive OR operator         SET_ARG_INFO,  6-17a>                                         SIGNATURE_BLOCK,  6-207                                         SIZE,  6-5, 6-7i       Index-6c e  i              A         Macro arguments (cont'd)          Macro include directivew=          STACK_RETURN_VALUE,  6-18           (.INCLUDE), 5-77 A          STANDARD_PROLOGUE,  6-6          Macro library directivec=          string,  4-5                        (.LIBRARY), 5-86e;          TIE,  6-18                       Macro name,  2-14dH          USES_VAX_ARGLIST,  6-20          MACRO-64 Assembler for OpenVMS8         Macro call directive (.MCALL),       AXP Systems=           5-100                             introduction, 1-1_;         Macro calls, 4-1                  MACRO-64 features <          as operators,  2-4                 not in VAX MACROA          nested,  5-97                         additional lexical-@          number of arguments,  5-105             operators,  D-3H         MACRO command qualifiers, 1-3          automatic data alignment,4          /ALIGNMENT qualifier,  1-3              D-5C          /DEBUG,  1-4                          .BASE directive, D-1 F          /DEFINE,  1-4                         .BEGIN_EXACT directive,4          /DIAGNOSTIC,  1-5                       D-6G          /ENVIRONMENT,  1-5                    .CODE_ADDRESS directive,t4          /LIBRARY,  1-6                          D-2C          /LIST,  1-6                           .ELSE directive, D-3AH          /MACHINE_CODE,  1-7                   .END_EXACT directive, D-6F          /NAMES,  1-7                          .INCLUDE directive, D-3F          /OBJECT,  1-7                         .INSTRUCTION directive,4          /OPTIMIZE,  1-8                         D-5G          /PREPROCESSOR_ONLY,  1-8              lexical escape operator,)4          /SHOW,  1-9                             D-3F          /WARNINGS,  1-10                      lexical string symbols,4         Macro definition, 4-1                    D-3C          default value,  4-3                   lexical substitution ?          ending,  5-54                           operator,  D-4 G          labeling in,  4-10                    .LINKAGE_PAIR directive,l4         Macro definition directive               D-2B           (.MACRO),  5-96                      .LOCAL_CODE_ADDRESS@         Macro deletion directive                 directive,  D-2B           (.MDELETE),  5-101                   .LOCAL_LINKAGE_PAIR@         MACRO directive, 1-2                     directive,  D-2@         .MACRO directive, 5-96                 .LOCAL_PROCEDURE_&         Macro exit directive (.MEXIT),F           5-102                                  DESCRIPTOR directive,4         Macro expansion, 4-1                     D-2C          printing,  4-1                        MACRO64$ symbol, D-5_E          terminating,  5-102                   /[NO]DEFINE qualifier,-4                                                  D-6@                                                $OPDEF macro, D-5A                                                optimizations, D-5   I                                                                   Index-7n )                 >     MACRO-64 features                  .MCALL directive, 5-100@       not in VAX MACRO (cont'd)        .MDELETE directive, 5-101-          optional case sensitivity,    Memorya7             D-3                         accessing,  B-53@          preprocessor output,  D-6     Message display directive5          .PROCEDURE_DESCRIPTOR          .ERROR,  5-57 6             directive, D-2              .PRINT,  5-116>          register symbol changes,      Message warning displayB             D-6                          directive (.WARN),  5-144/          value-of-operator changes,    Messages <             D-4                         errors,  E-1 to E-29>     Macro-defined register symbols     .MEXIT directive, 5-1020       list,  6-4                       MigrationA     Macros,  4-1                        alternatives to using VAX A       $CALL instruction sequence,          instruction-generatingt6          6-8                               macros, B-2;       calling routines,  6-8            avoiding misleading(;       defining a routine,  6-7             diagnostics, B-2TA       ending routines,  6-2             avoiding VAX instruction-iA       for calling routines,  6-2           generating macros, B-2_  !       in epilogue sections,  6-6, F          6-7                           N______________________________  ;       in prologue sections,  6-6,      NAMES argument, 6-12 <          6-7                           /NAMES qualifier, 1-7=       in source code,  6-10            .NARG directive, 5-105 =       MACRO-64 supplied,  6-1          .NCHR directive, 5-107i>       MACRO-64 supplied library,       .NLIST directive, 5-109A          6-1                           NONSTANDARD argument, 6-20i@       making multiple calls,  6-11     .NOSHOW directive, 5-110,.       nested,  4-6, 5-97                 5-134-       passing numeric value to,        NumberrC          4-9                            See also Integer, Floating- C       recursive,  5-97                     point number, and Packed)9       redefining,  5-97                    decimal string A       replacing predefined register     in source statement,  2-8 D          symbols, B-3                  Number of arguments directive8       supplied,  6-12 to 6-57            (.NARG),  5-105E       switching psects,  6-3, 6-7      Number of characters directiveE8       syntax rules,  6-12                (.NCHR),  5-107C       with same name as Alpha AXP      Numeric complement operator, -          opcode, 5-97                    2-27g5       with user-defined symbols,       Numeric symboleC          B-3                            with lexical string symbol, .       within routines,  6-2                3-4       Index-8N u  f              =         Numeric symbols, 3-4              Optimization,  B-18iE                                             automatic code alignment,L2         O______________________________       B-18E         Object module                       automatic data alignment, 2          identifying,  5-63                   B-18=          naming,  5-141                     controlling, B-18n@          title,  5-141                      default command-line?         /OBJECT qualifier, 1-7                qualifiers,  B-18t:         Obtaining information lexical       inlining, B-22@          %TYPE,  3-23                       loop unrolling, B-22<         Obtaining register number           peepholing, B-18<          floating-point (%FREG),  3-15      scheduling, B-18A          integer (%IREG),  3-17             viewing results, B-23cC         .OCTA directive, 5-111, B-20      /OPTIMIZE qualifier,  1-8 ;         Octaword storage directive        OTS$DIV_I routine G           (.OCTA),  5-111                   performing longword integerV<         .ODD directive, 5-113                 division,  B-3;         One's complement                  OTS$DIV_L routineIG          of expression,  2-27               performing quadword integere<         Opcode                                division,  B-3  %          common architecture,  A-7 to I             A-13                          P______________________________rG          redefining,  5-97                Packed decimal string,  5-114 C          with the same name as a macro    .PACKED directive,  5-114 >             ,  5-97                       .PACKED macro,  6-38B         $OPDEF macro, 6-32                Packed storage directive=         OpenVMS PALcode instruction          (.PACKED), 5-114 A           summary,  A-14 to A-19          .PAGE directive,  5-115 A         Operand, 2-5                      Page ejection directive ;          instruction notation,  A-3          (.PAGE), 5-115 4         Operand field, 2-2, 2-5           Period (.)E          using symbols in,  2-5             current location counter, 2         Operator, 2-4                         2-31A          AND,  2-29                       Permanent symbol,  2-14 B          arithmetic shift,  2-29          Permanent symbols,  2-11I          binary,  2-28                    Portability issues,  D-1 to D-9 C          complement,  2-27                Positional argument,  4-4RC          exclusive OR,  2-29              Predefined symbols,  2-11eG          inclusive OR,  2-29              /PREPROCESSOR_ONLY qualifier, 0          radix control,  2-26                1-8B          unary,  2-25                     .PRINT directive,  5-116          Operator field, 2-1, 2-4          using symbols in,  2-4   I                                                                   Index-9T d  c              5     .PROCEDURE_DESCRIPTOR              Register usage 9        directive, 5-117, B-20           conventions,  A-3_C     $PROCEDURE_DESCRIPTOR macro,       Relocatable expression, 2-23 3        6-41                            Repeat block D     Program section                     argument substitution,  5-80E       attributes,  5-119                character substitution,  5-83A?       code,  6-2                        terminating repetition,B0       data,  6-2                           5-102=       defining,  5-119                 Repeat block directiveT:       directive                          (.REPEAT),  5-127?          .PSECT,  5-119                .REPEAT directive, 5-127 <          .RESTORE_PSECT,  5-130        %REPEAT lexical, 3-20A          .SAVE_PSECT,  5-132           Repeat range end directive,7       linkage,  6-2                      (.ENDR),  5-55i=       name,  5-124                     .REPT directive, 5-127FA       restoring context of,  5-130     $RESET_LP_LIST macro, 6-42 @       saving context of,  5-132        .RESTORE directive, 5-130@       saving local label,  5-132       .RESTORE_PSECT directive,.     Programming hints,  B-1              5-130?       example programs,  B-1           $RETURN macro, 6-6, 6-44i>     Prologue sequence,  B-8, B-15      Rls argument, 6-9, 6-15@       ending,  6-27                    $ROUTINE macro, 6-6, 6-45A     Prologues                           qualifiers,  6-45 to 6-55 5       entry and exit,  B-15            Routines, B-13g5     .PSECT directive,  5-119            See Table B-1 :     Pseudo-operations                   bound-frame,  B-14D       decodable,  A-6                   defining type by macro,  6-5  9     Q                                   null-frame,  B-13x:     _______________________________     performance,  B-14=     .QUAD directive,  5-126, B-20       register-frame,  B-13 :     Quadword storage directive          stack-frame,  B-14A        (.QUAD), 5-126                  $RSA_END symbol, 6-5, 6-56 D     Quoted string literal              $RSA_OFFSET symbol, 6-5, 6-6,-       with lexical string symbol,        6-562            3-4F                                        S______________________________  =     R______________________________    .SAVE directive, 5-132e  ?     Radix control operators,  2-26     SAVED_REGS argument, 6-7PC     Range extraction lexical           .SAVE_PSECT directive, 5-132->       %EXTRACT,  3-14                  .SBTTL directive, 5-139C     Register name,  2-11, 2-14         SCRATCH_REGS argument, 6-11,i-     Register symbols                     6-18        definitions of,  6-4       macro-defined,  6-41       using in macros,  B-3        Index-10 -                 1         SET_ARG_INFO argument, 6-17       StringsnF         Shift operator, 2-29                date/time lexical (%TIME),2         .SHOW directive, 5-134                3-22I         /SHOW qualifier, 1-9                determining length (%LENGTH), 2         SIGNATURE_BLOCK argument, 6-20        3-18D         Signed byte data directive          editing lexical (%EDIT),2           (.SIGNED_BYTE),  5-137              3-11?         Signed word storage directive       extracting elementsi?           (.SIGNED_WORD),  5-138              (%ELEMENT),  3-13 H         .SIGNED_BYTE directive, 5-137       extracting range (%EXTRACT),2         .SIGNED_WORD directive, 5-138,        3-14G           B-19                              locating lexical (%LOCATE), 2         Single-precision IEEE                 3-19I           directive                         obtaining information lexicalR<          .S_FLOATING,  5-133                  (%TYPE),  3-23C         $SIZE symbol, 6-5, 6-6, 6-56        obtaining value lexical >         Source statement                      (%STRING),  3-21H          character set in,  2-6             repeating lexical (%REPEAT),2          format,  2-1                         3-20G          rules for coding,  2-2           Subconditional assembly blocki6         $STACK_ARG_SIZE symbol, 6-5          directive;         STACK_RETURN_VALUE argument,        .IF_FALSE, 5-71 :           6-18                              .IF_TRUE, 5-71@         STANDARD_PROLOGUE argument,         .IF_TRUE_FALSE, 5-71E           6-6                             .SUBTITLE directive,  5-139oB         Statements                        Subtitle listing controlC          character set,  2-6                 directive (.SUBTITLE), 2          comment,  2-5                       5-139D          continuation of,  2-2            Symbol attribute directive;          field,  2-1                         (.WEAK), 5-145 8          format,  2-1                     Symbols,  2-11A          label,  2-3                        defined by $CALL, 6-5tD          operand,  2-5                      defined by $ROUTINE, 6-4D          operator,  2-4                     defining register names,2          rules for coding,  2-2               2-12D          types,  1-1                        deleting register names,         String arguments, 4-5 2         String editing lexical                2-12F          %EDIT,  3-11                       determining value of, 2-14A         %STRING lexical, 3-21               external, 5-59, 5-145A?         String locating lexical             global, 2-15, 5-145 B          %LOCATE,  3-19                     in operand field, 2-14C         String repeating lexical            in operator field, 2-14 7          %REPEAT,  3-20                     local, 2-15 <                                             macro name, 2-14  I                                                                  Index-11s o  6                   Symbols (cont'd)F       permanent,  2-11, 2-14           V______________________________  ?       predefined,  2-11                Value conversion lexical,7       register name,  2-11, 2-14        %INTEGER,  3-16e>       undefined,  5-39                 Value obtaining lexical6       user-defined,  2-13, 2-14         %STRING,  3-21-     .S_FLOATING directive,  5-133,     Values D        B-20                             converting (%INTEGER),  3-165                                         default,  4-3n9     T______________________________    VAX MACRO features =     Tab stops                           not in MACRO-64,  D-6_@       in source statement,  2-2            arguments to .DISABLE<     Temporary label,  2-3                     directive, D-8?       user-defined,  2-16                  arguments to .ENABLE <     Term in MACRO statement,  2-22            directive, D-8D     TIE argument,  6-18                    count specifiers on data-A     %TIME lexical,  3-22                      storage directives,s1     .TITLE directive,  5-141                  D-8tA     Title listing control                  .CROSS directive,  D-8-A        directive (.TITLE), 5-141           .DEBUG directive,  D-8 C     %TYPE lexical,  3-23                   .DEFAULT directive,  D-86E     .T_FLOATING directive,  5-140,         .END directive differences 3        B-20                                   , D-8 :                                            .ENDM directive>     U______________________________           differences, D-9:     Unary operators,  2-25                 .ENDR directive>     Undefine register symbol                  differences, D-9A        directive (.UNDEFINE_REG),          .ENTRY directive,  D-8 A        5-143                               EXE/NOEXE restriction,A1     .UNDEFINE_REG directive,  5-143           D-7 B     User-defined register symbols          .GLOBAL directive,  D-8A       in macros,  B-3                      .H_FLOATING directive, 1     User-defined symbols,  2-13,              D-8 @        2-14                                .LINK directive,  D-9@     User-defined temporary label,          .MASK directive,  D-9C        2-16                                .NOCROSS directive,  D-8 A       range,  2-17                         .NTYPE directive,  D-9 A     USES_VAX_ARGLIST argument,             .OPDEF directive,  D-9 :                                            overlapping and9        6-20                                   replacementr  ?                                               initializers, D-7 B                                            PAGE argument to .ALIGN<                                               directive, D-7       Index-12                   G         VAX MACRO features                     setting current locationo>          not in MACRO-64 (cont'd)                counter,  D-7G             .PSECT directive                   .TRANSFER directive, D-9d                   differences,  D-9I             radix unary operators,        W______________________________   A                D-7                        .WARN directive,  5-144 D             .REFn directives,  D-9        /WARNINGS qualifier,  1-10A             register mask operator,       .WEAK directive,  5-145AG                D-7                        .WORD directive,  5-147, B-19 H             .RESTORE directive            Word storage directive (.WORD)4                differences,  D-9             , 5-147                                                                I                                                                  Index-13T