home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / macro64 / reference_manual.txt < prev   
Text File  |  1992-10-27  |  728KB  |  5 lines

  1.  H                    MACRO-64_Assembler_for_OpenVMS_AXP_Systems__________$                    Reference Manual-                    Order Number: AA-PT9KA-TE!                    November 1992A                    This document describes the MACRO-64 assembly                    language.G                    Revision/Update Information:  This is a new manual.H                    Software Version:             MACRO-64 Assembler forE                                                  OpenVMS AXP Systems=                                                  Version 1.0I                    Operating System and Version: OpenVMS AXP Version 1.01                    Digital Equipment Corporation*                    Maynard, Massachusetts  N              ________________________________________________________________              November 1992C              The information in this document is subject to changeH              without notice and should not be construed as a commitmentA              by Digital Equipment Corporation. Digital EquipmentG              Corporation assumes no responsibility for any errors that*              may appear in this document.H              The software described in this document is furnished underI              a license and may be used or copied only in accordance with(              the terms of such license.E              No responsibility is assumed for the use or reliabilityF              of software on equipment that is not supplied by Digital@              Equipment Corporation or its affiliated companies.3              ⌐ Digital Equipment Corporation 1992."              All Rights Reserved.E              The postpaid Reader's Comments forms at the end of thisD              document request your critical evaluation to assist in-              preparing future documentation.?              The following are trademarks of Digital EquipmentB              Corporation: Alpha AXP, AXP, DEC, DEC 4000, DECchip,A              DECwindows, Digital, OpenVMS, OpenVMS AXP, VAX, VAX@              DOCUMENT, VMS, the AXP logo, and the DIGITAL logo.7              The following are third-party trademarks:F              Ada[R] is a registered trademark of the U.S. Government,'              Ada Joint Program Office.I              This document was prepared using VAX DOCUMENT, Version 2.1.  F     _________________________________________________________________F                                                              ContentsF     Preface...................................................     xi     1  IntroductionF         1.1  Language Features................................    1-1F         1.1.1  Alpha AXP Native Mode Instructions ............    1-1F         1.1.2  Direct Assignment Statements ..................    1-2F         1.1.3  Assembler Directives ..........................    1-2F         1.1.3.1   General Assembler Directives................    1-2F         1.1.3.2   Macro Directives............................    1-2F         1.2  Invoking MACRO-64 on OpenVMS Systems.............    1-3F         1.2.1  Command Line Qualifiers .......................    1-30     2  Components of MACRO-64 Source StatementsF         2.1  Source Statement Format..........................    2-1F         2.1.1  Label Field ...................................    2-3F         2.1.2  Operator Field ................................    2-4F         2.1.3  Operand Field .................................    2-4F         2.1.4  Comment Field .................................    2-5F         2.2  Character Set....................................    2-5F         2.3  Numbers..........................................    2-8F         2.3.1  Integers ......................................    2-9F         2.3.2  Floating-Point Numbers ........................    2-9F         2.4  Quoted Literals..................................   2-10F         2.5  Symbols..........................................   2-11F         2.5.1  Permanent Symbols .............................   2-11F         2.5.2  User-Defined Symbols and Macro Names ..........   2-12F         2.5.3  Determining Symbol Values .....................   2-13F         2.5.3.1   Using Symbols in the Operator Field.........   2-14F         2.5.3.2   Using Symbols in the Operand Field..........   2-14F         2.6  Temporary Labels Within Source Code..............   2-15F         2.7  Label Addresses .................................   2-17F                                                                   iii  :           2.7.1   Label Addresses, Optimization, and CodeI                   Alignment......................................   2-18?           2.7.2   Label Addresses and Automatic Data AlignmentI                   ...............................................   2-19I           2.8  Terms and Expressions............................    2-22I           2.9  Unary Operators for Terms and Expressions........    2-25I           2.9.1   Radix Control Operators .......................   2-26I           2.9.2   Numeric Complement Operator ...................   2-27I           2.10 Binary Operators.................................    2-28I           2.10.1  Arithmetic Shift Operator .....................   2-29I           2.10.2  Logical AND Operator ..........................   2-29I           2.10.3  Logical Inclusive OR Operator .................   2-29I           2.10.4  Logical Exclusive OR Operator .................   2-29I           2.11 Direct Assignment Statements.....................    2-30I           2.12 Current Location Counter.........................    2-31$        3  MACRO-64 Lexical OperatorI           3.1  Processing with Lexical Operators................     3-1I           3.2  Lexical Operator Syntax..........................     3-1I           3.3  Numeric Symbols and Lexical String Symbols.......     3-4I           3.4  Lexical Substitution Operator....................     3-4I           3.5  Lexical Escape Operator..........................     3-5I           3.6  Using Lexical Operators..........................     3-7I           3.7  Lexical Operators................................    3-11I                %EDIT............................................    3-12I                %ELEMENT.........................................    3-14I                %EXTRACT.........................................    3-15I                %INTEGER.........................................    3-16I                %LENGTH..........................................    3-17I                %LOCATE..........................................    3-18I                %REPEAT..........................................    3-19I                %STRING..........................................    3-20I                %TIME............................................    3-21I                %TYPE............................................    3-22
  2.         iv          4  Macro ArgumentsI           4.1  Using Macro Arguments............................     4-2I           4.2  Using Default Values.............................     4-3I           4.3  Using Keyword Arguments..........................     4-3I           4.4  Using String Arguments...........................     4-5I           4.5  Argument Concatenation...........................     4-9I           4.6  Passing Numeric Values of Symbols................     4-9I           4.7  Using Created Temporary Labels...................    4-10(        5  MACRO-64 Assembler DirectivesI           5.1  Program Sections (Psects)........................     5-1I           5.2  Automatic Data Alignment.........................     5-3I           5.3  Directives.......................................     5-4I                .ADDRESS.........................................     5-9I                .ALIGN...........................................    5-10I                .ASCIC...........................................    5-13I                .ASCID...........................................    5-14I                .ASCII...........................................    5-16I                .ASCIZ...........................................    5-17I                .BASE............................................    5-18I                .BEGIN_EXACT.....................................    5-22I                .BLKx............................................    5-24I                .BYTE............................................    5-27I                .CODE_ADDRESS....................................    5-28I                .D_FLOATING......................................    5-29I                .DISABLE.........................................    5-31I                .ELSE............................................    5-32I                .ENABLE..........................................    5-34I                .END.............................................    5-44I                .ENDC............................................    5-46I                .ENDM............................................    5-47I                .ENDR............................................    5-48I                .END_EXACT.......................................    5-49I                .ERROR...........................................    5-50I                .EVEN............................................    5-51I                .EXTERNAL........................................    5-52I                .F_FLOATING......................................    5-53I                .G_FLOATING......................................    5-55I                                                                        v  I                .IDENT...........................................    5-56I                .IF..............................................    5-57I                .IF_x............................................    5-63I                .IIF.............................................    5-67I                .INCLUDE.........................................    5-69I                .INSTRUCTION.....................................    5-70I                .IRP.............................................    5-72I                .IRPC............................................    5-75I                .LIBRARY.........................................    5-78I                .LINKAGE_PAIR....................................    5-80I                .LIST............................................    5-82I                .LOCAL_CODE_ADDRESS..............................    5-83I                .LOCAL_LINKAGE_PAIR..............................    5-84I                .LOCAL_PROCEDURE_DESCRIPTOR......................    5-85I                .LONG............................................    5-87I                .MACRO...........................................    5-88I                .MCALL...........................................    5-92I                .MDELETE.........................................    5-93I                .MEXIT...........................................    5-94I                .NARG............................................    5-97I                .NCHR............................................    5-99I                .NLIST...........................................   5-101I                .NOSHOW..........................................   5-102I                .OCTA............................................   5-103I                .ODD.............................................   5-105I                .PACKED..........................................   5-106I                .PAGE............................................   5-107I                .PRINT...........................................   5-108I                .PROCEDURE_DESCRIPTOR............................   5-109I                .PSECT...........................................   5-111I                .QUAD............................................   5-118I                .REPEAT..........................................   5-119I                .RESTORE_PSECT...................................   5-122I                .SAVE_PSECT......................................   5-124I                .S_FLOATING......................................   5-125I                .SHOW............................................   5-126I                .SIGNED_BYTE.....................................   5-129
  3.         vi  I                .SIGNED_WORD.....................................   5-130I                .SUBTITLE........................................   5-131I                .T_FLOATING......................................   5-132I                .TITLE...........................................   5-133I                .WARN............................................   5-135I                .WEAK............................................   5-136I                .WORD............................................   5-138#        6  MACRO-64 Supplied MacrosI           6.1  MACRO-64 Supplied Library........................     6-1I           6.2  Routines and Lexical Scope.......................     6-2I           6.2.1   Routines and Program Sections .................    6-2I           6.3  Using Macros to Control Program Sections.........     6-3I           6.3.1   Defining Program Sections .....................    6-3I           6.3.2   Using Macro Specific Symbols ..................    6-4I           6.3.3   Defining Procedure Type .......................    6-5I           6.3.4   Using Macros in Prologue Sections .............    6-5I           6.3.5   Using Macros in Epilogue Sections .............    6-6I           6.4  Programming Examples Using Supplied Macros.......     6-6I           6.5  Using the $CALL Macro............................     6-8I           6.5.1   Using $CALL in Source Code ....................    6-9I           6.6  Programming Considerations.......................    6-11I           6.6.1   Making Multiple Calls From the Same Routine ...   6-11I           6.6.2   Non-Standard Linkage ..........................   6-11I           6.6.3   Routine Restrictions ..........................   6-11I           6.7  Macro Descriptions...............................    6-12I           6.7.1   Syntax Rules ..................................   6-12I                $BEGIN_EPILOGUE..................................    6-13I                $CALL............................................    6-15I                $CODE_SECTION  ...................................   6-22I                $DATA_SECTION....................................    6-23I                $END_EPILOGUE....................................    6-24I                $END_PROLOGUE....................................    6-26I                $END_ROUTINE.....................................    6-27I                $LINKAGE_PAIR....................................    6-28I                $LINKAGE_SECTION.................................    6-30I                $OPDEF...........................................    6-31I                .PACKED..........................................    6-37I                $PROCEDURE_DESCRIPTOR............................    6-40I                                                                      vii  I                $RETURN..........................................    6-41I                $ROUTINE.........................................    6-42:        A  MACRO-64 Alpha AXP Architecture Quick ReferenceI           A.1  Register Usage Conventions.......................     A-3I           A.2  Instruction Operand Notation.....................     A-4PI           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-7 I           A.6  Common Architecture Opcodes in Numerical Order...     A-9oI           A.7  OpenVMS PALcode Instruction Summary..............    A-16 I           A.8  PALcode Opcodes in Numerical Order...............    A-20 I           A.9  Common Architecture Instructions.................    A-23 $        B  Programming with MACRO-64I           B.1  OpenVMS Calling Standard.........................     B-1 I           B.2  Accessing Memory with Base Registers.............     B-2tI           B.3  Data Structures..................................     B-6_I           B.3.1   Procedure Descriptor ..........................    B-6hI           B.3.2   Signature Block ...............................    B-7 I           B.3.3   Linkage Pair ..................................    B-7lI           B.4  Types of Routines................................     B-9eI           B.4.1   Routine Capabilities ..........................   B-10dI           B.4.2   Entry Prologue and Exit Epilogue Sequences ....   B-11hI           B.5  Example Program..................................    B-12nI           B.6  Establishing Self-Addressability.................    B-13oI           B.7  Optimization and Automatic Alignment.............    B-15 I           B.7.1   Automatic Data Alignment ......................   B-15rI           B.7.1.1   Controlling Data Alignment..................    B-16pI           B.7.1.2   Directives for Automatic Data Alignment.....    B-16oI           B.7.2   Automatic Code Label Alignment ................   B-18rI           B.7.3   Scheduling Optimization .......................   B-18eI           B.7.4   Peephole Optimization .........................   B-18qI           B.7.5   Using MACRO-64 for Performance ................   B-19,I           B.7.6   Viewing Optimization Results ..................   B-20          viii l ,"        C  Using LSE with MACRO-64I           C.1  Invoking LSE.....................................     C-1eI           C.2  Running Diagnostics..............................     C-1 %        D  Differences from VAX MACROiI           D.1  Assembler Features in MACRO-64...................     D-1_I           D.2  VAX MACRO Features Not Present in MACRO-64.......     D-6         E  Error Messages         Index         Examples8           3-1     Lexical Processing Without the EscapeI                   Operator.......................................    3-6.I           3-2     Lexical Processing With Escape Operator .......    3-6oI           3-3     Using Lexical Operators .......................    3-7.I           3-4     Source Statements After Macro Expansion .......   3-10.I           6-1     Program Using Supplied Macros .................    6-6 I           6-2     Program Using $CALL ...........................   6-10I           B-1     Routine Without Linkage Pairs .................    B-8 I           B-2     Routine With Linkage Pairs ....................    B-9oI           B-3     Establishing a Base Address ...................   B-14aI           B-4     Enabling and Disabling Data Alignment .........   B-16.        Figures.I           A-1     Data Structures ...............................    A-12I           A-2     Instruction Formats ...........................    A-2 I                                                                       ix2   r        TablesI           2-1     Using Tab Stops in Statement Fields ...........    2-2.6           2-2     Special Characters Used in MACRO-64I                   Statements.....................................    2-7.I           2-3     Summary of Unary Operators ....................   2-25.I           2-4     Summary of Binary Operators ...................   2-28.I           3-1     Summary of MACRO-64 Lexicals ..................   3-11.I           3-2     %TYPE Attributes ..............................   3-22-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-34 ;           5-4     Condition Tests for Conditional Assembly I                   Directives.....................................   5-58 I           5-5     Program Section Attributes ....................  5-112I           5-6     Default Program Section Attributes ............  5-115 I           5-7     .SHOW and .NOSHOW Symbolic Arguments ..........  5-1262I           6-1     ARGS Arguments ................................   6-17.I           A-1     Register Usage Conventions for OpenVMS AXP ....    A-3 I           A-2     Instruction Operand Notation ..................    A-4tI           A-3     Instruction Qualifier Notation ................    A-5rI           A-4     F-P Control Register (FPCR) Format ............    A-5lI           A-5     Decodable Pseudo-Operations ...................    A-7.;           A-6     Common Architecture Opcodes in NumericaliI                   Order..........................................    A-9gI           A-7     OpenVMS Unprivileged PALcode Instructions .....   A-16cI           A-8     OpenVMS Privileged PALcode Instructions .......   A-17lI           A-9     PALcode Opcodes in Numerical Order ............   A-20gI           A-10    Common Architecture Instructions ..............   A-23iI           B-1     Frame Attributes ..............................   B-11pI           B-2     Directives Using Automatic Alignment ..........   B-16             x    2I        _________________________________________________________________eI                                                                  PrefaceeC              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 StructureI              This manual contains the following chapters and appendices:.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 macros provided with the (MACRO-64)                 Assembler..G              o  Appendix A provides a quick reference to the Alpha AXP.G                 architecture as it relates to the MACRO-64 programming.C                 language. For more information, refer to the Alpha.'                 Architecture Handbook. I                                                                       xis b  G              o  Appendix B provides information on how to program more:                 effectively using the MACRO-64 assembler.F              o  Appendix C explains how to invoke the LSE editor with'                 the MACRO-64 language.DG              o  Appendix D describes the differences between VAX MACROA'                 and MACRO-64 features..H              o  Appendix E describes the error messages produced by the$                 MACRO-64 assembler.        Related Manuals.I              For more information on MACRO-64, see the following manuals.(              in this documentation set:H              o  MACRO-64 Assembler for OpenVMS AXP Systems Installation                 GuideI              o  MACRO-64 Assembler for OpenVMS AXP Systems Release Notes.I              For more information on the Alpha AXP architecture, see the.              following:4              o  Alpha Architecture Reference Manual,              o  Alpha Architecture Handbook<              o  Alpha AXP Achitecture Quick Reference Guide)              o  OpenVMS Calling Standard.        Conventions.F              In this manual, every use of Alpha VMS means the OpenVMSB              AXP operating system, every use of VAX VMS means theF              OpenVMS VAX operating system, and every use of VMS meansG              both the OpenVMS AXP operating system and the OpenVMS VAX.              operating system.4@              The following conventions are used in this manual:G              Ctrl/x           A sequence such as Ctrl/x indicates that.F                               you must hold down the key labeled CtrlH                               while you press another key or a pointing-                               device button.R         xii. . .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.NI                               A vertical ellipsis indicates the omissionSF                  .            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 choices..                               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. . .H              boldface text    Boldface text represents the introductionH                               of a new term or the name of an argument,9                               an attribute, or a reason..F                               Boldface text is also used to show userF                               input in online versions of the manual.?              italic text      Italic text emphasizes important.D                               information, indicates variables, andD                               indicates complete titles of manuals.F                               Italic text also represents informationD                               that can vary in system messages (forG                               example, Internal error number), command.G                               lines (for example, /PRODUCER=name), and.:                               command parameters in text.F              UPPERCASE TEXT   Uppercase text indicates a command, theH                               name of a routine, the name of a file, orG                               the abbreviation for a system privilege. G              -                A hyphen in code examples indicates that F                               additional arguments to the request areA                               provided on the line that follows.pA              numbers          All numbers in text are assumed tonB                               be decimal, unless otherwise noted.C                               Nondecimal radixes-binary, octal, or D                               hexadecimal-are explicitly indicated.D              mouse            The term mouse refers to any pointingD                               device, such as a mouse, a puck, or a&                               stylus.G              MB1, MB2, MB3    MB1 indicates the left mouse button, MB2 E                               indicates the middle mouse button, andcI                               MB3 indicates the right mouse button. (The E                               buttons can be redefined by the user.)hI              PB1, PB2, PB3,   PB1, PB2, PB3, and PB4 indicate buttons on$(              PB4              the puck.H              SB, SB           SB and SB indicate buttons on the stylus.F              VMS, OpenVMS,    The terms VMS, OpenVMS, and OpenVMS AXPB              OpenVMS AXP      refer to the same operating system.H              MACRO-64         MACRO-64 refers to MACRO-64 Assembler for3                               OpenVMS AXP Systems..         xiv. . .I                                                                        1 I        _________________________________________________________________I                                                             IntroductionG              MACRO-64 Assembler for OpenVMS AXP Systems is an assemblyB              language for programming Alpha AXP computers. SourceI              programs written in MACRO-64 are translated into object (or G              binary) code by the MACRO-64 assembler, which produces an.I              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.N        1.1 Language Features F              MACRO-64 source programs consist of a sequence of sourceC              statements. These source statements may be any of the.              following:3              o  Alpha AXP native-mode instructions.-              o  Direct assignment statements %              o  Assembler directivesi0        1.1.1 Alpha AXP Native Mode InstructionsG              Instructions manipulate data. They perform such functionsED              as addition, data conversion, and transfer of control.G              Instructions are usually followed in the source statementaG              by operands, which can be any kind of data needed for theoC              operation of the instruction. For a brief descriptiontF              of the Alpha instruction set, see Appendix A. For a moreG              detailed description of the Alpha native mode instruction5E              set, see the Alpha Architecture Reference Manual or the *              Alpha Architecture Handbook.I                                                                      1-1.   1        Introduction        1.1 Language Features.*        1.1.2 Direct Assignment StatementsD              Direct assignment statements equate symbols to values.G              For more information on direct assignment statements, see.              Section 2.11. "        1.1.3 Assembler DirectivesI              Directives guide the assembly process and provide tools for.G              using the instructions. For more information on assembler.(              directives, see Chapter 5.D              There are two classes of assembler directives: general8              assembler directives and macro directives.,        1.1.3.1 General Assembler DirectivesE              General assembler directives can be used to perform thee#              following operations:>              o  Store data or reserve memory for data storageH              o  Control the alignment of parts of the program in memoryH              o  Specify the methods of accessing the sections of memory4                 in which the program will be stored3              o  Specify a procedure in the programmD              o  Specify the way in which symbols will be referencedF              o  Specify that a part of the program is to be assembled.                 only under certain conditions>              o  Display informational and diagnostic messagesI              o  Control the assembler options that are used to interpret.#                 the source programP         1.1.3.2 Macro DirectivesC              Macro directives are used to define macros and repeat.C              blocks. They allow you to repeat identical or similartI              sequences of source statements throughout a program withoutH              rewriting those sequences. Use of macros and repeat blocksG              helps minimize programmer errors and speeds the debuggingo              process.         1-2    I                                                             IntroductionAI                                 1.2 Invoking MACRO-64 on OpenVMS SystemsP0        1.2 Invoking MACRO-64 on OpenVMS SystemsF              To invoke MACRO-64, use the following MACRO command with4              the /ALPHA_AXP command line qualifier:2              MACRO/ALPHA_AXP  file-spec[, . . . ]D              Note that you must specify the /ALPHA_AXP command lineA              qualifier before any other command line parameters,.1              qualifiers, or file specifications.t!              file-spec[, . . . ].F              If you do not specify a file type for an input file, the;              assembler uses the default file type of .M64..G              You can specify one or more source files to be assembled.P?              To assemble files individually, separate the file E              specifications with commas. To concatenate and assembleiA              the files as a single input file, separate the file 1              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.i%        1.2.1 Command Line Qualifiers.I              This section describes the command qualifiers used with the &              MACRO/ALPHA_AXP command.#              /[NO]ALIGNMENT=optioniI              Controls the alignment of code and data. Valid options are:AI              ___________________________________________________________uI              Option____Function_________________________________________ B              code      Alignment of certain branch target labels.I              data______Natural_alignment_of_data_items._________________NB              If you omit the qualifier from the command line, theG              default option is /NOALIGNMENT=(code, data). If more thaniI                                                                      1-3m c n        Introduction0        1.2 Invoking MACRO-64 on OpenVMS SystemsF              one option is specified, the options must be enclosed in3              parentheses and separated by a comma. $              /[NO]DEBUG[=(options)]9              Specifies DEBUG support. Valid options are:gI              ___________________________________________________________OI              Option____Function_________________________________________n;              symbol    Generates debug symbol information. 8              traceback Generates traceback information.>              all       Generates all above debug information.I              none______Generates_no_debug_information.__________________ H              The default qualifier is /NODEBUG. The default when /DEBUG:              is specified with no keywords is /DEBUG=all.)              /[NO]DIAGNOSTIC[=file-spec]PD              Controls whether diagnostics are created and stored inE              the specified optional file. If a file specification is C              not supplied, the assembler creates a diagnostic file B              using the same name as the source file. For example,C              if you use a source file named XXX.M64, the assembler F              creates a diagnostic file named XXX.DIA. You can use theE              the diagnostic file with other Digital layered products C              including, but not limited to, the Language-Sensitive              Editor (LSE).c5              The default qualifier is /NODIAGNOSTIC.d$              /ENVIRONMENT=[NO]FLOATE              Controls whether the assembler generates floating-point.I              instructions when optimizing code and performing code-labele              alignment.I              Currently, the only floating-point instruction generated bytH              the assembler during optimization and alignment processingC              is FNOP, the floating-point no-operation instruction. E              If you specify /ENVIRONMENT=NOFLOAT, the assembler doesoE              not generate any floating-point instructions as part of2C              optimization and alignment processing. Floating-pointe         1-4     I                                                             IntroductioniI                                 1.2 Invoking MACRO-64 on OpenVMS SystemsOF              instructions that you specify in your source program are              unaffected.h              /LIBRARY>              Searches macro libraries in the following order:B              1. The library designated by the /LIBRARY qualifier.)              2. The .LIBRARY directives.CH              3. The MACRO64.MLB library. The assembler searches for theF                 MACRO64.MLB macro library in the following locations:I                 MACRO64$LIBRARY, ALPHA$LIBRARY, and finally SYS$LIBRARY.rD              4. The STARLET.MLB library. The assembler searches forC                 the the STARLET.MLB macro library in the following G                 locations: MACRO64$LIBRARY, ALPHA$LIBRARY, and finally                 SYS$LIBRARY.iF              In addition, you can place the macro library definitionsE              in the listing file by using the command line qualifieri              /SHOW=LIBRARY.#              /[NO]LIST[=file-spec]aB              Controls whether a listing is created and optionallyI              provides an output file specification for the listing file. H              Do not use wildcard characters in this file specification.E              If you issue the MACRO/ALPHA_AXP command interactively,eG              /NOLIST is the default. The assembler sends output to theiI              current output device rather than to a listing file. If you G              execute the MACRO/ALPHA_AXP command in a batch job, /LIST               is the default.mG              If you do not specify a file specification, the assemblerhF              creates a listing file using the same name as the sourceH              file. For example, if you use a source file named XXX.M64,A              the assembler creates a listing file named XXX.LIS.I                                                                      1-5  t          Introduction0        1.2 Invoking MACRO-64 on OpenVMS Systems              /[NO]MACHINE_CODEeE              Produces a binary machine code listing after the sourceA              text if a listing file is requested. The default is               /NOMACHINE_CODE.               /NAMES=case_optionF              Specifies the alphabetic casing of identifiers in source1              code statements. Valid options are: I              ___________________________________________________________ I              Option____Function_________________________________________ D              upper_    Converts all identifiers to upper alphabetic              case      case.qD              lower_    Converts all identifiers to lower alphabetic              case      case..I              as_is     Causes all identifiers to remain in the case used I              __________in_source_statements.____________________________ F              If you use the /NAMES option in a command line, you mustF              supply a case_option. If you omit the qualifier from theD              command line, the default option is /NAMES=upper_case.%              /[NO]OBJECT[=file-spec]xG              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. +              /[NO]OPTIMIZE[=(option-list)]e         1-6     I                                                             Introduction I                                 1.2 Invoking MACRO-64 on OpenVMS Systems H              Specifies optional assembler optimizations. Valid items in"              the option-list are:I              ___________________________________________________________ I              Option____Function_________________________________________d9              schedule  Specifies instruction scheduling. I              peephole__Specifies_peepholing.____________________________ A              Specifying /OPTIMIZE with no options is the same asp7              specifying /OPTIMIZE=(peephole,schedule).oG              The default qualifier is /NOOPTIMIZE. See Section B.7 for,+              information on optimizations. "              /[NO]SHOW=(item,...)A              Modifies the output listing file. This qualifier isyG              meaningful only when /LIST is specified. Valid items are:tI              ___________________________________________________________aI              Option___________Function__________________________________ 6              expansions       Shows macro expansions.C              conditionals     Shows sections of code conditionally '                               skipped.t8              include          Shows all .INCLUDE files.I              library__________Shows_macro_library_modules.______________o5              The default item is /SHOW=conditionals.)              /[NO]WARNINGS=(option-list)oF              Controls the severity level of messages and diagnostics.               Valid options are:I              ___________________________________________________________ I              Option______Function_______________________________________ 4              warnings    Display/suppress warnings.:              informationaDisplay/suppress informationals.F              all         Display/suppress warnings and informational.I              none________Display/suppress_nothing.______________________ I                                                                      1-7    a        Introduction0        1.2 Invoking MACRO-64 on OpenVMS Systems              The defaultnG              qualifier is /WARNINGS=(warnings,informationals). If more G              than one option is specified, options must be enclosed in /              parentheses separated by a comma.o         1-8     I                                                                        2tI        _________________________________________________________________ I                                 Components of MACRO-64 Source Statementse?              A source program consists of a sequence of source I              statements that the assembler interprets and processes, one H              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 statement +              and the following components:B              o  Character set              o  Numbers              o  Symbols              o  Local labelse&              o  Terms and expressions+              o  Unary and binary operatorse-              o  Direct assignment statementsB)              o  Current location counter #        2.1 Source Statement Format C              MACRO-64 source statements can have a maximum of four!              fields, as follows:tA              o  Label field-Symbolically defines a location in af                 program.sD              o  Operator field-Specifies the action to be performedF                 by the statement; can be an instruction, an assembler,                 directive, or a macro call.G              o  Operand field-Contains the instruction operands or the_F                 assembler directive arguments or the macro arguments.I                                                                      2-1     0        Components of MACRO-64 Source Statements#        2.1 Source Statement FormatoC              o  Comment field-Contains a comment that explains theAB                 meaning of the statement; does not affect program                 execution.cD              Although statement fields can be separated by either aE              space or a tab stop, Digital recommends that you formatsC              statements with the Tab key to insure consistency andl%              clarity. See Table 2-1.I              Table_2-1_Using_Tab_Stops_in_Statement_Fields______________ "                         Column in                         Which                         FieldI              Field______Begins_____Tab_Stops_to_Reach_Column____________i%              Label      1          0s%              Operator   9          1 %              Operand    17         2 I              Comment____41_________5____________________________________ E              The following example shows a typical source statement.tS              EXP:    .BLKL   50                     ; Table stores expected valuesh0              Rules for Coding Source StatementsE              The following rules apply for coding source statements: E              o  You can continue a single statement on several lineseE                 by using a hyphen (-) as the last nonblank character F                 before the comment field, or at the end of line (when&                 there is no comment).C              o  In most cases, a statement can be continued at any-C                 point. If a symbol name is continued and the first.B                 character on the second line is a tab or a blank,E                 the symbol name is terminated at that character. For ?                 information on using symbols, see Section 2.5. E              o  Blank lines are legal, but they have no significance C                 in the source program except that they terminate a                   continued line.C              The following sections describe each of the statement.              fields in detail.l         2-2l d cI                                 Components of MACRO-64 Source Statements I                                              2.1 Source Statement Formati        2.1.1 Label Field I              A label is a user-defined symbol that identifies a locationrE              in the program. The symbol is assigned a value equal totH              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. H              o  The user-defined symbol name can be up to 31 charactersI                 long and can contain any alphanumeric character, as wellH                 as the underscore (_), dollar sign ($),  and period (.)                 characters.E              o  If a label extends past column 7, Digital recommendsPG                 you place it on a line by itself so that the followingeG                 operator field can start in column 9 of the next line.tG              o  A label is terminated by a colon (:) or a double colons                 (::).I              In the following source statement, EXP: is the label field.cS              EXP:    .BLKL   50                     ; Table stores expected values B              See Section 2.5.2 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 (::).RG              o  Local labels-Can be referenced only within the current A                 module and are defined using a single colon (:).eC              o  Temporary labels-Can be referenced only within thefF                 bounds of either two local labels, two global labels,@                 two psects, or within the bounds of a temporaryC                 label scope, as defined by .ENABLE LOCAL_BLOCK andtC                 .DISABLE LOCAL_BLOCK. Temporary labels are defined D                 using one to five digits, followed by a dollar signE                 and a single colon ($:). See Section 2.6 for further                  information.oI                                                                      2-3  e e0        Components of MACRO-64 Source Statements#        2.1 Source Statement Format S              EXP:    .BLKL   50                     ; EXP is a local label used topZ                                                     ; identify a 50-word block of storageU              DATA::  .BLKW   25                     ; DATA is a global label used toZ                                                     ; identify a 25-word block of storageW              10$:    .BLKW    5                     ; 10$ is a temporary label used to T                                                     ; identify a five word block of?                                                     ; storage.        2.1.2 Operator FieldH              The operator field specifies the action to be performed byF              the statement. This field can contain an instruction, anG              assembler directive, or a macro call. If the operator is: G              o  An instruction, MACRO-64 generates the binary code foruH                 that instruction in the object module. The instructions*                 are listed in Appendix A.G              o  A directive, MACRO-64 performs certain control actionsI                 or processing operations during source program assembly.E                 The assembler directives are described in Chapter 5.eF              o  A macro call, MACRO-64 expands the macro. Macro callsD                 are described in Chapter 4 and in Chapter 5 (.MACROH                 directive). Macros supplied with MACRO-64 are described                 in Chapter 6.H              Use either a space or a tab stop to terminate the operatorH              field; however, Digital recommends you use the tab stop to+              terminate the operator field.bF              In the following source statement, .BLKL is the operator              field.S              EXP:    .BLKL   50                     ; Table stores expected valuesd        2.1.3 Operand Field_H              The operand field can contain operands for instructions orG              arguments for either assembler directives or macro calls. H              Operands for instructions identify the memory locations orG              the registers that are used by the machine operation. ThelG              operand field for a specific instruction must contain the G              number and type of operands required by that instruction.cI              Arguments for a directive must meet the format requirementshG              of that directive. Chapter 5 describes the directives andc,              the format of their arguments.         2-4t l rI                                 Components of MACRO-64 Source StatementsI                                              2.1 Source Statement FormatOG              Operands for a macro must meet the requirements specifiedsH              in the macro definition. See the description of the .MACRO%              directive in Chapter 5.cC              Use a comma (,) to separate operands for instructionslB              and directives. (See Section 2.8 for a discussion of              expressions.)lH              The semicolon that starts the comment field terminates theI              operand field. If a line does not have a comment field, thelA              operand field is terminated by the end of the line.sB              In the following source statement example, 50 is theA              operand field supplied to the operand field, .BLKL. S              EXP:    .BLKL   50                     ; Table stores expected values2        2.1.4 Comment FieldyH              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 affect 7              assembly processing or program execution.MG              The comment field must be preceded by a semicolon (;) and4I              can contain any printable ASCII character. It is terminatedB%              by the end of the line.BI              A comment can appear on a line by itself. If a comment doesrG              not fit on one line, it can be continued on the next, but E              the continuation must be preceded by another semicolon.F              In the following source statement example, "Table storesC              expected values", is the comment field. Note that theu4              comment field begins with a semicolon.S              EXP:    .BLKL   50                     ; Table stores expected valuess        2.2 Character SetyD              When coding source statements, you need to be aware ofF              what characters are acceptable to the assembler, and howF              the assembler interprets them. The following numbers and7              characters are accepted by the assembler.bC              o  The letters of the alphabet, A to Z, uppercase andaB                 lowercase. By default, the assembler converts allI                                                                      2-5    f0        Components of MACRO-64 Source Statements        2.2 Character SetiH                 lowercase letters to uppercase. This means it considersC                 lowercase letters equivalent to uppercase letters. D                 The assembler can operate in a case-sensitive mode.G                 In case sensitive mode, the assembler does not convert G                 lowercase letters to uppercase letters. On OpenVMS and I                 OpenVMS AXP systems, case sensitive mode can be selectedeG                 from the command line with the /NAMES=as_is qualifier.s#              o  The digits 0 to 9.M<              o  The special characters listed in Table 2-2.         2-6e a eI                                 Components of MACRO-64 Source Statements_I                                                        2.2 Character Set_I              Table_2-2_Special_Characters_Used_in_MACRO-64_Statements___e"                         CharacterI              ___CharacteName________Function____________________________t?                 _       Underscore  Character in symbol names.s?                 $       Dollar      Character in symbol names._                         sign_G                 .       Period      Character in symbol names, currentmI                                     location counter, and decimal point.l<                 :       Colon       Local label terminator.=                 ::      Double      Global label terminator.                         colonI                 =       Equal sign  Local direct assignment operator andfG                                     macro keyword argument terminator.fG                 ==      Double      Global direct assignment operator.s#                         equal signj6                         Tab         Field terminator.6                         Space       Field terminator.=                 #       Number      Literal value indicator.J                         sign ?                 @       At sign     Arithmetic shift operator.)H                 ,       Comma       Field, operand, and item separator.=                 ;       Semicolon   Comment field indicator. H                 +       Plus sign   Unary plus operator, and arithmetic7                                     addition operator. E                 -       Minus sign  Unary minus operator, arithmetic_C                         or          subtraction operator, and line_<                         hyphen      continuation indicator.H                 *       Asterisk    Arithmetic multiplication operator.B                 /       Slash       Arithmetic division operator.:                 &       Ampersand   Logical AND operator.I                 !       Exclamation Logical inclusive OR operator point./                         pointI                                                 (continued on next page)eI                                                                      2-7    0        Components of MACRO-64 Source Statements        2.2 Character Set_C              Table 2-2 (Cont.) Special Characters Used in MACRO-64 I              __________________Statements_______________________________ "                         CharacterI              ___CharacteName________Function____________________________ E                 \       Backslash   Logical exclusive OR and numeric B                                     conversion indicator in macro/                                     arguments. G                 ^       Circumflex  Unary operators and macro argumentG/                                     delimiter.vD                 ( )     Parentheses Displacement and register fieldI                                     delimiter in an instruction operand._D                                     Argument delimiter to a lexical.                                     operator.D                 <>      Angle       Argument or expression grouping0                         brackets    delimiters.E                 ?       Question    Created local label indicator inp5                         mark        macro arguments. A                 '       Apostrophe  Macro argument concatenation/                                     indicator.C>                 "       Double      Quoted literal delimiter.                         quoteH                 %       Percent     Delimits the beginning of a lexical.                         sign        operator.G                 (space) Space or    Separates source statement fields.B                         tab         Spaces within expressions are7                 (tab)               otherwise ignored. A                 ,       Comma       Separates symbolic arguments_G                                     within the operand field. MultipleCE                                     expressions in the operand fieldoI              _______________________must_be_separated_by_commas.________s        2.3 NumberspD              Numbers can be integers or floating-point numbers. TheA              following sections describe these types of numbers.t         2-8y e  I                                 Components of MACRO-64 Source Statements I                                                              2.3 Numbersn        2.3.1 Integers?              Integers can be used in any expression, including >              expressions in operands and in direct assignment=              statements. For information on expressions, seed              Section 2.8.              Format              snn               seG              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 asmF              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 signed 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-mG              64 translates such numbers into two's complement form. Inf:              positive numbers, the plus sign is optional.$        2.3.2 Floating-Point NumbersI              A floating-point number can be used in the .DOUBLE, .FLOAT,fE              .F_FLOATING, .D_FLOATING, .G_FLOATING, .S_FLOATING, andDI              .T_FLOATING directives. For more information on directives,eF              see Chapter 5. A floating-point number cannot be used inI              an expression or with a unary or binary operator except theF              unary plus and unary minus. For information on unary and=              binary operators, Section 2.9 and Section 2.10._I              A floating-point number can be specified with or without an               exponent.rI                                                                      2-9  o n0        Components of MACRO-64 Source Statements        2.3 Numberso              Format5              Floating-point number without exponent:               snn               snn.nn              snn.2              Floating-point number with exponent:              snnEsnn               snn.nnEsnn              snn.Esnn              si              An optional sign.               nn@              A string of decimal digits in the range of 0 to 9.G              The decimal point can appear anywhere to the right of the I              first digit. Note that a floating-point number cannot start I              with a decimal point because MACRO-64 will treat the numbernG              as a user-defined symbol. For information on user-definedb)              symbols, see Section 2.5.2.a        2.4 Quoted LiteralstD              A quoted literal is a string of characters enclosed inD              double quotes (" "). Use the following guidelines when8              specifying characters in a quoted literal:E              o  Any character except null, carriage return, and form 3                 feed can appear within the string. H              o  To include a double quote or backslash in a string, you6                 must precede it with a backslash (\).C              o  To specify an arbitrary character, you can specifytE                 "\xhh", where each h represents a single hexadecimalu0                 digit. For example, the string:!                 "AB\\CD\"EF\x47"l3                 contains the following characters:i                 AB\CD"EFGG              Also note that the assembler does not convert the case of <              alphabetic characters within a quoted literal.         2-10 b nI                                 Components of MACRO-64 Source StatementsiI                                                      2.4 Quoted LiteralsoF              Quoted literals can be continued over several lines. UseC              the hyphen (-) as the line continuation character and.A              delimit the string with double quotes. For example:m@              .ASCII "Strings are delimited with double-quotes."<              .ASCII "The backslash is an escape character."S              .ASCII "Use two backslashes (\\) to represent the back-slash itself."aV              .ASCII "Hexidecimal escape sequences use lower or upper X: \x00 or \X00"W              .ASCII "Precede a double quote with a backslash (\") to embed the quote."bD              .ASCII "Strings can be continued onto multiple lines -&              just as any other line."        2.5 SymbolssH              You use symbols in MACRO-64 source statements to representG              an instruction, directive, register name, or value. Three G              types of symbols can be used in MACRO-64 source programs:cG              permanent symbols, user-defined symbols, and macro names.d        2.5.1 Permanent SymbolscH              Permanent symbols consist of instruction mnemonics, MACRO-C              64 directives, and register names. You do not need tolI              define directives before you use them in the operator fieldD              of an MACRO-64 source statement. Also, you do not needG              to define instruction mnemonics and register names before 7              using them in the instruction statements.aA              You can express the 32 general registers and the 32 F              floating point registers of the Alpha AXP processor in a(              source program as follows:I              ___________________________________________________________               RegisterI              Name____Description________________________________________o)              R0      General register 0. )              R1      General register 1.r              .       .               .       .               .       .aI                                                                     2-11; e f0        Components of MACRO-64 Source Statements        2.5 Symbols I              ___________________________________________________________               RegisterI              Name____Description________________________________________ F              R29 or  General register 29 or frame pointer. If you useI              FP      R29 as a framer pointer, Digital recommends you usenH                      the name FP. If you use R29 as a general register,>                      Digital recommends you use the name R29.F              R30 or  General register 30 or stack pointer. If you useI              SP      R30 as a stack pointer, the name SP is recommended;aH                      if you use R30 as a general register, the name R30%                      is recommended. *              R31     General register 31.0              F0      Floating point register 0.              .       .a              .       .               .       .aI              F31_____Floating_point_register_31.________________________nB              Registers are reserved names which cannot be used or'              redefined in any context.i2        2.5.2 User-Defined Symbols and Macro NamesE              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.) These symbols can also be used inhC              expressions. For more information on expressions, see               Section 2.8.E              Use the following rules to create user-defined symbols:hE              o  Use alphanumeric characters, underscores (_), dollarrA                 signs ($), and periods (.).  Any other character '                 terminates the symbol.tD              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.         2-12   uI                                 Components of MACRO-64 Source StatementsiI                                                              2.5 SymbolsoI              o  The symbol cannot be one of the following conditional or "                 macro directives:8                 .ELSE            .ENDC            .ENDMC                 .ENDR            .IF              .IF_FALSE (.IFF)e7                 .IF_TRUE (.IFT)  .IF_TRUE_FALSE   .IIFd)                                  (.IFTF)O8                 .INCLUDE         .IRP             .IRPC9                 .LIBRARY         .MACRO           .MCALL 8                 .MDELETE         .MEXIT           .NARG)                 .NCHAR           .REPEAT 1              In addition, by Digital convention:sE              o  The dollar sign ($) is reserved for names defined bydE                 Digital. This convention ensures that a user-definedeA                 name (that does not have a dollar sign) will notsE                 conflict with a Digital-defined name (that does have                   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.aB              Macro names follow the same rules and conventions asE              user-defined symbols. See the description of the .MACROpI              directive in Chapter 5 for more information on macro names.nH              User-defined symbols and macro names do not conflict; thatI              is, the same name can be used for a user-defined symbol andh              a macro.'        2.5.3 Determining Symbol ValuesF              The value of a symbol depends on its use in the program.I              MACRO-64 uses a different method to determine the values of I              symbols in the operator field than it uses to determine the5              values of symbols in the operand field.,I                                                                     2-13  u  0        Components of MACRO-64 Source Statements        2.5 SymbolsB3        2.5.3.1 Using Symbols in the Operator FieldeF              A symbol in the operator field can be either a permanentD              symbol or a macro name. MACRO-64 searches for a symbol0              definition in the following order:               1. Register names:                    R0-R31                    FP                    SP                    F0-F312              2. Macro and conditional directives:4                 .ELSE       .ENDC             .ENDM?                 .ENDR       .IF               .IF_FALSE (.IFF) 3                 .IF_TRUE    .IF_TRUE_FALSE    .IIF4$                 (.IFT)      (.IFTF)4                 .INCLUDE    .IRP              .IRPC5                 .LIBRARY    .MACRO            .MCALLe4                 .MDELETE    .MEXIT            .NARG$                 .NCHAR      .REPEAT/              3. Previously defined macro namesiF              4. Permanent symbols (instructions and other directives)E              This search order allows most permanent symbols, exceptsH              registers, conditional directives and macro directives, toF              be redefined as macro names. If a symbol in the operatorH              field is not defined as a macro or a permanent symbol, the2              assembler displays an error message.2        2.5.3.2 Using Symbols in the Operand FieldI              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 localsF              (internal) symbols or global (external) symbols. WhetherG              numeric symbols and labels are local or global depends on .              their use in the source program.D              A local numeric symbol or label can be referenced 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 completely         2-14 i oI                                 Components of MACRO-64 Source Statements I                                                              2.5 SymbolsiG              independent. The definition of a global numeric symbol ormF              label, however, can be referenced from any module in the              program.I              MACRO-64 treats all user-defined numeric symbols and labelseI              as local unless you explicitly declare them to be global by)              doing one of the following:lH              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 assignment+.                 statements, see Section 2.11.E              o  Use the .WEAK directive. For more information on the ,                 .WEAK directive, see .WEAK.G              User-defined lexical string symbols can only be used withoC              the lexical string operators. For more information onaE              lexical string operators, see Chapter 3. You can defineoG              a macro using the same name as a previously defined localaH              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 localH              and global numeric symbol. Nor can you use the same symbolD              name for both a numeric symbol (local or global) and a&              label (local or global)./        2.6 Temporary Labels Within Source Code_G              Use temporary labels to identify addresses within a block               of source code.               Format              nnnnn$:_              nnnnn ;              A decimal integer in the range of 1 to 65535. I              In most cases, you can use temporary labels in the same way F              you use other labels that you define; however, there are              some differences:oH              o  Temporary labels cannot be referenced outside the block;                 of source code in which they are declared. I                                                                     2-15     0        Components of MACRO-64 Source Statements/        2.6 Temporary Labels Within Source CodeG              o  Temporary labels can be redeclared in another block of                  source code.lD              o  Temporary labels that occur within a psect with theF                 MIX or NOMIX attribute, do not appear in the debuggerI                 symbol table and thus cannot be accessed by the symbolic I                 debugger. For more information on psects, see Chapter 5. ?              o  Temporary labels cannot be used in the .END or G                 .PROCEDURE_DESCRIPTOR directives. For more information 6                 on the .END directive, see Chapter 5.A              By convention, temporary labels are positioned like B              statement labels: left-justified in the source text.D              Although temporary labels can appear in the program inI              any order, by convention, the temporary labels in any block C              of source code should be in increasing numeric order. B              Temporary labels are useful as branch addresses whenD              you use the address only within the block. You can useH              temporary labels to distinguish between addresses that areI              referenced only in a small block of code and addresses thattG              are referenced elsewhere in the module. A disadvantage oftI              temporary labels is that their numeric names do not provide G              any indication of their purpose. Consequently, you should G              not use temporary labels to label sequences of statementsrG              that are logically unrelated; user-defined symbols shouldo              be used instead.C              Digital recommends that users create temporary labels E              only in the range of 0$ to 29999$ because the assembler D              automatically creates temporary labels in the range ofI              30000$ to 65535$ for use in macros. For more information oni0              temporary labels, see Section 4.7.E              The temporary label block in which a temporary label is =              valid is delimited by the following statements:p7              o  A user-defined label: global or local.eG              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:         2-16 e mI                                 Components of MACRO-64 Source StatementssI                                  2.6 Temporary Labels Within Source Codes&                 A:    ADDQ R1, R2, R37                       BEQ R3, 2$         ; correct use &                       MULQ R2, R3, R4I                 2$:   ADDQ R1, R4, R5    ; definition of temporary label 3                 B:    BNE R5, 2$         ; illegali&                 C:    SUBQ R2, R4, R6E                 In this example, 2$ is a temporary label, defined inrF                 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 hastE                 already closed the range. The temporary label 2$ canF                 be used later in the program, but its definition must;                 appear within the same block as the label.tH              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-oH              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 directiveuE              o  A .DISABLE LOCAL_BLOCK directive followed by a user-i4                 defined label or a .PSECT directive@              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 F              .SAVE_PSECT [LOCAL_BLOCK] and .RESTORE_PSECT directives,              see Chapter 5.        2.7 Label Addresses ?              In the absence of optimization and automatic data H              alignment, label addresses are defined to be the psect andG              offset of the current location counter (see Section 2.11)cB              at the point where the label is defined. When eitherG              optimization or automatic data alignment are enabled, theeH              following additional considerations apply. See Section B.7G              for information on optimizations and automatic alignment. I                                                                     2-17o t h0        Components of MACRO-64 Source Statements        2.7 Label Addressesi?        2.7.1 Label Addresses, Optimization, and Code Alignment F              Optimization and code alignment can affect the addressesD              assigned to labels defined in psects that have the EXEG              and NOMIX attributes. Optimization and code alignment are H              disabled by default, and can be enabled with the /OPTIMIZEH              and /ALIGNMENT command-line qualifiers (see Section 1.2.1)G              and the .ENABLE directive (see Section 5.1) . In general,"G              the assembler assigns the psect and offset of the currentkD              location counter prior to optimization or alignment ofD              code labels. However, the assembler adjusts referencesD              to labels in branch instructions to the address of theI              label after optimization and code alignment processing. ThetF              assembler does not adjust references to labels where theH              label reference occurs in an expression with more than one;              term. The following example illustrates this.e-                      .psect CODE, exe, nomixsU                      BSR     R0, 10$                 ; R0 -> 10$ (post-optimization)eT              10$:    LDA     R1, 20$-10$(R0)         ; R1 -> 20$ (pre-optimization)"                      JMP     (R1)                      [...]               20$:D              In the example above, the assembler adjusts the targetF              address of the BSR instruction to be the location of 10$E              after optimization and code alignment have taken place.uE              Thus, the branch to 10$ functions as expected. However, I              when processing the LDA instruction, the assembler computeslF              the offset between 20$ and 10$ prior to optimization andH              code alignment. Thus, the address of 20$ that is stored inI              R1 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 code H              alignment and the JMP instruction may not transfer control&              to the expected address.>              Note also that the assembler only performs post-G              optimization adjustment of label addresses when the label_>              is the only term in the expression. For example:         2-18 c tI                                 Components of MACRO-64 Source StatementsiH                                                     2.7 Label Addresses-                      .psect CODE, exe, nomix '                      .base R27,LINKAGEa0                      LDQ     R26, ROUTINE1_ADDR(                      JSR     R26, (R26)0                      LDQ     R26, ROUTINE2_ADDR(                      JSR     R26, (R26)!                      RET     R28r                      NOP                       NOP               ROUTINE1:R#                      RET     (R26)d              ROUTINE2: #                      RET     (R26) +                      .psect LINKAGE, noexe               LINKAGE:              ROUTINE1_ADDR:'                      .address ROUTINE1_              ROUTINE2_ADDR:)                      .address ROUTINE2+0 E              In the example above, the assembler adjusts the addressiH              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 theH              offset 0 and the address of ROUTINE2 prior to optimizationI              and code alignment and stores the result. Since the addresseB              stored is the address prior to optimization and codeD              alignment, the second JSR instruction may not transfer6              control to the address that is expected.:        2.7.2 Label Addresses and Automatic Data Alignment?              Automatic data alignment can affect the addressesoE              assigned to labels in psects that have the NOEXE or MIXB              attributes. Automatic data alignment is enabled withE              the .ENABLE ALIGN_DATA directive or the /ALIGNMENT=dataOD              command line option. For more information on automaticE              alignment, see Section 5.2. For more information on the 1              .ENABLE directive, see Section 5.3. I                                                                     2-19    0        Components of MACRO-64 Source Statements        2.7 Label AddressesFC              A label that occurs in a statment with a data storage.G              directive is assigned the psect and offset of the storage B              allocated by the data storage directive. If the dataI              storage directive requires automatic alignment, the address A              is assigned to the label after automatic alignment.nD              The same is true of labels that occur in statements byE              themselves and that are followed by a data directive iniC              a subsequent statement. However, if a label occurs inoC              a statement by itself and is followed by an assemblerhE              directive that is not a data storage directive, a macrohA              directive, or a conditional directive, the label isnC              assigned the psect and offset of the current locationi7              counter prior to any automatic alignment.sF              Note that the assembler only assigns addresses to labelsB              after alignment under the conditions described aboveE              and only with automatic alignment. If you place a labelaH              before a .ALIGN directive that manually aligns the currentD              location counter, the assembler assigns the address ofE              the label prior to performing the manual alignment. ThemD              following example illustrates the interaction of label>              address assignment and automatic data alignment:&                    .enable align_data%                    .psect data,noexe X                    .byte   1             ; The byte is stored in psect data at offset 0U              A:    .print "Not aligned"  ; Any non-macro, non-conditional statement, T                                          ; including this .PRINT directive preventsA                     ; A from being automatically aligned -- A is =                                          ; assigned offset 1bR              B:                          ; B is automatically aligned to offset 4R              C:    .long   2             ; C is automatically aligned to offset 4]              D:    .align 0              ; The .ALIGN global directive prevents D from being \                                          ;  automatically aligned -- D is assigned offset 8S              E:    .octa 3               ; E is automatically aligned to offset 16 C              Automatic data alignment and label-address assignment D              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 word0              that contains the string's length:         2-20   I                                 Components of MACRO-64 Source Statements H                                                     2.7 Label Addresses;                      .macro VARYING_STRING STRING ?L1, ?L2 )                              .word L2-L1p-                          L1: .ASCII "STRING"i                          L2: *                      .ENDM VARYING_STRINGI              If an invocation of the VARYING_STRING macro is followed byeI              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 byteso              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 thelB              .ASCII directive. Instead, it is assigned the offsetC              32 along with the label F because the .OCTA directive C              requires automatic alignment to offset 32. Therefore, F              the string length is incorrectly stored as 30 rather 25.C              To make this macro work as desired, you must include,F              in the macro definition, a macro directive that is not aE              data storage, macro, or conditional directive after thetD              generated label L2. As shown below, .ALIGN 0 is a goodH              choice as it reflects the idea that the preceding label is              not aligned.4               .macro VARYING_STRING STRING ?L1, ?L2                    .word L2-L1=&                   L1: .ASCII "STRING"                   L2: .align 0n#               .ENDM VARYING_STRING B              With this change, the generated label L2 is assignedC              the offset 27 before the assembler performs automaticeB              data alignment for the .OCTA directive. As a result,F              the VARYING_STRING macro works as desired and stores the*              correct string length of 25.I                                                                     2-21e m s0        Components of MACRO-64 Source Statements!        2.8 Terms and Expressionsi!        2.8 Terms and Expressionse1              A term can be any of the following:               o  A number."              o  A numeric symbol.              o  A label. F              o  The current location counter. For more information on@                 the current location counter, see Section 2.12.F              o  Any of the previously noted items preceded by a unary                 operator.G              For more information on unary operators, see Section 2.9.eG              MACRO-64 evaluates terms as quadword (8-byte) values. ThetH              current location counter (.) has the value of the location:              counter at the start of the current operand.I              MACRO-64 considers unary operators part of a term and thus,sI              performs the action indicated by a unary operator before iteA              performs the action indicated by a binary operator.oD              Expressions are combinations of terms joined by binaryF              operators and evaluated as quadword (8-byte) values. ForE              more information on binary operators, see Section 2.10.mD              MACRO-64 evaluates expressions from left to right withC              no operator precedence rules. However, angle brackets E              (<>) can be used to change the order of evaluation. AnyrF              part of an expression that is enclosed in angle bracketsF              is first evaluated to a single value, which is then usedE              in evaluating the complete expression. For example, themG              expressions A*B+C and A*<B+C> are different. In the firstnB              case, A and B are multiplied and then C added to theD              product. In the second case, B and C are added and theE              sum is multiplied by A. Angle brackets can also be used H              to apply a unary operator to an entire expression, such as              -<A+B>. A              Expressions fall into four categories: relocatable, I              absolute, external (global), and complex. You can determine <              the type of expression by the following rules:C              o  An expression is relocatable if its value is fixed F                 relative to the start of the program section in which         2-22 e tI                                 Components of MACRO-64 Source StatementslI                                                2.8 Terms and ExpressionsiH                 it appears. The current location counter is relocatable2                 in a relocatable program section.G              o  An expression is absolute if its value is an assembly- A                 time constant. An expression whose terms are allhF                 numbers is absolute. An expression that consists of aE                 relocatable term minus another relocatable term fromtF                 the same program section is absolute, because such anA                 expression reduces to an assembly-time constant.eG              o  An expression is external if it is not complex, and itoI                 contains one or more symbols that are not defined in the                   current module.I              o  An expression is complex if it contains a relocatable orlI                 external term or sub-expression that is operated upon bylF                 an operator other than the plus sign (+) or the minusG                 sign (-). An expression is also complex if it contains I                 more than one term or sub-expression that is relocatableyI                 or external. An exception to this rule is the difference G                 between two relocatable sub-expressions or terms where I                 both relocatable values occur in the same psect. In this 2                 case, the expression is absolute.F              Complex expressions are constrained to use the following              form:               FORMAT               term operator term              term?              Term is a relocatable or external sub-expression.               operatorD              Operator is any of the MACRO-64 operators described in              Section 2.10.eD              Neither term can itself be a complex subexpression. IfF              you specify a complex expression that does not match theC              correct form, the assembler issues a diagnostic errorlD              message indicating that the expression is too complex.F              Note also that the assembler does not attempt to reorderD              expressions to make your expressions match the correctI              form. For example, the following expression is too complex:P               .external E1, E2F-               .quad E1+5+E2+6  ; too complex I                                                                     2-23e l  0        Components of MACRO-64 Source Statements!        2.8 Terms and ExpressionsLH              Because the assembler has no precedence rules, it attemptsH              to evaluate the above expression as <<<E1+5>+E2>+6>. SinceH              <<E1+5>+E2> is itself a complex term, <<<E1+5>+E2>+6> doesG              not match the above form and is too complex. However, youeE              can regroup the expression using angle brackets (<>) to 1              match the required form as follows:e               .external E1, E2r>               .quad <E1+5>+<E2+6>  ; legal complex expressionG              In this case, both <E1+5> and <E2+6> are simple, external.H              terms. Since none of the terms are complex, the expressionD              matches the correct form and the assembler accepts the!              complex expression. A              Any type of expression can be used in most MACRO-64D              statements, but restrictions are placed on expressions-              used in the following contexts:n!              o  .BASE directive. 5              o  .BLKx storage allocation directives.7;              o  .IF conditional assembly block directives.a1              o  .REPEAT repeat block directives. .              o  Direct assignment statements.H              o  Lexical string operator arguments. For more informationC                 on direct assignment statements, see Section 2.11.nH              See Chapter 5 for descriptions of the directives listed in!              the preceding list.dI              Expressions used in these contexts can contain only symbolsiH              or labels that have been previously defined in the current              module.PB              The .BASE directive accepts expressions that containE              external symbols previously declared with the .EXTERNAL G              directive. The other contexts previously described cannot G              accept expressions that contain external symbols. SymbolsgG              defined later in the current module cannot be used in anye               of these contexts.D              Expressions in the .IF conditional directives, .REPEATA              conditional directives, and lexical string operatoreD              arguments are relocatable. However, expressions in the0              .BLKx directives must be absolute.         2-24 e  I                                 Components of MACRO-64 Source StatementseI                                                2.8 Terms and Expressions A              Note that expressions cannot contain floating-point A              numbers. The floating-point data storage directivesRG              accept constant values. They do not accept floating-pointtE              expressions. For more information on the floating-points5              data storage directives, see Chapter 5. A              The following example shows the use of expressions: I              A = 2*100                 ; 2*100 is an absolute expression L                      .BLKB   A+50      ; A+50 is an absolute expression andI                                        ;   contains no undefined symbols <              LAB:    .BLKW   A         ; LAB is relocatableD              HALF = LAB+<A/2>          ; LAB+<A/2> is a relocatableF                                        ;   expression and contains no=                                        ;   undefined symbolsdL              LAB2:   .BLKB   LAB2-LAB  ; LAB2-LAB is an absolute expressionM                                        ;   and contains no undefined symbolsl5        2.9 Unary Operators for Terms and Expressions C              A unary operator modifies a term or an expression andaB              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 operators I              perform radix conversion and numeric control operations, as G              described in the following sections. Table 2-3 summarizes("              the unary operators.I              Table_2-3_Summary_of_Unary_Operators_______________________               Unary   OperatorI              OperatorName________Example___Operation____________________6I              +       Plus sign   +A        Results in the positive value 1                                            of A.aC              -       Minus sign  -A        Results in the negativeaD                                            (two's complement) value1                                            of A.hI                                                 (continued on next page) I                                                                     2-25e o n0        Components of MACRO-64 Source Statements5        2.9 Unary Operators for Terms and ExpressionsfI              Table_2-3_(Cont.)_Summary_of_Unary_Operators_______________e              Unary   OperatorI              OperatorName________Example___Operation____________________oD              \       Value of    \symbol   Indicates that the valueC                      Escape                of the symbol should be F                                            used. In a string literal,I                                            indicates an escape sequence.d8                                            For example:5                                            "Bob\X0A"iH              ^A or   ASCII       ^A/ABCD/  Specifies an ASCII constant.              ^aH              ^B or   Binary      ^B11000111Specifies that 11000111 is a:              ^b                            binary number.C              ^D or   Decimal     ^D127     Specifies that 127 is a ;              ^d                            decimal number.I              ^O or   Octal       ^O34      Specifies that 34 is an octale3              ^o                            number.nD              ^X or   Hexadecimal ^XFCF9    Specifies that FCF9 is a?              ^x                            hexadecimal number.rI              ^C or   Complement  ^C24      Produces the one's complementcI              ^c____________________________value_of_24_(decimal)._______m%        2.9.1 Radix Control OperatorseF              Radix control operators determine the radix of a term orG              expression. MACRO-64 accepts terms or expressions in foursI              different radixes: binary, decimal, octal, and hexadecimal.l+              The default radix is decimal.               Formats !              ^Bnn ^Dnn ^Onn ^Xnn               nnC              A string of characters that is legal in the specifiedtD              radix. The following are the legal characters for each              radix:         2-26    I                                 Components of MACRO-64 Source Statements I                            2.9 Unary Operators for Terms and Expressions I              ___________________________________________________________eI              Format__Radix_Name__Legal_Characters_______________________ )              ^Bnn    Binary      0 and 1 (              ^Dnn    Decimal     0 to 9(              ^Onn    Octal       0 to 7I              ^Xnn____Hexadecimal_0_to_9_and_A_to_F______________________dC              Radix control operators can be included 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.               For example:<              .WORD   ^B00001101              ; Binary radixG              .WORD   ^D123                   ; Decimal radix (default) ;              .WORD   ^O47                    ; Octal radix: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.i              Format              ^Cterm              termG              Any term or expression. If an expression is specified, it 1              must be enclosed in angle brackets. D              MACRO-64 evaluates the term or expression as an 8-byte,              value before complementing it.              For example:>              .LONG      ^C^XFF      ; Produces FFFFFF00 (hex)=              .LONG      ^C25        ; Produces complement of0:                                     ;   25 (dec) which is7                                     ;   FFFFFFE6 (hex) I                                                                     2-27c V I0        Components of MACRO-64 Source Statements        2.10 Binary Operators         2.10 Binary Operators F              In contrast to unary operators, binary operators specifyB              actions to be performed on two terms or expressions.F              Expressions can be enclosed in angle brackets to specifyF              the order of evaluation. Table 2-4 summarizes the binary              operators.I              Table_2-4_Summary_of_Binary_Operators______________________                   Binary OperatorI              ___OperatoName__________Example_Operation__________________e6                 +      Plus sign     A+B     Addition9                 -      Minus sign    A-B     Subtraction <                 *      Asterisk      A*B     Multiplication6                 /      Slash         A/B     Division>                 @      At sign       A@B     Arithmetic shiftC                 &      Ampersand     A&B     Logical AND (product)t>                 !      Exclamation   A!B     Logical OR (sum)                        pointiI              ___\______Backslash_____A\B_____Logical_XOR_(difference)___m@              All binary operators have equal priority. Terms orD              expressions can be grouped for evaluation by enclosingH              them in angle brackets. The enclosed terms and expressionsI              are evaluated first, and remaining operations are performede.              from left to right. For example:.              .LONG      1+2*3      ; Equals 9.              .LONG      1+<2*3>    ; Equals 7C              Note that a 64-bit result is returned from all binary C              operations. If you use the 64-bit result in a context D              requiring less than 64 bits, only the lower order bitsE              of the result are used. If the truncation causes a lossaH              of significance in a data storage directive, the assembler(              displays an error message.C              The following sections describe the arithmetic shift, F              logical AND, logical inclusive OR, and logical exclusive              OR operators.R         2-28 n I                                 Components of MACRO-64 Source Statements I                                                    2.10 Binary Operators.(        2.10.1 Arithmetic Shift OperatorC              Use the arithmetic shift operator (@) to perform left.G              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 isRI              shifted left and the low-order bits are set to zero. If thenH              second argument is negative, the first argument is shiftedG              right and the high-order bits are set to the value of thesB              original high-order bit (the sign bit). For example:L                      .LONG   ^B101@4              ; Yields 1010000 (binary)H                      .LONG   1@2                  ; Yields 100 (binary)              A = 4oJ                      .LONG   1@A                  ; Yields 10000 (binary)D                      .LONG   ^X1234@-A            ; Yields 123(hex)#        2.10.2 Logical AND OperatoraG              The logical AND operator (&) takes the logical AND of twod$              operands. For example:              A = ^B1010              B = ^B1100D                      .LONG   A&B             ; Yields 1000 (binary),        2.10.3 Logical Inclusive OR OperatorE              The logical inclusive OR operator (!) takes the logicalh8              inclusive OR of two operands. For example:              A = ^B1010              B = ^B1100D                      .LONG   A!B             ; Yields 1110 (binary),        2.10.4 Logical Exclusive OR OperatorE              The logical exclusive OR operator (\) takes the logicale9              exclusive OR of two arguments. For example:o              A = ^B1010              B = ^B1100D                      .LONG   A\B             ; Yields 0110 (binary)I                                                                     2-29n   0        Components of MACRO-64 Source Statements)        2.11 Direct Assignment Statementsa)        2.11 Direct Assignment StatementsrA              A direct assignment statement equates a symbol to aF              specific value. Unlike a symbol that you use as a label,H              you can redefine a symbol defined with a direct assignment2              statement as many times as you want.              Formatsn              symbol=expression                symbol==expression#              symbol=quoted-literalo              symbol$              A user-defined symbol.              expressionG              An expression that does not contain any undefined symbolsnF              or forward references. For more information on terms andE              expressions, see Section 2.8. The result must be eitheruB              an absolute or relocatable value, whose value can beH              determined at the current point in the assembly. This form'              defines a numeric symbol.nE              The format with a single equal sign (=) defines a localmB              symbol, and the format with a double equal sign (==)G              defines a global symbol. For more information about locals4              and global symbols, see Section 2.5.3.A              The following three syntactic rules apply to directx$              assignment statements:B              o  An equal sign (=) or double equal sign (==)  mustE                 separate the symbol from the expression that defineseD                 its value. Spaces preceding or following the directA                 assignment operators have no significance in the !                 resulting value. B              o  Only one symbol can be defined in a single direct&                 assignment statement.H              o  A direct assignment statement can be followed only by a                 comment field.         2-30 i  I                                 Components of MACRO-64 Source Statements I                                        2.11 Direct Assignment StatementsoG              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 1A              B = A@5                 ; The symbol 'B' is equated ;                                      ;   to 1@5 or 32(dec) A              C = 127*10              ; The symbol 'C' is equated6                                      ;   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 lexical I              string symbol. Lexical string symbols can only be used witht'              lexical string operators..C              For more information on lexical string operators, see>              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 ansB              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 setsfC              the current location counter to zero at the beginningrF              of the 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 currenthD              location counter by the number of bytes allocated. ForE              example, the directive, .LONG 0, increments the currentFG              location counter by 4. However, with the exception of theaI              special form described below, a direct assignment statement G              does not increase the current location counter because no "              memory is allocated.I                                                                     2-31o h i0        Components of MACRO-64 Source Statements%        2.12 Current Location CountersC              The current location counter can be explicitly set byeD              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 usefuliF              when defining data structures. Data storage areas shouldI              not be reserved by explicitly setting the location counter;eH              use the .BLKx directives. For more information on the .BLK'              directive, see Chapter 5.i              Format              .=expression              expressionB              An expression that does not contain any undefined orD              external symbols. For more information on expressions,              see Section 2.8.F              In a relocatable program section, the expression must beF              relocatable; that is, the expression must be relative toG              an address in the current program section. It also may benD              relative to the current location counter. For example:>              . = .+40        ; Moves location counter forwardD              When a program section that you defined in the currentF              module is continued, the current location counter is setG              to the last value of the current location counter in thats              program section.E              In a program section with the EXE and NOMIX attributes:B8              o  The location counter cannot be changed.A              o  If optimization is enabled, the location counterH                 represents the location prior to optimization. For more@                 information on optimization, see Section 2.7.1.         2-32   xI                                                                        3 I        _________________________________________________________________ I                                                MACRO-64 Lexical OperatorD              This chapter describes the MACRO-64 lexical operators.-        3.1 Processing with Lexical OperatorsnD              Lexical operator processing is performed on all source@              lines and macro expansion lines prior to any otherF              assembler processing. Thus, macro invocations, assemblerA              directives, and instructions are subject to lexicaloG              operator processing prior to normal assembler processing.dC              Lexical operators are recognized and processed withinrH              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 of E              text that is conditionally excluded with one of the .IF_I              directives. In addition, lexical operator processing is not )              performed within a comment. #        3.2 Lexical Operator Syntax 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 rightH              parentheses. The following example illustrates the lexical              operator syntax:-              .print "%EDIT(<Fred>,<upcase>)"nG              Spaces are allowed between syntax elements in the general I              lexical operator syntax. For example, the following syntax,s+              including spaces, is allowed.r2              .print "%EDIT ( <Fred> , <upcase> )"I                                                                      3-1a   t!        MACRO-64 Lexical Operator #        3.2 Lexical Operator Syntax E              Spaces are also allowed between the opening and closing C              percent signs in a lexical substitution operator. SeeeA              Section 3.4 for information on lexical substitution               operators..              .print "% lexical_symbol_name %"F              Spaces are not allowed between the pair of percent signsG              indicating a lexical escape operator. See Section 3.5 for 6              information on lexical escape operators.I              Lexical operator arguments can be specified in the same way !              as macro arguments: H              o  A numeric symbol name preceded by a backslash (\). ThisF                 construct results in the decimal value of the numeric;                 symbol, as shown in the following example:h                 \N F              o  Any string of characters surrounded by left and rightC                 angle brackets, as shown in the following example:                  <Foo bar thud>aD                 You can nest angle brackets (<>). See the following                 example:o                 <<X+7>*17> C              o  Any string of characters surrounded by a delimitersG                 specified after a caret character (^). You cannot nesta7                 delimiters. See the following example:m                  ^%Foo bar thud%H              o  Any undelimited string of characters not separated by aH                 space, tab, form feed, comma, equal sign, semicolon, or8                 end of line. See the following example:                 A+B+CF              In addition to the formats allowed for a macro argument,A              lexical operator arguments may also be specified ase              follows:E              o  An undelimited string of characters may also containeF                 a string of characters enclosed within left and rightG                 parenthesis. The characters between the left and right I                 parenthesis may contain space, tab, or comma delimiters. +                 See the following example:_         3-2_ d I                                                MACRO-64 Lexical Operator I                                              3.2 Lexical Operator Syntax                  16( R27 )I              o  You can use a lexical operator as an argument to anothertD                 lexical operator as shown in the following 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. G              Each lexical operator accepts a given number of argumentsuD              and each argument has a specific type. There are threeF              different types of arguments: string, integer, and name.C              o  A string argument can be any arbitrary sequence of                 characters.G              o  An integer argument must be an absolute or relocatableiE                 expression that can be resolved at that point in theeF                 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 withincA                 the psect. The offset value is determined before @                 optimization and code alignment, but after data                 alignment. I              o  The name argument type is used only by the %TYPE lexicalF                 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 empty E              string. An empty string is a string with no characters.nC              If you omit an integer argument or specify an illegal G              expression, the default value is zero. The assembler doesiH              not issue diagnostic messages for illegal expressions usedD              as aguments to lexical operators. If you omit the nameF              argument or specify an illegal name to the %TYPE lexical3              operator, %TYPE returns a zero value.kI                                                                      3-3e o h!        MACRO-64 Lexical Operator 6        3.3 Numeric Symbols and Lexical String Symbols6        3.3 Numeric Symbols and Lexical String SymbolsF              Lexical string symbols are similar in concept and syntaxI              to numeric symbols. MACRO-64 supports numeric symbols using #              the following syntax:96              numeric_symbol_name = numeric_expression@              MACRO-64 supports lexical string symbols using the              following syntax:t=              string_symbol_name = "any string of characters" A              The assembler differentiates between numeric symbolsI              assignment and lexical string symbol assignment as follows:tG              o  In a lexical string symbol assignment, a quoted string.:                 literal must appear after the equal sign.I              o  A lexical string symbol value is specified by the quotedc                  string literal.G              Note that the quotes are not included in the value of thetG              lexical string symbol. You cannot use the same name for a =              lexical string symbol, numeric symbol or label.iG              Like numeric symbols, lexical string symbols are assemblypH              time variables. Once you have assigned a string value to aG              lexical string symbol, you can reassign a different valuee2              to the symbol later in the assembly.H              You can use lexical string symbols as arguments to lexicalD              operators. In particular, you can use a lexical stringH              symbol as an argument to the lexical substitution operatorC              (%) or the %STRING lexical operator to substitute thedI              value of the lexical string symbol at any point in the text               of your program.)        3.4 Lexical Substitution Operator H              You can use the lexical substitution operator at any pointF              in your program to cause the assembler to substitute theB              value of a lexical string symbol for the name of theF              symbol. The lexical substitution operator is the percentF              sign (%). Place the lexical substitution operator to theE              left and right of the name of the lexical string symbol 5              that you wish to subsitute, as follows:          3-4  N  I                                                MACRO-64 Lexical OperatorrI                                        3.4 Lexical Substitution Operatora              %lexsym_name%               For example:6                   HORSES    = "All the king's horses"3                   MEN       = "all the king's men" .                   .print "%HORSES% and %MEN%"C              The above example defines two lexical string symbols:hD              HORSES and MEN. The third statement displays a messageF              at assembly time. The text of the message specifies thatD              the value of the HORSES and MEN lexical string symbolsG              be subsituted as indicated. After lexical processing, the)              third statement appears as:tH                   .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 theeH              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 deferslH              the evaluation of the lexical string operator. If you wantE              to defer processing of a lexical substitution operator, G              place two percent signs to the left and two percent signsF=              to the right of the lexical string symbol name.eB              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 thanyE              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 macrorD              argument, but you need to use the value of the lexicalG              string symbol that is current when the macro expands, notfH              when the macro is defined. Example 3-1 shows an example of8              this, though not using an escape operator:I                                                                      3-5c b o!        MACRO-64 Lexical Operatort#        3.5 Lexical Escape OperatorH              Example 3-1 Lexical Processing Without the Escape Operator+                  CODE_PSECT_NAME = "CODE1"rG                  .macro CODE_PSECT PSECT_NAME=%string(CODE_PSECT_NAME)e$                   .psect PSECT_NAME"                  .endm CODE_PSECT                  CODE_PSECT+                  CODE_PSECT_NAME = "CODE2"1                  CODE_PSECTF              Example 3-1 does not process correctly for the following              reasons:E              o  The lexical operator in the .MACRO directive line is H                 processed when the macro is defined, not when the macro                 expands.i@              o  The CODE_PSECT macro always defaults to settingA                 the psect to the CODE1 psect because the default C                 for the PSECT_NAME  argument will be set to CODE1, >                 not %string(CODE_PSECT_NAME). This is becauseE                 %string(CODE_PSECT_NAME) is evaluated when the CODE_n=                 PSECT macro is defined, not when it expands.oF              Example 3-2 is similar to Example 3-1 except it uses the&              lexical escape operator:A              Example 3-2 Lexical Processing With Escape Operatora+                  CODE_PSECT_NAME = "CODE1" H                  .macro CODE_PSECT PSECT_NAME=%%string(CODE_PSECT_NAME)"                 .psect PSECT_NAME"                  .endm CODE_PSECT                  CODE_PSECT+                  CODE_PSECT_NAME = "CODE2"t                  CODE_PSECTH              Example 3-2 processes correctly for the following reasons:I              o  Lexical operator processing of %%string(CODE_PSECT_NAME)oF                 is deferred when the CODE_PSECT macro is defined. TheG                 default value for the PSECT_NAME argument is stored ass*                 %string(CODE_PSECT_NAME).A              o  During macro expansion, %string(CODE_PSECT_NAME)xD                 is evaluated, resulting in the current value of theB                 CODE_PSECT_NAME lexical string symbol as desired.         3-6o d rI                                                MACRO-64 Lexical OperatoruI                                              3.6 Using Lexical Operators#        3.6 Using Lexical Operators H              This section contains a programming example showing sourceH              statements using lexical operators and the same statementsD              after macro expansion and lexical operator processing.1              Example 3-3 Using Lexical OperatorsnD                      ; Macro to load a general or floating register.                      .macro LOAD REG LOCATIONL                          ; 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) 7                              ; base register specified .                              LOC = "LOCATION"                          .elseh;                              ; base register not specifieds6                              LOC = "LOCATION-PD(R27)"                          .endc 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                                                                      3-7    i!        MACRO-64 Lexical Operatori#        3.6 Using Lexical Operatorsn9              Example 3-3 (Cont.) Using Lexical Operatorst                          .else K                              ; Use LDx if a floating register is specified G                              .if ne <%type(REG) & MACRO64$TYPE_FLTREG>I                                  ; Use the appropriate LDx floating load H                                  ; depending on the first letter of the5                                  ; location to load..1                                  FTYPES = "FGST"N                                  .if ge, %locate(%extract(0,1,LOC),FTYPES), -5                                      %length(FTYPES)_.                                      .error -F                       "Unknown floating data type: %extract(0,1,LOC)",                                      .mexit'                                  .endc K                                  LD%extract(0,1,LOCATION) REG,%string(LOC)o#                              .else *                                  .error -N                       "First argument must be a general or floating register"#                              .endcs                          .endc                        .endm LOAD$                      .psect D,noexe?              pd:     .procedure_descriptor my_routine,my_entry ?                      ; Fill in procedure descriptor details...d              BUILD_TIME:o,                      .asciz       "%time()"5              K:      .quad        %repeat(9,<42,>)42o*              GPI:    .g_floating  3.14159-              CIRCLE: .address     FAC_CIRCLE               TX      = 0l              TY      = 8               TRADIUS = 16"                      .psect X,exe              MY_ENTRY:                        LOAD  R1,K%                      LOAD  R2,CIRCLE +                      LOAD  F13,TRADIUS(R2) #                      LOAD  F11,GPI !                      LOAD  F10,Kt                      LOAD  K I                                                 (continued on next page)          3-8e l iI                                                MACRO-64 Lexical Operator I                                              3.6 Using Lexical Operatorse9              Example 3-3 (Cont.) Using Lexical OperatorstI                                                                      3-9     !        MACRO-64 Lexical Operator #        3.6 Using Lexical OperatorsAA              Example 3-4 Source Statements After Macro Expansion $                      .psect D,noexe?              pd:     .procedure_descriptor my_routine,my_entryc?                      ; Fill in procedure descriptor details...o              BUILD_TIME:t9                      .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_CIRCLEo              TX      = 0n              TY      = 8               TRADIUS = 16"                      .psect X,exe              MY_ENTRY:(                      LDQ   R1,K-PD(R27)-                      LDQ   R2,CIRCLE-PD(R27)a+                      LDT   F13,TRADIUS(R2)u)                      LDG F11,GPI-PD(R27)r<                      .error "Unknown floating data type: K"T                      .error "First argument must be a general or floating register"         3-10 f oI                                                MACRO-64 Lexical OperatorsI                                                    3.7 Lexical Operators         3.7 Lexical Operators D              This section describes the MACRO-64 lexical operators,G              their return values, and their arguments. Table 3-1 lists I              the lexicals and gives a brief summary of their function. ArG              decimal return value results in the decimal digits of theaG              numeric value being substituted for the lexical operator.cI              Table_3-1_Summary_of_MACRO-64_Lexicals_____________________                         ReturnI              Lexical___Type______Function_______________________________aC              %EDIT     String    Lexical operator for editing text*                                  strings.D              %ELEMENT  String    Lexical operator for extracting anB                                  element from a list of elements.C              %EXTRACT  String    Lexical operator for extracting anF                                  range of characters from a string of-                                  characters. G              %INTEGER  Decimal   Lexical operator to convert the value F                                  of an expression to a decimal value.F              %LENGTH   Decimal   Lexical operator for determining the5                                  length of a string.xH              %LOCATE   Decimal   Lexical operator for locating a stringD                                  of text within a another string of'                                  text. B              %REPEAT   String    Lexical operator for repeating aE                                  specified string x number of times. D              %STRING   String    Lexical operator for obtaining theC                                  value of a lexical string symbol. I              %TIME     String    Lexical operator for obtaining the date @                                  and time of the assembly unit.@              %TYPE     Decimal   Lexical operator for obtainingI              ____________________information_about_a_name.______________eI                                                                     3-11s   r"        MACRO-64 Lexical Operators        %EDITtI        _________________________________________________________________r        %EDIT 8              Lexical operator for editing text strings.        Format&              %EDIT  (string1,string2)        Arguments               string1nI              The first argument, of type string, specifies the string to               be edited.              string2TF              The second argument, of type string, specifies a list of4              edits to perform, separated by commas.        DescriptioncC              %EDIT is modeled after the OpenVMS DCL F$EDIT lexical D              function. It is used to perform one or more edits on aG              specified string. %EDIT processes the string of argumentsrD              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:cI              ___________________________________________________________I              Element_____Function_______________________________________ 6              COLLAPSE    Removes all tabs and spaces.I              COMPRESS    Replaces multiple tabs and spaces with a single                            space.D              LOWERCASE   Changes uppercase characters to lowercase.G              TRIM        Removes leading and trailing spaces and tabs. I              UPCASE______Changes_lowercase_characters_to_uppercase._____         3-12   bI                                               MACRO-64 Lexical OperatorsgI                                                                    %EDIT         Examples                 Example 1K                     .PRINT "%EDIT(< Fred Smith >, <TRIM,COLLAPSE,UPCASE>)" F                 After lexical processing, the statement apears as the                 following:u'                     .PRINT "FREDSMITH"                 Example 2@                     .PRINT "%EDIT(<AbCdEfG>,<upcase,lowercase>)@                     .PRINT "%EDIT(<AbCdEfG>,<lowercase,upcase>)I                 The first source statement produces the string "abcdefg"aD                 and the second source statement produces the stringA                 "ABCDEFG". Each of the edits in the edit list isr6                 performed in sequence, left to right.I                                                                     3-13t g m"        MACRO-64 Lexical Operators        %ELEMENTI        _________________________________________________________________o        %ELEMENTE              Lexical operator for extracting elements from a list ofd              elements.         Format1              %ELEMENT  (integer,string1,string2)         Argumentsm              integer.H              The first argument, of type integer, is the element number;              to extract. The first element is number zero.i              string1 F              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.        DescriptionsG              %ELEMENT is modeled after OpenVMS DCL's F$ELEMENT lexicaleG              function. It is used to extract one element from a stringtF              of elements. Note that unlike F$ELEMENT, you may specifyE              multiple delimiters. The result is the specified stringsF              element. If the specified element number is greater thanH              the number of elements in the list, the delimiter argument              is returned.        Examples;                     .PRINT "%ELEMENT (2, <+-*/>, JOE+FRED-         TOM*BILL/ERIC)" A              After lexical processing, the statement appears as: !                     .PRINT "TOM"o         3-14   xI                                               MACRO-64 Lexical OperatorshI                                                                 %EXTRACT I        _________________________________________________________________e        %EXTRACTH              Lexical operator for extracting a range of characters from%              a string of characters.e        Format2              %EXTRACT  (integer1,integer2,string)        Argumentsa              integer1I              The first argument, of type integer, is the offset at which G              to begin the extraction. The first character is at offsetn              zero.e              integer2D              The second argument, of type integer, is the number of$              characters to extract.              stringD              The third argument, of type string, is the string from.              which to extract the characters.        DescriptionaI              %EXTRACT is modeled after VAX MACRO's %EXTRACT macro stringtD              operator and OpenVMS DCL's F$EXTRACT lexical function.I              %EXTRACT is used to extract a specified range of charactersp              from a string.        Examples<                     .PRINT "%EXTRACT(3,4,ABCDEFGHIJKLMNOP)"A              After lexical processing, the statement appears as:e"                     .PRINT "DEFG"I                                                                     3-15  d  "        MACRO-64 Lexical Operators        %INTEGERI        _________________________________________________________________a        %INTEGERH              Lexical operator for converting the value of an expression!              to a decimal value.t        Format!              %INTEGER  (integer)         ArgumentsM              integerH              The single argument, of type integer, is the expression to              be converted.n        DescriptioneG              %INTEGER is modeled after OpenVMS DCL's F$INTEGER lexical H              function. It is used to convert the value of an expressionB              to a decimal value. The result is its decimal value.H              %INTEGER can also be used convert a relocatable expression#              to an absolute value.h        Examples2                     .PRINT "%INTEGER (<<X+7>*17>)A              After lexical processing, if X has the value 3, the-(              statement would appear as:!                     .PRINT "170"x         3-16 E pI                                               MACRO-64 Lexical OperatorscI                                                                  %LENGTHcI        _________________________________________________________________        %LENGTHOF              Lexical operator for determining the length of a string.        Format              %LENGTH  (string)g        Argumentsn              stringE              The single argument, of type string, is the string fromp1              which the length is to be computed.c        DescriptionpG              %LENGTH is modeled after VAX MACRO's %LENGTH macro stringC              operator and OpenVMS DCL's F$LENGTH lexical function. F              %LENGTH is used to determine the length of a string. TheG              result is the length of the string expressed as a decimal               number.A        Examples<                     .PRINT "%LENGTH(<The quick brown fox>)"A              After lexical processing, the statement appears as:x                      .PRINT "19"I                                                                     3-17     "        MACRO-64 Lexical Operators        %LOCATESI        _________________________________________________________________         %LOCATEdC              Lexical operator for locating a string of text withinT%              another string of text.E        Format(              %LOCATE  (string1,string2)        Arguments              string1lI              The first argument, of type string, is the string for whiche              %LOCATE searches.               string2 I              The second argument, of type string, is the string in which &              the search is performed.        DescriptionxG              %LOCATE is modeled after VAX MACRO's %LOCATE macro stringgC              operator and OpenVMS DCL's F$LOCATE lexical function.lB              %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.E              The offset to the first character is zero. If the firstcI              string cannot be found within the second string, the lengthg/              of the second string is returned.         Examples<                     .PRINT "%LOCATE (DEF,ABCDEFGHIJKLMNOP)"A              After lexical processing, the statement appears as:l                     .PRINT "3"         3-18 L  I                                               MACRO-64 Lexical OperatorseI                                                                  %REPEATrI        _________________________________________________________________i        %REPEATLA              Lexical operator for repeating a specified string ag(              specified number of times.        Format'              %REPEAT  (integer,string)         Arguments               integerpI              The first argument, of type integer, is the number of times H              to repeat the string. If you specify a negative value, the,              string is repeated zero times.              stringF              The second argument, of type string, is the string to be              repeated.         Description H              %REPEAT is used to repeat the specified string a specified              number of times.        ExamplesL                     .PRINT "Never, %REPEAT (3, <ever, >)touch that button!"A              After lexical processing, the statement appears as: I                     .PRINT "Never, ever, ever, ever, touch that button!" I                                                                     3-19p E &"        MACRO-64 Lexical Operators        %STRING I        _________________________________________________________________e        %STRINGlC              Lexical operator for obtaining the value of a lexical               string symbol.        Format              %STRING  (string)         Argumentsa              stringD              The single argument is of type string. If the argumentD              is the name of lexical string symbol, the value of theH              lexical string symbol is returned. Otherwise, the argument$              is returned unchanged.        Description E              %STRING is modeled after OpenVMS DCL's F$STRING lexical H              function. %STRING is generally used to obtain the value ofI              a lexical string symbol, but it can be used with any stringe              argument. H              The lexical substitution operator described in Section 3.4*              performs a similar function.        Examples2                     FOO = "All the king's horses"*                     .PRINT "%STRING(FOO)"A              After lexical processing, the statement appears as:c3                     .PRINT "All the king's horses"%         3-20   :I                                               MACRO-64 Lexical Operators I                                                                    %TIMEI        _________________________________________________________________         %TIME E              Lexical operator for obtaining the date and time of theD              assembly unit.        Format              %TIME  ()         Description A              %TIME is modeled after OpenVMS DCL's F$TIME lexicaloD              function. %TIME is used to obtain the time and date ofH              the assembly unit. There are no arguments. The result is aG              string specifying the date and time of the assembly unit.         Examples%                     .PRINT "%TIME()"A              After lexical processing, the statement appears as:2                     .PRINT " 8-OCT-1991 13:17:57"I                                                                     3-21r  "        MACRO-64 Lexical Operators        %TYPExI        _________________________________________________________________u        %TYPErF              Lexical operator for obtaining information about a name.        Format              %TYPE  (name)         Arguments               nameA              The single argument is of type name. Information is2@              returned about the name specified in the argument.        DescriptionLA              %TYPE is modeled after OpenVMS DCL's F$TYPE lexical C              function. %TYPE is used to obtain information about aYF              name. The value returned is a numeric value with certainE              bit positions, either zero or one, depending on whetheruD              the specified name has the corresponding attribute. AsC              described elsewhere, he decimal digits of the numericiC              value are substituted for the %TYPE lexical operator.D              Table 3-2 shows the symbolic names that are predefined!              for each attribute: I              Table_3-2_%TYPE_Attributes_________________________________ I              Symbolic_Name______________Attribute_______________________ G              MACRO64$TYPE_SYMBOL        Name is a numeric symbol name.iG              MACRO64$TYPE_PROC_DESC     Name is a procedure descriptore.                                         name.9              MACRO64$TYPE_LABEL         Name is a label.iB              MACRO64$TYPE_EXTERN        Name is an external name.=              MACRO64$TYPE_WEAK          Name is a weak name.O9              MACRO64$TYPE_PSECT         Name is a psect. >              MACRO64$TYPE_MACRO         Name is a macro name.I                                                 (continued on next page)i         3-22    I                                               MACRO-64 Lexical OperatorstI                                                                    %TYPE I              Table_3-2_(Cont.)_%TYPE_Attributes_________________________nI              Symbolic_Name______________Attribute_______________________H              MACRO64$TYPE_STRING        Name is a lexical string symbol.                                         name.;              MACRO64$TYPE_OPCODE        Name is an opcode. =              MACRO64$TYPE_DIR           Name is a directive.dD              MACRO64$TYPE_GENREG        Name is a general register.I              MACRO64$TYPE_FLTREG________Name_is_a_floating_register.____ E              A given name may have zero, one, or several attributes.         Examples%                     .macro IS_GR ARG D                       .IF equal, %TYPE(ARG) & <MACRO64$TYPE_GENREG>>                        .PRINT "ARG is not a general register"                       .ENDC                      .endm IS_GR                     IS_GR F11I              Initially, the first line of the IS_GR macro expands as thet              following:B                     .IF equal, <%TYPE(F11) & MACRO64$TYPE_GENREG>A              After lexical processing, the statement appears as: <                     .IF equal, <8192 & MACRO64$TYPE_GENREG>I              In this example, 8192 is the attribute value for a floating C              point register. This value could change in subsequentII              releases. Use only the predefined attribute masks described_F              in Table 3-2. Since the attribute for a general registerF              MACRO64$TYPE_GENREG is 4096, the expression evaluates as              zero. 1                     <8192 & MACRO64$TYPE_GENREG>rI                                                                     3-23     I                                                                        4 I        _________________________________________________________________ I                                                          Macro Arguments G              By using macros, you can use a single source statement toeD              insert a sequence of source statements into a program.F              A macro definition contains the source statements of theD              macro. The macro definition may have formal arguments.H              These formal arguments can be used throughout the sequenceH              of source statements within the definition. When the macroH              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 of H              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 oftF              formal arguments in the macro definition with the actualD              arguments specified in the macro call. This process is)              called the macro expansion. A              By default, macro expansions are not printed in theG              assembly listing. To print the macro expansions, you mustEH              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 argument and qualifier.A              Use .SHOW with a symbolic argument of EXPANSIONS inuD              the source text of a program to specify the listing of              expansions.oC              MACRO-64 provides specific directives for controllingeG              macro execution. For information on these directives, see              Table 5-2.I              The remainder of this chapter describes macro arguments and '              created temporary labels.RI                                                                      4-1_ _ _        Macro Arguments_!        4.1 Using Macro Arguments !        4.1 Using Macro ArgumentsmD              Macros have two types of arguments: actual and formal.I              Actual arguments are the text given in the macro call after F              the name of the macro. Formal arguments are specified byI              name in the macro definition; that is, after the macro name F              in the .MACRO directive. Actual arguments in macro callsH              and formal arguments in macro definitions can be separated-              by commas (,), tabs, or spaces. E              The number of actual arguments in the macro call can benE              less than or equal to the number of formal arguments in H              the macro definition. If the number of actual arguments isH              greater than the number of formal arguments, the assembler(              displays an error message.D              Formal and actual arguments normally maintain a strictI              positional relationship. That is, the first actual argument C              in a macro call replaces all occurrences of the first B              formal argument in the macro definition. This strictE              positional relationship can be overridden by the use of F              keyword arguments. For more information on using keyword)              arguments, see Section 4.3. E              An example of a macro definition using formal argumentsa              follows:+              .MACRO  STORE  ARG1,ARG2,ARG3 G              .LONG   ARG1                     ; ARG1 is first argument_G              .WORD   ARG3                     ; ARG3 is third argumenttH              .BYTE   ARG2                     ; ARG2 is second argument              .ENDM   STORE@              The following two examples show possible calls and9              expansions of the macro previously defined:r;              STORE   3,2,1                    ; Macro call D              .LONG   3                        ; 3 is first argumentD              .WORD   1                        ; 1 is third argumentE              .BYTE   2                        ; 2 is second argumentc;              STORE   X,X-Y,Z                  ; Macro callfD              .LONG   X                        ; X is first argumentD              .WORD   Z                        ; Z is third argumentG              .BYTE   X-Y                      ; X-Y is second argumente         4-2T T xI                                                          Macro ArgumentsaI                                                 4.2 Using Default Values          4.2 Using Default ValuesE              Default values are values that are defined in the macro B              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 as              follows:2              formal-argument-name = default-valueH              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: =              STORE                   ; No arguments suppliedt              .LONG   12              .WORD   1000              .BYTE   0eC              STORE   ,5,X            ; Last two arguments suppliedu              .LONG   12              .WORD   X               .BYTE   5?              STORE   1               ; First argument supplied7              .LONG   1               .WORD   1000              .BYTE   0 #        4.3 Using Keyword Arguments A              Keyword arguments allow a macro call to specify the6G              arguments in any order. In this case, the macro call musteG              specify the same formal argument names that appear in the I              macro definition. Keyword arguments are useful when a macro_H              definition has more formal arguments than necessary in the              call.eI                                                                      4-3            Macro Argumentsi#        4.3 Using Keyword Arguments,G              In any one macro call, it is good practice to specify the I              arguments as either all positional arguments or all keywordrD              arguments. For example, the following macro definition(              specifies three arguments:,              .MACRO  STORE   ARG1,ARG2,ARG3              .LONG   ARG1              .WORD   ARG3              .BYTE   ARG2              .ENDM   STOREAC              The following macro call specifies keyword arguments: 3              STORE   ARG3=27+5/4,ARG2=5,ARG1=SYMBL               .LONG   SYMBL              .WORD   27+5/4              .BYTE   5G              Because the keywords are specified in the macro call, the3H              arguments in the macro call need not be given in the order7              they were listed in the macro definition._E              Positional and keyword arguments may be mixed. Usually,rG              positional arguments are placed before keyword arguments:e3              .MACRO  STORE   ARG1,ARG2,ARG3=27+5/4g              .LONG   ARG1              .BYTE   ARG2              .WORD   27+5/4              .ENDM   STOREeF                ________________________ Note ________________________A                Keyword arguments are not counted when positionalgE                arguments are parsed. This means that when positionaloA                and keyword arguments are used in the same macro,cC                one argument can be specified twice. The last value 3                specified for the argument is used.nF                ______________________________________________________         4-4     I                                                          Macro ArgumentsfI                                               4.4 Using String Argumentsn"        4.4 Using String ArgumentsE              If an actual argument is a string containing charactersxD              that the assembler interprets as separators (such as aC              tab, space, or comma), the string must be enclosed bylC              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.9              The assembler also interprets any character_F              (except A, B, C, D, O, or X) after an initial circumflexG              (^) as a delimiter. Note that ^B, ^D, ^O, and ^X are usedI              as radix control operators rather than argument delimiters.uD              ^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.zF              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 is '              preceded by a circumflex. 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 contains E              separator characters is not enclosed by delimiters, themH              assembler interprets it as successive actual arguments and=              associates it with successive formal arguments.nH              For example, the following macro definition has one formal              argument:f'              .MACRO DOUBLE_ASCII STRNGs              .ASCII  "STRNG"e              .ASCII  "STRNG"n"              .ENDM   DOUBLE_ASCIII                                                                      4-5             Macro Argumentsu"        4.4 Using String ArgumentsH              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"l!              .ASCII  "A B C D E"%              DOUBLE_ASCII  A B C D EsE              %MACRO64-E-TOOMNYARGS, Too many arguments in macro callfI              Note that the assembler interprets the second macro call asRI              having five actual arguments instead of one actual argument               with spaces.B              When a macro is called, the assembler removes normalG              delimiters around a string before associating it with the_G              formal arguments. However, a quoted literal within double H              quotes is treated as a single token and retains its double              quote delimiters.F              If a string contains a semicolon (;), the string must beG              enclosed by delimiters, otherwise the semicolon will mark D              the start of the comment field. Further, if the stringG              contains a semicolon, you cannot continue the line unless -              the string is a quoted literal.a?              Macro invocations can be nested, that is, a macro%H              definition can contain a call to another macro. If, withinG              a macro definition, another macro is called and is passedF              a string argument, you must delimit the argument so thatD              the entire string is passed to the second macro as one              argument.C              The following macro definition contains a call to the_1              DOUBLE_ASCII macro defined earlier:p6                      .MACRO   CNTDA LAB1,LAB2,STR_ARGJ              LAB1:   .BYTE    LAB2-LAB1-1            ; Length of 2*stringO                      DOUBLE_ASCII   <STR_ARG>        ; Call DOUBLE_ASCII macro               LAB2:t$                      .ENDM    CNTDAC              Note that the argument in the call to DOUBLE_ASCII isDH              enclosed in angle brackets even though it does not containF              any separator characters. The argument is thus delimitedF              because it is a formal argument in the definition of theF              macro CNTDA and will be replaced with an actual argument4              that may contain separator characters.         4-6o h uI                                                          Macro Arguments I                                               4.4 Using String Arguments H              The following example calls the macro CNTDA, which in turn+              calls the macro DOUBLE_ASCII:b.              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_DEF +                      .endm OUTER_MACRO_DEF @              You can use this capability to define a macro that              redefines itself:_"                      .macro SETUP                           A = 75                           B = 92                           C = 87                          D = 0 !                          E = -12                           F = 42&                          .macro SETUP:                              ; Setup is done - do nothing%                          .endm SETUPm!                      .endm SETUP B              In this example, the SETUP macro defines a number ofI              assembly constants. After the SETUP macro has been expanded H              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 onlyC              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 expanding H              (as would be the case with the SETUP macro above), the newG              definition is immediately associated with the macro name.EI                                                                      4-7f t          Macro Arguments "        4.4 Using String ArgumentsG              However, the old definition is retained until all pending_G              expansions complete normally. When all pending expansionsF              complete, the old version of the macro is deleted. Thus,G              the SETUP macro may be invoked any number of times in therH              assembly unit. Since the first expansion redefines itself,G              the expansion of the SETUP macro has no effect other than +              the first time it is invoked. I              Another way to pass string arguments in nested macros is to >              enclose the macro argument in nested delimiters.F                ________________________ NOTE ________________________C                Each time you use the delimited argument in a macrogA                call, the assembler removes the outermost pair ofe@                delimiters before associating it with the formalC                argument. This method is not recommended because ituD                requires that you know how deeply a macro is nested.F                ______________________________________________________H              The following macro definition also contains a call to the!              DOUBLE_ASCII macro:g5                     .MACRO  CNTDA2 LAB1,LAB2,STR_ARGrI              LAB1:  .BYTE   LAB2-LAB1-1             ; Length of 2*stringcN                     DOUBLE_ASCII  STR_ARG           ; Call DOUBLE_ASCII macro              LAB2:e#                     .ENDM   CNTDA2iG              Note that the argument in the call to DOUBLE_ASCII is notg)              enclosed in angle brackets.u;              The following example calls the macro CNTDA2:r>                     CNTDA2 BEG,TERM,<<MIND YOUR P'S AND Q'S>>I              BEG:   .BYTE   TERM-BEG-1              ; Length of 2*stringeT                     DOUBLE_ASCII  <MIND YOUR P'S AND Q'S> ; Call DOUBLE_ASCII macro4                     .ASCII  "MIND YOUR P'S AND Q'S"4                     .ASCII  "MIND YOUR P'S AND Q'S"              TERM: I              Note that even though the call to DOUBLE_ASCII in the macro G              definition is not enclosed in delimiters, the call in theaG              expansion is enclosed because the call to CNTDA2 containsp;              nested delimiters around the string argument.         4-8  R 4I                                                          Macro ArgumentsrI                                               4.5 Argument Concatenation "        4.5 Argument ConcatenationF              The argument concatenation operator, the apostrophe ('),I              concatenates a macro argument with constant text or another_I              argument. Apostrophes can either precede or follow a formal0              argument name in the macro source.C              If an apostrophe precedes the argument name, the text C              before the apostrophe is concatenated with the actual G              argument when the macro is expanded. For example, if ARG1 F              is a formal argument associated with the actual argument=              TEST, then ABCDE'ARG1 is expanded to ABCDETEST.lD              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 formal H              arguments with two successive apostrophes. Two apostrophesI              are needed because each concatenation operation discards ant,              apostrophe from the expansion.F              An example of a macro definition that uses concatenation              follows:)                      .MACRO CONCAT   A,B               A''B:   .WORD 0f"                      .ENDM CONCAT@              Note that two successive apostrophes are used when=              concatenating the two formal arguments A and B. ?              An example of a macro call and expansion follows:e!                      CONCAT  X,Yr              XY:     .WORD 0:-        4.6 Passing Numeric Values of SymbolsH              When a symbol is specified as an actual argument, the nameD              of the symbol, not the numeric value of the symbol, isH              passed to the macro. The value of the symbol can be passedI              by inserting a backslash (\) before the symbol in the macrosH              call. The assembler passes the characters representing theG              decimal value of the symbol to the macro. For example, ifG              the symbol COUNT has a value of 2 and the actual argument I                                                                      4-9  B          Macro Argumentsi-        4.6 Passing Numeric Values of Symbols-G              specified is \COUNT, the assembler passes the string 2 to H              the macro; it does not pass the name of the symbol, COUNT.I              Passing numeric values of symbols is especially useful withiH              the apostrophe (') concatenation operator for creating new              symbols.I              An example of a macro definition for passing numeric values4!              of symbols follows: #                      .MACRO WORD n               WORD'n: .WORD nh                       .ENDM WORDG              The following example shows a possible call and expansion .              of the macro previously defined:6                     X = 1       ; Start counting at 1                     WORD \X              WORD1: .WORD 1*        4.7 Using Created Temporary LabelsH              Temporary labels are often very useful in macros. AlthoughH              you can create a macro definition that specifies temporary?              labels within it, these temporary labels might beTI              duplicated elsewhere in the temporary label block, possibly I              causing errors. However, the assembler can create temporaryiG              labels in the macro expansion that will not conflict withsE              other temporary labels. These labels are called created               temporary labels. C              Created temporary labels range from 30000$ to 65535$.LD              Each time the assembler creates a new temporary label,D              it increments the numeric part of the label name by 1.I              Consequently, no user-defined temporary labels should be in ,              the range of 30000$ to 65535$.G              A created temporary label is specified by a question markuF              (?) in front of the formal argument name. When the macroF              is expanded, the assembler creates a new temporary labelC              if the corresponding actual argument is blank. If the G              corresponding actual argument is specified, the assembler F              substitutes the actual argument for the formal argument.         4-10  I                                                          Macro Arguments I                                       4.7 Using Created Temporary Labels F              The following example is a macro definition specifying a&              created temporary label:6                      .MACRO  POSITIVE        ARG1,?L1%                      BGE     ARG1,L1 '                      NEGQ    ARG1,ARG11&              L1:    .ENDM    POSITIVEC              The following three calls and expansions of the macrolI              defined previously show both created temporary labels and a3+              user-defined temporary label:N"                      POSITIVE  R0'                      BGE     R0,30000$ #                      NEGQ    R0,R0d              30000$:3"                      POSITIVE  R5'                      BGE     R5,30001$ #                      NEGQ    R5,R5r              30001$: &                      POSITIVE  R7,10$$                      BGE     R7,10$#                      NEGQ    R7,R7e              10$:H              For more information on temporary labels, see Section 2.6.I                                                                     4-11    _I                                                                        5oI        _________________________________________________________________sI                                            MACRO-64 Assembler Directives ?              MACRO-64 directives enable you to control certaineE              aspects of the assembly process. This chapter describes A              the MACRO-64 assembler directives. It describes the_E              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. %        5.1 Program Sections (Psects)tF              MACRO-64 allows you to divide your program into sectionsI              called psects using the .PSECT directive. Psects are usefullI              for organizing your program, and for low-level control overrE              the linking process. More importantly, each psect falls9              into one of the following three categories:dG              o  CODE psects can contain only instructions. It containsrH                 no data. Psects in this category have the EXE and NOMIX"                 psect attributes.B              o  DATA psects can contain only data. It contains noE                 instructions. Psects in this category have the NOEXE &                 and NOMIX attributes.B              o  MIXED psects can contain instructions or data, orF                 both. Psects in this category have the MIX attribute.C                 In addition, they may have either the EXE or NOEXEs                 attribute.:2              MACRO-64 categorizes psects because:I              o  There is a significant performance compromise associated F                 with mixing instructions and data in the same programC                 section within the Alpha AXP architecture. This isnG                 because the Alpha AXP architecture typically maintainshB                 separate memory caches for instructions and data.I                                                                      5-1d b  %        MACRO-64 Assembler Directivesn%        5.1 Program Sections (Psects)D              o  If you mix instructions and data, it is likely thatG                 instructions will migrate into the data cache and that I                 data will migrate into the instruction cache. While this E                 situation still yields correct results, the benefits C                 of the instruction and data caches are diminished. E                 Placing data in the instruction stream can also have H                 detrimental effects on the instruction pipeline and theH                 multiple instruction-issue capabilities that most Alpha$                 AXP systems employ.I              Since a code psect can contain only instructions and cannotaF              contain arbitrary data, instructions you place in a CODEE              psect can be analyzed by the assembler optimizer and by D              the symbolic debugger. Since a mixed psect can containF              arbitrary data as well as instructions, instructions youF              place in a mixed psect are not analyzed by the assemblerA              optimizer or by the symbolic debugger. Instead, theaI              assembler internally converts instructions in a mixed psectf3              to an equivalent data representation.I              Because of the compromises associated with mixed psects, bybG              default the assembler creates psects with the NOMIX psectiF              attribute. If you need to place data in a psect that hasH              the EXE attribute, or if you need to place instructions inI              a psect that has the NOEXE attribute, you must also specifyaD              the MIX attribute in the psect's definition. Note thatG              unlike the other psect attributs, the MIX psect attributehI              is an assembly-time attribute. The MIX psect attribute doessG              not appear in the psect definitions in your object modulei9              and it does not affect the linking process. C              All assembler directives and instructions can be usedaF              within mixed psects. While many assembler directives canD              be used within both code and data psects, data storageG              directives cannot be used in code psects and instructionssB              and instruction storage directives cannot be used inC              data psects. If you place instructions or instruction F              storage directives in a data psect, or if you place dataH              storage directives in a code psect, the assembler issues aH              diagnostic message. Section 5.3 indicates the applicibilty<              of each directive within code and data psects.         5-2    DI                                            MACRO-64 Assembler DirectivesDI                                            5.1 Program Sections (Psects)B              In summary, code psects may contain only storage forI              instructions and storage created by instruction directives. B              Data psects may contain only storage created by dataE              directives. Mixed psects may contain either storage forhE              instructions or data or both. There are no restrictionsaF              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 moreB              infomation on the .PSECT directive, see Section 5.3.$        5.2 Automatic Data AlignmentE              The assembler can optionally align your data on naturalnD              boundaries. While disabled by default, this feature isE              enabled with the /ALIGNMENT=data command line qualifier F              or the .ENABLE ALIGN_DATA directive (see Section 1.2 andC              Section 5.3. A natural boundary is an address that iscH              evenly divisibly by the size of the scalar data type beingI              accessed. The MACRO-64 automatic data alignment feature can_H              automatically align word, longword, quadword, and octawordE              data to a natural boundary. Accessing data on a naturaltD              boundary can be significantly faster than an unalignedG              access. For more information on accessing data on aligned G              and unaligned boundaries, refer to the Alpha Architecture              Reference Manual.C              When the MACRO-64 automatic data alignment feature is B              enabled, the assembler automatically aligns all dataB              storage directives to a natural boundary. To acheiveH              alignment, the assembler pads with zero bytes as necessaryE              prior to allocating the storage for the data directive. A              Labels that occur before the data storage directivenE              are defined to be the address of the data storage after E              alignment. For more information, see Section 2.7.1. ThenG              directive descriptions in Section 5.3 indicate those datamD              storage directives that are affected by automatic data              alignment.I                                                                      5-3, e w%        MACRO-64 Assembler Directiveso        5.3 Directives        5.3 DirectivesE              The general assembler directives provide facilities for I              performing eleven types of functions. Table 5-1 lists these F              types of functions and their directives. Some directivesE              are only applicable within data psects (psects with the D              NOEXE and NOMIX attributes). Other directives are onlyD              applicable within code psects (psects with the EXE andE              NOMIX attributes). All directives are applicable within H              psects which contain either data and code, or both (psectsA              with the MIX attribute). For information on the MIX F              assembly-time psect and any associated restrictions, seeF              the description of the .PSECT directive in this chapter.F              Table 5-1 shows how each directive can be applied within"              data or code psects.I              Table_5-1_Summary_of_General_Assembler_Directives__________I              Category____________Directives[1]_________Psect_Application ;              Listing control     .TITLE                All 4              directives          .SUBTITLE (.SBTTL)(                                  .IDENT'                                  .LIST(                                  .NLIST'                                  .SHOW )                                  .NOSHOW '                                  .PAGE;              Message display     .PRINT                Allf'              directives          .WARNS(                                  .ERROR;              Assembler option    .ENABLE (.ENABL)      AllA3              directives          .DISABLE (.DSABL)lI              [1]The_alternate_form,_if_any,_is_given_in_parentheses.____ I                                                 (continued on next page)          5-4  R SI                                            MACRO-64 Assembler DirectivesrI                                                           5.3 DirectivesBI              Table_5-1_(Cont.)_Summary_of_General_Assembler_Directives__ I              Category____________Directives[1]_________Psect_Application F              Data storage        .BYTE                 NOEXE (or MIX)'              directives          .WORDi.                                  .SIGNED_BYTE.                                  .SIGNED_WORD'                                  .LONGt*                                  .ADDRESS/                                  .CODE_ADDRESS 5                                  .LOCAL_CODE_ADDRESS '                                  .OCTAc'                                  .QUADa(                                  .ASCII(                                  .ASCIC(                                  .ASCID(                                  .ASCIZ6                                  .F_FLOATING (.FLOAT)-                                  .D_FLOATINGm+                                  (.DOUBLE)e-                                  .G_FLOATING -                                  .S_FLOATINGh-                                  .T_FLOATINGaD                                  .INSTRUCTION          EXE (or MIX);              Location control    .ALIGN                Alln.              directives          .BEGIN_EXACT,                                  .END_EXACTI              [1]The_alternate_form,_if_any,_is_given_in_parentheses.____ I                                                 (continued on next page)oI                                                                      5-5e e o%        MACRO-64 Assembler Directives         5.3 DirectivesI              Table_5-1_(Cont.)_Summary_of_General_Assembler_Directives__ I              Category____________Directives[1]_________Psect_ApplicationsF                                                        NOEXE (or MIX)'                                  .EVEN &                                  .ODD'                                  .BLKA '                                  .BLKBt'                                  .BLKDh'                                  .BLKFo'                                  .BLKG '                                  .BLKLf'                                  .BLKO '                                  .BLKQ '                                  .BLKSl'                                  .BLKTi'                                  .BLKW ;              Program sectioning  .PSECT                Alls5              directives          .SAVE_PSECT (.SAVE)y0                                  .RESTORE_PSECT,                                  (.RESTORE);              Symbol control      .EXTERNAL (.EXTRN)    Alln'              directives          .WEAKt;              Conditional         .IF                   Allb2              assembly block      .IF_FALSE (.IFF)'              directives          .ENDC '                                  .ELSE 1                                  .IF_TRUE (.IFT)n0                                  .IF_TRUE_FALSE)                                  (.IFTF) &                                  .IIF;              Source inclusion    .INCLUDE              All I              [1]The_alternate_form,_if_any,_is_given_in_parentheses.____hI                                                 (continued on next page)l         5-6n a eI                                            MACRO-64 Assembler DirectivesoI                                                           5.3 DirectiveshI              Table_5-1_(Cont.)_Summary_of_General_Assembler_Directives__ I              Category____________Directives[1]_________Psect_Application:;              Linkage control     .BASE                 All ;                                  .END                  All F                                  .LINKAGE_PAIR         NOEXE (or MIX)F                                  .LOCAL_LINKAGE_PAIR   NOEXE (or MIX)-                                  .PROCEDURE_ ,                                  DESCRIPTOR3                                  .LOCAL_PROCEDURE_iI              [1]The_alternate_form,SifIany,_is_given_in_parentheses.____eI              ___________________________________________________________aI              The macro directives provide facilities for performing fivesG              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______________________qE                                                   Application in EXE I              Category_________Directives[1]_______or_NOEXE_Psects_______e6              Macro            .MACRO              All$              definition       .ENDM'              directives       .LIBRARYl%                               .MCALL 6              Macro deletion   .MDELETE            All              directives6              Macro exit       .MEXIT              All              directive 6              Repeat block     .REPEAT (.REPT)     All#              directives       .IRP $                               .IRPC$                               .ENDR6              Counting         .NARG               All$              directive        .NCHRI              [1]The_alternate_form,_if_any,_is_given_in_parentheses.____ I              ___________________________________________________________GF              The remainder of this chapter describes both the generalD              assembler directives and the macro directives, showingF              their formats and giving examples of their use. For easeI                                                                      5-7    %        MACRO-64 Assembler Directives         5.3 DirectivesH              of reference, the directives are presented in alphabetical              order.         5-8$   I                                                     Assembler Directives I                                                                 .ADDRESSeI        _________________________________________________________________        .ADDRESS'              Address storage directive         Format$              .ADDRESS  address-list        Parameters              address-listH              A list of symbols or expressions, separated by commas (,),5              which MACRO-64 interprets as addresses.         DescriptionDG              .ADDRESS stores successive quadwords (8 bytes) containingtI              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.l        Notes E              o  This directive can only be used 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 directive G                 aligns the current (64-bit) boundary before allocating                  storage.gF              o  You can define a 32-bit address item using macros and2                 the .LONG directive. For example:'                 .macro address_32 item                     .long itemn!                 .endm address_32a        Examples                .ADDRESS A,B,CI                                                                      5-9  T s        Assembler Directives        .ALIGNI        _________________________________________________________________         .ALIGN2              Location counter alignment directive        Format/              .ALIGN  integer [,fill-specifier]h/              .ALIGN  keyword [,fill-specifier]n        Parameters              integer E              An integer in the range 0 to 9. The location counter isaH              aligned at an address that is the value of 2 raised to the#              power of the integer.g              keyword G              One of five keywords that specify the alignment boundary.uG              The location counter is aligned to an address that is thel4              next multiple of the following values:I              ___________________________________________________________ I              Keyword___Size_(in_Bytes)__________________________________i              BYTE      20= 1s              WORD      21= 2I              LONG      22= 4i              QUAD      23= 8               OCTA      24= 16I              ___________________________________________________________t              [,fill-specifier] F              Any expression that resolves to an assembly time integerI              value containing no forward references. The filling is doneP4              per byte, regardless of the alignment.        Descriptione@              .ALIGN aligns the location counter to the boundary:              specified by either an integer or a keyword.         5-10 s sI                                                     Assembler DirectivesnI                                                                   .ALIGNE        Notes I              o  If .ALIGN is specified in a psect with the EXE and NOMIXcI                 attributes, the fill specifier is ignored. The assembler H                 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 boundaryeI                 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 B                 the alignment of the program section in which theH                 alignment is attempted (see the description of .PSECT).G                 For example, if you are using the BYTE program sectioneG                 alignment and you specify .ALIGN with a word or largereD                 alignment, the assembler displays an error message.        Examples                 Example 15                   .PSECT A,QUAD  ; Begin at quadword 0                B::.BYTE 4        ; Data is byte0                   .ALIGN QUAD    ; Next data is9                C::.WORD 6        ; also quadword alignedo                 Example 2*                   .PSECT A,EXE,NOMIX,OCTA,                L1::TRAPB:        ; offset 0;                   .ALIGN OCTA    ; NOP padding bytes 4..15g.                    TRAPB:         ; offset 16I                                                                     5-11  -         Assembler Directives        .ALIGN                 Example 3,                   .PSECT A,NOEXE,NOMIX,OCTA4                L1:.WORD 5        ; byte offset 0..1@                   .ALIGN QUAD,2  ; fill specifier initial value7                                  ; of 2 for bytes 2..7s5                   .WORD 6        ; byte offsets 8..9c         5-12    I                                                     Assembler DirectiveseI                                                                   .ASCICbI        _________________________________________________________________e        .ASCIC4              Counted ASCII string storage directive        Format$              .ASCIC  quoted-literal        Parameters              quoted-literal;              An ASCII string delimited with double quotes.o        DescriptionuF              .ASCIC performs the same function as .ASCII, except thatE              .ASCIC inserts a count byte before the string data. TheaH              count byte contains the length of the string in bytes. TheI              length given includes any bytes of non-printable charactersSF              specified using the backslash (\) operator, but excludesI              the count byte. See Section 2.4 for a description of how to &              specify quoted literals.@              .ASCIC is useful in copying text because the count<              indicates the length of the text to be copied.        NotesaE              o  This directive can only be used within data or mixedbA                 psects (psects that have either the NOEXE or MIX D                 attributes). For more information, see Section 5.1.B              o  This directive also accepts VAX MACRO syntax. SeeC                 VAX MACRO and Instruction Set Reference Manual forn                 details.         ExamplesC                .ASCIC "MY STRING"  ; In the listing, this becomes:t-                                    ; .BYTE 9 8                                    ; .ASCII \MY STRING\I                                                                     5-13             Assembler Directives        .ASCIDI        _________________________________________________________________         .ASCID>              String-descriptor ASCII string storage directive        Format$              .ASCID  quoted-literal        Parameters              quoted-literalC              A ASCII string delimited with double quotes. For more @              information on how to specify quoted literals, see              Section 2.4.        Description H              .ASCID performs the same function as the .ASCII directive,C              except that .ASCID inserts a string descriptor beforeeD              the string data. The descriptor format is identical toF              that defined for OpenVMS AXP and OpenVMS VAX. The string2              descriptor has the following format:6                        +---------------+------------+6                        |  Information  |   Length   |6                        +---------------+------------+6                        |          Pointer           |6                        +----------------------------+        Notes >              o  The string-length field is two bytes in size.B              o  Descriptor information (2 bytes) is always set to                 ^X010E.E              o  Position-independent 32-bit pointer to the string (4aG                 bytes). String descriptors are used in calling certain!                 system routines.GF              o  If natural alignment is enabled (using .ENABLE ALIGN_G                 DATA), the descriptor is quadword aligned. This allowsoH                 you to access the entire descriptor (2 data words and a;                 longword address) on a quadword alignment.          5-14    I                                                     Assembler Directives I                                                                   .ASCID E              o  This directive can only be used within data or mixed A                 psects (psects that have either the NOEXE or MIX D                 attributes). For more information, see Section 5.1.B              o  This directive also accepts VAX MACRO syntax. SeeC                 VAX MACRO and Instruction Set Reference Manual forn                 details.         Examples                 Example 1M                .DESCR1:   .ASCID "ARGUMENT FOR CALL"     ; String descriptor                  Example 2U                .DESCR2:   .ASCID "SECOND ARGUMENT"       ; Another string descriptorBI                                                                     5-15_ _ _        Assembler Directives        .ASCIII        _________________________________________________________________R        .ASCII,              ASCII string storage directive        Format$              .ASCII  quoted-literal        Parameters              quoted-literal;              An ASCII string delimited with double quotes.         Description D              .ASCII stores the ASCII value of each character in theF              ASCII string or the value of each byte expression in theG              next available byte. See Section 2.4 for a description of -              how to specify quoted literals.         Notes E              o  This directive can only be used within data or mixed A                 psects (psects that have either the NOEXE or MIXED                 attributes). For more information, see Section 5.1.B              o  This directive also accepts VAX MACRO syntax. SeeC                 VAX MACRO and Instruction Set Reference Manual for                  details.o        Examples"                .ASCII "MY STRING"         5-16    I                                                     Assembler Directives_I                                                                   .ASCIZ I        _________________________________________________________________         .ASCIZ<              Zero-terminated ASCII string storage directive        Format$              .ASCIZ  quoted-literal        Parameters              quoted-literal;              An ASCII string delimited with double quotes.t        DescriptionpF              .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  This directive can only be used within data or mixed A                 psects (psects that have either the NOEXE or MIXD                 attributes). For more information, see Section 5.1.B              o  This directive also accepts VAX MACRO syntax. SeeC                 VAX MACRO and Instruction Set Reference Manual forR                 details.c        Examples5                .ASCIZ "MY STRING"    ; Equivalent toA?                                      ; .ASCII "MY STRING \x00"bI                                                                     5-17  D         Assembler Directives        .BASE I        __________________________________________________________________        .BASE %              Base register directive         Format*              .BASE  Rn [,base_expression]        Parameters              RnD              One of the base registers, R0 through R30, FP, and SP.              base_expression H              The base address, which is optional, and can be one of the              following:'              o  An absolute expressionr)              o  A relocatable expression '              o  An external expressionB              An expression must not contain forward references orG              implicit external symbols. An implicitly defined external_B              symbol is a symbol that the assembler defaults to anH              external symbol. This occurs when the assembler encountersI              references to a symbol, but does not encounter a definition H              for the symbol or an .EXTERNAL directive that declares the              symbol.         Description F              The .BASE directive is used to inform the assembler thatA              a specified base register contains a specified baseiF              address. Later in your program, the assembler allows youG              to implicitly reference the specified base register. WheniH              the assembler knows which base addresses are stored in oneH              or more base registers, it can convert an expression to anH              offset from one of the base registers previously specifiedH              in a .BASE directive. .BASE provides a convenient and moreC              readable short hand for accessing memory and constant E              values using base registers. .BASE also makes it easierDF              for you to change your register assignments if you later              modify your code.          5-18 n  I                                                     Assembler Directives I                                                                    .BASE E              The base expression is optional. If the base expressionE              is specified, this base address value is assumed by thePH              assembler to be in the specified register, Rn. If the baseG              expression is omitted, the contents of the specified baseiD              register, Rn, is considered undefined until a new base>              expression is associated with the base register.E              R31 is defined to always contain zero, according to the_D              architecture definition. Therefore, R31 is known to beC              a predefined base register containing zero. For everycF              assembly, the assembler assumes the following statement:                  .BASE R31, 0C              Because the contents of R31 cannot change, you cannot-              specify a base address for R31. E              You can use the .BASE directive to implicitly referenceaH              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 base_F              register and an offset. If the assembler encounters onlyI              an expression with no base register, the assembler attemptsAE              to find a base register that contains a base address ortH              constant within a 16-bit signed offset of the value of theI              expression. If it finds such a base register, the assemblertD              computes an offset that when added to the value of theG              base register, results in a value equal to the expressionn4              specified in the instruction argument.I                                                                     5-19    e        Assembler Directives        .BASEs        Examples                 Example 1+                .EXTERNAL COMM_AREA       1 +                .BASE R1, COMM_AREA       2e/                CURR_LINE       = COMM_AREA + 0a/                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)2?                STL     R4, CURR_MODE           ; STL R4, 8(R1)a?                 1  This statement declares an external symbol,@                    COMM_AREA. COMM_AREA is a global symbol thatC                    represents the base address of a three-longwordNI                    communication area that is used by different routines_#                    in the program. B                 2  This statement informs the assembler that baseE                    register R1 contains the base address, COMM_AREA, I                    of this communication area. The next three statements C                    define variables within the communication area. @                 3  The first instruction shows how you can loadI                    registers with constant values in the range -32768 to H                    +32767 by implicitly using R31 as the base register.@                 4  The last three statements show how the .BASEE                    directive allows you to implicitly reference base_H                    registers and automatically compute offsets. In eachI                    of these instructions, the second argument is definedE=                    to require an offset and a base register. F                    Since no base register is specified, the assemblerG                    attempts to imply the base register and compute the_I                    offset based upon information given in previous .BASEi                    directives.iH                    In the last three instructions, the address argumentC                    is within -327678 to +32767 of the base address F                    known to be in R1 (i.e., COMM_AREA). Therefore, R1H                    is selected as the base register. The assembler alsoE                    computes the correct offset from the base address E                    known to be in R1 to the address specified in the )                    instruction argument.         5-20   I                                                     Assembler Directives I                                                                    .BASE                  Example 2G                 The assembler performs a sequential search through theI                 list of possible base registers, R0 through R31. It uses I                 the first definition possible if multiple base registers (                 are valid. For example:"                     .BASE R5, 300                     :"                     LDQ  R10, 100F                 The assembler outputs the LDQ instruction as follows:'                     LDQ  R10, -200(R5)pG                 Both R31 and R5 are defined as base registers that canbF                 be used in constructing the instruction argument. R31H                 always contains zero. In this example, R5 is also knownD                 to contain the constant 300. The assembler uses theD                 first base register, starting at R0 and progressingC                 to R31, which provides a known value within -32768 E                 to +32767 of the specified argument value. Since theF                 assembler considers R5 before it considers R31, R5 is&                 used rather than R31.I                                                                     5-21  e          Assembler Directives        .BEGIN_EXACTI        _________________________________________________________________D        .BEGIN_EXACT/              Exact instruction block directive         Format              .BEGIN_EXACT        Description F              An exact instruction block suppresses code optimizations?              (SCHEDULE, PEEPHOLE, ALIGN_CODE, and ALIGN_DATA). C              regardless if these optimizations are enabled for theF              assembly unit. Unlike .ENABLE and .DISABLE, which can beF              used to enable or disable specific optimizations for theE              entire assembly unit, .BEGIN_EXACT and .END_EXACT allowUC              you to suppress optimization for a specified range of D              instructions. Instructions outside the specified rangeC              remain subject to any optimizations you have enabled.        NotesG              o  This directive cannot appear in a psect with the NOEXE &                 and NOMIX attributes.E              o  Although this directive is accepted by the assembler G                 in a psect with the MIX attribute, it has no effect in G                 these psects since no code optimizations are in affect                   for MIX psects.G              o  .BEGIN_EXACT must be paired with a matching .END_EXACT 6                 to close the exact instruction block.F              o  .BEGIN_EXACT and .END_EXACT instruction blocks can beD                 nested. The outermost level of the .BEGIN_EXACT andB                 matching .END_EXACT directives delimit the actualF                 exact instruction block from which code optimizationsD                 are suppressed. Nesting .BEGIN_EXACT and .END_EXACTF                 instruction blocks can be useful in macro definitionsH                 where the macro expansion requires an exact instructionI                 sequence. Nested .BEGIN_EXACT and .END_EXACT instructionuH                 blocks allow a macro to be invoked both from within and5                 without the exact instruction block.          5-22   eI                                                     Assembler Directives I                                                             .BEGIN_EXACT         ExamplesG              The following example shows an instruction sequence priort              to optimization:,                     addf f7, f8, f9     ; 1,                     addf f2, f3, f4     ; 2,                     addl r5, r6, r7     ; 3,                     addl r8, r9, r10    ; 4H              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 the                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_EXACTeI                                                                     5-23             Assembler Directives        .BLKx I        _________________________________________________________________-        .BLKx1              Block storage allocation directives|        Format!              .BLKA  [expression]+!              .BLKB  [expression] !              .BLKD  [expression] !              .BLKF  [expression]o!              .BLKG  [expression] !              .BLKL  [expression] !              .BLKO  [expression]t!              .BLKQ  [expression] !              .BLKS  [expression] !              .BLKT  [expression] !              .BLKW  [expression]         Parameters              expressionD              An integer expression specifying the amount of storageE              to be allocated. All the symbols in the expression mustaA              be defined at the current point in the assembly andiC              the expression must be an absolute expression. If the E              expression is omitted, a default value of 1 is assumed.         Description E              MACRO-64 has the following 11 block storage directives: I              ___________________________________________________________tI              DirectiveReserves_Storage_for:______Bytes_Allocated________eI              .BLKA    Addresses (quadwords)      8 * value of expressionSE              .BLKB    Byte data                  Value of expression         5-24 t sI                                                     Assembler Directives I                                                                    .BLKxaI              ___________________________________________________________ I              DirectiveReserves_Storage_for:______Bytes_Allocated________I              .BLKD    Double-precision           8 * value of expression_*                       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 expressione?              .BLKO    Octaword data              16 * value ofi<                                                  expressionI              .BLKQ    Quadword data              8 * value of expression I              .BLKS    S_floating data            4 * value of expressiont"                       (longwords)I              .BLKT    T_floating data            8 * value of expression "                       (quadwords)I              .BLKW____Word_data__________________2_*_value_of_expressionsH              Each directive reserves storage for a different data type.G              The value of the expression determines the number of data E              items for which MACRO-64 reserves storage. For example,H              .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 onelA                 of the alignments listed in the following table: I                                                                     5-25c   t        Assembler Directives        .BLKxiI                 ________________________________________________________aI                 DirectivAlignment_______________________________________h3                 .BLKA   Quadword (64-bit) boundary                  .BLKB   None 3                 .BLKD   Quadword (64-bit) boundaryh3                 .BLKF   Longword (32-bit) boundary 3                 .BLKG   Quadword (64-bit) boundary 3                 .BLKL   Longword (32-bit) boundarye4                 .BLKO   Octaword (128-bit) boundary3                 .BLKQ   Quadword (64-bit) boundary3                 .BLKS   Longword (32-bit) boundarys3                 .BLKT   Quadword (64-bit) boundarySI                 .BLKW___Word_(16-bit)_boundary__________________________ G              o  These directives can only be used within psects having I                 either the NOEXE or MIX attributes. For more information ,                 on psects, see Section 5.1.        Examples"                    .PSECT A,NOEXEJ                B:: .BLKW  10             ; 10 words (20 bytes) of storageM                    .BLKQ   5             ; 5 quadwords (40 bytes) of storage G                    .BLKW                 ; 1 word (2 bytes) of storagee         5-26   nI                                                     Assembler DirectivessI                                                                    .BYTEtI        _________________________________________________________________         .BYTEl$              Byte storage directive        Format$              .BYTE  expression-list        Parameters              expression-listl?              One or more expressions separated by commas. Each E              expression is first evaluated as a quadword expression; G              then the value of the expression is truncated to fit in a I              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.        DescriptionhD              .BYTE generates successive bytes of binary data in the              object module.        Notess@              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 ofsH                 an integer or external value that is too large to store                 in eight bits.tE              o  This directive can only be used within data or mixed.A                 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 byteI                                                                     5-27    -        Assembler Directives        .CODE_ADDRESS I        _________________________________________________________________         .CODE_ADDRESSS,              Code address storage directive        Format&              .CODE_ADDRESS  name-list        Parameters              name-list B              A list of symbols separated by commas. These symbolsB              should reference either a procedure descriptor name,H              such as a routine name, or an externally defined procedure              descriptor.i        DescriptionaF              .CODE_ADDRESS causes the code addresses of the specifiedG              identifiers to be placed at the current psect and currentoI              location counter. The specified identifier should referencer:              a procedure descriptor defined in the image.        NotesE              o  This directive can only be used within data or mixed3A                 psects (psects that have either the NOEXE or MIXfD                 attributes). For more information, see Section 5.1.G              o  If automatic data alignment is enabled, this directiveuB                 aligns the current location counter to a quadword=                 (64-bit) boundary before allocating storage.         Examples                .CODE_ADDRESS Al         5-28    I                                                     Assembler DirectivesiI                                                              .D_FLOATINGeI        _________________________________________________________________a        .D_FLOATINGn        .DOUBLEo.              Floating-point storage directive        Format5              .D_FLOATING  floating-point-number-lists1              .DOUBLE  floating-point-number-list         Parameters(              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.         Description @              .D_FLOATING evaluates the specified floating-pointD              constants and stores the results in the object module.G              .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 alwaysh                 rounded.r>              o  The alternate form of .D_FLOATING is .DOUBLE.E              o  This directive can only be used within data or mixed A                 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 B                 aligns the current location counter to a quadword=                 (64-bit) boundary before allocating storage.uI                                                                     5-29u i h        Assembler Directives        .D_FLOATINGtD              o  The Alpha AXP architecture supports only conversion?                 operations for the D floating-point data type.s        Examples$                .D_FLOATING  3.1E+02         5-30 e cI                                                     Assembler DirectivesiI                                                                 .DISABLEmI        _________________________________________________________________        .DISABLE        .DSABL3              Disable assembler functions directive         Format%              .DISABLE  argument-listn#              .DSABL  argument-list         Parameters              argument-list G              One or more of the symbolic arguments listed in Table 5-3oF              under the description of .ENABLE. You can use either theB              long or the short form of the symbolic arguments. IfF              you specify multiple arguments, separate them by commas,              spaces, or tabs.        DescriptionI              .DISABLE disables the specified assembler function. See the :              description of .ENABLE for more information.7              The alternate form of .DISABLE is .DSABL. I                                                                     5-31  s f        Assembler Directives        .ELSEI        _________________________________________________________________         .ELSEv2              Conditional assembly block directive        Format              .ELSE         Description@              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 ends G              the conditional block; each .IF must have a correspondingyD              .ENDC. The .IF directive contains a condition test andC              one or two arguments. The condition test specified isfF              applied to the arguments. If the test is met, all MACRO-G              64 statements between .IF and .ELSE are assembled. If the7I              test is not met, the statements between .ELSE and .ENDC arec              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 arevG              assembled only if the condition is met for both the outer_H              and inner block. For more information, see the description#              of the .IF directive.         Notes ?              o  You cannot use the .ELSE directive in the samen:                 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 of .                 times in a conditional block.         5-32 e sI                                                     Assembler DirectivesiI                                                                    .ELSEs        Examples@              An example of a conditional assembly directive is:H                .IF EQUAL  ALPHA+1        ; Assemble block if ALPHA+1=0.                  .X                  .aD                .ELSE                     ; Assemble when .IF=false.                  .e                  .i                .ENDCaI                                                                     5-33            Assembler Directives        .ENABLE.I        _________________________________________________________________         .ENABLE         .ENABL2              Enable assmebler functions directive        Format$              .ENABLE  argument-list#              .ENABL  argument-list         Parameters              argument-listfI              One or more of the symbolic arguments listed in Table 5-3 .IG              You can use either the long form or the short form of the !              symbolic arguments. C              If you specify multiple arguments, separate them with &              commas, spaces, or tabs.I              Table_5-3_.ENABLE_and_.DISABLE_Symbolic_Arguments__________o*                                   Default!                            Short I              Long_Form_____Form___ConditioFunction______________________ I                                                 (continued on next page)          5-34   I                                                     Assembler Directives I                                                                  .ENABLE I              Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__;*                                   Default!                            ShortpI              Long_Form_____Form___ConditioFunction______________________lD              ALIGN_CODE           DisabledThe code alignment optionG                                           aligns certain branch target7A                                           labels. The ALIGN_CODE E                                           option is disabled for the F                                           assembly unit if any one ofA                                           the following is true: B                                           o  /NOALIGNMENT=code isF                                              specified on the command3                                              line. D                                           o  .DISABLE ALIGN_CODE isE                                              specified in the source.6                                              program.H                                           o  The /ALIGNMENT=code option;                                              is defaulted._>                                           See Section B.7 forG                                           information on optimizations C                                           and automatic alignment. I                                                 (continued on next page)[I                                                                     5-35B   x        Assembler Directives        .ENABLE I              Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__ *                                   Default!                            Short I              Long_Form_____Form___ConditioFunction______________________ G              ALIGN_DATA           DisabledWhen ALIGN_DATA is disabled, F                                           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 longwordG                                           boundaries) adding pad bytes 8                                           as necessary.E                                           Accessing data on anything_H                                           other than natural boundariesG                                           usually incurs a significant ?                                           performance penalty.aD                                           You can enable or disableD                                           the ALIGN_DATA option forF                                           specific ranges within yourH                                           program. For more informationG                                           on automatic data alignment, E                                           see Section 5.2. Also, see F                                           Section B.7 for informationI                                           on optimizations and automaticf5                                           alignment. I                                                 (continued on next page)          5-36    I                                                     Assembler Directives I                                                                  .ENABLE I              Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__h*                                   Default!                            Short I              Long_Form_____Form___ConditioFunction______________________vI              FLOAT                Enabled Controls whether the assemblereC                                           generates floating-pointeG                                           instructions when optimizing I                                           code and performing code-labela5                                           alignment.iH                                           Currently, the only floating-F                                           point instruction generatedB                                           by the assembler duringE                                           optimization and alignment_B                                           processing is FNOP, theF                                           floating-point no-operationF                                           instruction. If you specifyH                                           .DISABLE FLOAT, the assembler@                                           does not generate anyF                                           floating-point instructionsF                                           as part of optimization and@                                           alignment processing.D                                           The initial value of thisE                                           option is specified by thebI                                           /ENVIRONMENT=[NO]FLOAT command F                                           line option. The last valueI                                           of the FLOAT option at the endtI                                           of assembly determines whether H                                           FLOAT is enabled or DISABLED.I                                                 (continued on next page) I                                                                     5-37  -         Assembler Directives        .ENABLE I              Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__ *                                   Default!                            Short_I              Long_Form_____Form___ConditioFunction______________________eF              GLOBAL        GBL    Enabled When GLOBAL is enabled, theF                                           assembler implicitly treatsE                                           any undefined symbol as aniE                                           external reference definedlD                                           in another module. If theE                                           GLOBAL option is disabled,2A                                           the assembler issues a H                                           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 GLOBALsH                                           option at the end of assemblyH                                           determines whether the GLOBALI                                           option is enabled or disabled.vI                                                 (continued on next page)n         5-38    I                                                     Assembler Directives I                                                                  .ENABLEeI              Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments___*                                   Default!                            ShortdI              Long_Form_____Form___ConditioFunction______________________mG              LOCAL_BLOCK   LSB    DisabledUsed to override the defaultiG                                           assembler behavior to definefF                                           a temporary label block. (AD                                           temporary label is of theE                                           form n$ where n representsdG                                           a number.) A temporary labelhE                                           block is usually delimitedfG                                           by two user defined local orfF                                           global labels. However, theH                                           .ENABLE LOCAL_BLOCK directiveG                                           defines the start of a blockiG                                           that is terminated by one ofe9                                           the following: E                                           o  A second .ENABLE LOCAL_y>                                              BLOCK directive.D                                           o  A .DISABLE LOCAL_BLOCKC                                              directive followed by E                                              a user-defined local oreG                                              global label, or a .PSECT_8                                              directive.I                                                 (continued on next page)DI                                                                     5-39a e s        Assembler Directives        .ENABLE I              Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__o*                                   Default!                            ShortnI              Long_Form_____Form___ConditioFunction______________________iH              PEEPHOLE             DisabledPeephole optimization reducesB                                           the strength of certainF                                           instructions and eliminatesG                                           instructions where possible.8A                                           The PEEPHOLE option is I                                           disabled for the assembly unit-I                                           if any one of the following isF0                                           true:E                                           o  /NOOPTIMIZE=PEEPHOLE isF                                              specified on the command3                                              line. 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 optimizationsoC                                           and automatic alignment. I                                                 (continued on next page)N         5-40 e rI                                                     Assembler DirectivesdI                                                                  .ENABLEI              Table_5-3_(Cont.)_.ENABLE_and_.DISABLE_Symbolic_Arguments__ *                                   Default!                            ShortlI              Long_Form_____Form___ConditioFunction______________________ A              SCHEDULE             DisabledInstruction scheduling_@                                           optimization reordersI                                           instructions to more optimally B                                           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 is F                                              specified on the command3                                              line. B                                           o  .DISABLE SCHEDULE isE                                              specified in the source6                                              program.D                                           o  The SCHEDULE option is8                                              defaulted.>                                           See Section B.7 forG                                           information on optimizations I              _____________________________and_automatic_alignment.______e        DescriptionoF              .ENABLE enables the specified assembly function. .ENABLED              and its negative form, .DISABLE, control the following"              assembler functions:,              o  Creating local label blocksI              o  Specifying that undefined symbol references are external                  referenceshE              o  Enabling or disabling specific optimizations for thef                 assembly unitI                                                                     5-41    e        Assembler Directives        .ENABLE F              You can enable one or more specific optimization optionsA              with either the .ENABLE directive, or the /OPTIMIZEtF              command-line qualifier, or both. For more information onG              command line qualifiers, see Section 1.2. See Section B.7tA              for information on optimizations. If you explicitlymH              disable one or more specific optimization options with theI              .DISABLE directive, those optimization options are disablednA              regardless of the command-line options you specify.v        Notes 9                 The alternate form of .ENABLE is .ENABL.         Examples                 Example 1C                 The following example shows the ALIGN_DATA option:u                .PSECT A, NOEXE 6                .ENABLE ALIGN_DATA  ; Align on natural8                                    ; natural boundaries%                A: .BYTE 1          ; 7                B: .QUAD 1000       ; B is allocated at :                                    ; a natural boundary -;                                    ; specifically at A + 7 %                .DISABLE ALIGN_DATA ;o%                C: .BYTE 2          ;7                D: .QUAD 1001       ; D is allocated at =                                    ; an unaligned boundary - 8                                    ; specifically C + 1                 Example 2H                 The following example shows the GLOBAL option disabled:                .DISABLE GLOBAL ?                .ADDRESS X         ; Assembler issues a warning_                .END         5-42 _ I                                                     Assembler DirectivesrI                                                                  .ENABLE                  Example 3C                 The following example shows the LOCAL_BLOCK optionr                 enabled:e)                      .ENABLE LOCAL_BLOCK $                      .PSECT A,NOEXE                A1::I                5$:   .PROCEDURE_DESCRIPTOR PROC_1   ; Temporary label 5$e                      .blkb 32                A2::Q                      .address 5$                    ; By default the declaration_Q                                                     ; of A2 would have ended therP                                                     ; temporary label block andP                                                     ; made this reference to 5$V                                                     ; illegal.  However, this defaultS                                                     ; behavior has been overridden Y                                                     ; by the use of .ENABLE LOCAL_BLOCK.o*                      .DISABLE LOCAL_BLOCK                      .END                 Example 4I                 The following example shows an unoptimized and optimized D                 list of instructions with the SCHEDULE and PEEPHOLE!                 options enabled: )                .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,R6G                 This example shows the optimized list of instructions: )                .ENABLE PEEPHOLE,SCHEDULEs1                .psect A,EXE,QUAD     ; optimizedc                 A::ADDF F1,F2,F3                    ADDL R1,R2,R3                    ADDF F4,F5,F6                    ADDL R4,R5,R6I                                                                     5-43u .          Assembler Directives         .ENDI        _________________________________________________________________         .END,              Assembly termination directive        Format              .END  [label]c        Parameters              label F              The procedure descriptor name that specifies the routineC              (called the transfer address) where program execution 0              begins. This argument is optional.        DescriptionD              .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.        Notes F              o  When an executable image consisting of several objectA                 modules is linked, only one object module should D                 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.          5-44 e I                                                     Assembler Directives I                                                                     .END         Examples                  .                  .                   .u?                .PROCEDURE_DESCRIPTOR TRANSFER1,code_address_T1                   .n                  .                   . L                .END TRANSFER1        ; TRANSFER1 is module transfer addressI                                                                     5-45p r          Assembler Directives        .ENDC I        _________________________________________________________________         .ENDCn'              End conditional directive         Format              .ENDCi        Description G              .ENDC terminates the conditional range started by the .IF H              directive. See the description of .IF for more information              and examples.x         5-46    I                                                     Assembler Directives I                                                                    .ENDMnI        _________________________________________________________________         .ENDM ,              End macro definition directive        Format!              .ENDM  [macro-name]_        Parameters              macro-nameI              The name of the macro whose definition is to be terminated.gI              The macro name is optional; if specified, it must match thecF              name defined in the matching .MACRO directive. The macroG              name should be specified so that the assembler can detecti6              any improperly nested macro definitions.        DescriptiontH              .ENDM terminates the macro definition. See the descriptionH              of .MACRO for an example of the use of an .ENDM directive.        Notes H                 If .ENDM is encountered outside a macro definition, the5                 assembler displays an error message. I                                                                     5-47i   y        Assembler Directives        .ENDR I        _________________________________________________________________e        .ENDRy(              End repeat range directive        Format              .ENDR         Description G              .ENDR indicates the end of a repeat range. It must be the C              final statement of every repeat block. A repeat block D              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.         NoteshD                 If .ENDR is encountered outside a repeat block, the5                 assembler displays an error message.          5-48    I                                                     Assembler DirectivesI                                                               .END_EXACT I        _________________________________________________________________         .END_EXACT3              End exact instruction block directive         Format              .END_EXACT        Description H              .END_EXACT delimits the end of an exact instruction block.E              An exact instruction block suppresses the optimizationsI              SCHEDULE and PEEPHOLE, and the alignment options ALIGN_CODE D              and ALIGN_DATA for the specified range of instructionsB              regardless if code optimizations are enabled for the              assembly unit.G              For more information on the .END_EXACT directive, see the H              description of the .BEGIN_EXACT directive in this chapter.I                                                                     5-49             Assembler Directives        .ERRORI        _________________________________________________________________         .ERROR              Error directiver        Format$              .ERROR  quoted-literal        Parameters              quoted-literalF              A string of characters, between a pair of double quotes,G              displayed during assembly. For more information on quoted (              literals, see Section 2.4.        Description 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.E        Notes 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.B              o  This directive also accepts VAX MACRO syntax. SeeC                 VAX MACRO and Instruction Set Reference Manual for                  details.         Examples*                .ERROR "Illegal Arguments"                ^lG                %MACRO64-E-GENERROR, Generated ERROR: Illegal Argumentsn@                at line number 3 in file DISK$:[TEST]ERROR.M64;2         5-50   I                                                     Assembler Directives I                                                                    .EVEN I        _________________________________________________________________         .EVEN 7              Even location counter alignment directive         Format              .EVENc        Description B              .EVEN ensures that the current value of the locationF              counter is even by adding 1 if the current value is odd.G              If the current value is already even, no action is taken.         Notes E              o  This directive can only be used within data or mixedBA                 psects (psects that have either the NOEXE or MIXtD                 attributes). For more information, see Section 5.1.I                                                                     5-51             Assembler Directives        .EXTERNAL I        _________________________________________________________________         .EXTERNAL         .EXTRN1              External symbol attribute directives        Format$              .EXTERNAL  symbol-list!              .EXTRN  symbol-listS        Parameters              symbol-list :              A list of symbol names, separated by commas.        Descriptionm@              .EXTERNAL indicates that the specified symbols areC              external; that is, the symbols are defined in another               object module.        Notesn;                 The alternate form of .EXTERNAL is .EXTRN.l        ExamplesD                     .EXTERNAL B    ; B is defined in another module                        .                         .i                        . ?                A::  .ADDRESS B    ; Its address is stored here          5-52 n fI                                                     Assembler Directives I                                                              .F_FLOATING I        _________________________________________________________________         .F_FLOATING         .FLOAT.              Floating-point storage directive        Format5              .F_FLOATING  floating-point-number-lists0              .FLOAT  floating-point-number-list        Parameters(              floating-point-number-listI              A list of one or more floating-point constants separated byI              commas. For more information on floating-point numbers, see G              Section 2.3.2. The constants cannot contain any operators /              except unary plus or unary minus.i        Description @              .F_FLOATING evaluates the specified floating-pointF              constant(s) and stores the results in the object module.G              .F_FLOATING generates 32-bit, single-precision, floating- H              point data (1 bit of sign, 8 bits of exponent, and 23 bitsE              of fractional significance). See the description of .D_ B              FLOATING for information on storing double-precisionB              floating-point constants and the descriptions of .G_F              FLOATING, S_FLOATING, and T_FLOATING for descriptions of-              other floating-point constants.         Noteso=              o  The alternate form of .F_FLOATING is .FLOAT.nE              o  This directive can only be used within data or mixedtA                 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 directiveiG                 aligns the current location counter to a longword (32- 9                 bit) boundary before allocating storage.OI                                                                     5-53  t c        Assembler Directives        .F_FLOATINGe        Examples&                .F_FLOATING 1.0,3.0E+2         5-54    I                                                     Assembler DirectiveshI                                                              .G_FLOATINGeI        _________________________________________________________________         .G_FLOATING 0              G_floating-point storage directive        Format5              .G_FLOATING  floating-point-number-liste        Parameters(              floating-point-number-listB              A comma-separated list of one or more floating-pointH              constants. For more information on floating-point numbers,A              see Section 2.3.2. The constants cannot contain anyu9              operators except unary plus or unary minus.r        Description @              .G_FLOATING evaluates the specified floating-pointH              constants and stores the results in the object module. .G_G              FLOATING generates 64-bit data (1 bit of sign, 11 bits ofsH              exponent, and 52 bits of fraction). See the description ofE              .D_FLOATING for information on storing double-precisionoB              floating-point constants and the descriptions of .F_F              FLOATING, S_FLOATING, and T_FLOATING for descriptions of-              other floating-point constants.m        NotestE              o  This directive can only be used within data or mixedmA                 psects (psects that have either the NOEXE or MIXpD                 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.s        Examples#                .G_FLOATING  2.0E-3 I                                                                     5-55             Assembler Directives        .IDENTI        _________________________________________________________________         .IDENT&              Identification directive        Format$              .IDENT  quoted-literal        Parameters              quoted-literalE              A 1- to 31-character string, within double quotes, thattF              identifies the module, such as a string that specifies aF              version number. For more information on quoted literals,              see Section 2.4.        DescriptioneG              .IDENT provides a means of identifying the object module. E              This identification is in addition to the name assigned F              to the object module with .TITLE. A character string canE              be specified in .IDENT to label the object module. This E              string is printed in the header of the listing file and 0              also appears in the object module.        NotestF                 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.m        Examples$                .IDENT "Module Name"         5-56 a eI                                                     Assembler Directives I                                                                      .IF I        _________________________________________________________________          .IF 2              Conditional assembly block directive        Format(              .IF  condition argument(s)                 .                 .                 .              rangeo                 .                 .                 .              .ENDCh        Parameters              condition D              A specified condition that must be met if the block isC              to be included in the assembly. The condition must bepD              separated from the argument by a comma, space, or tab.F              Table 5-4 lists the conditions that can be tested by the.              conditional assembly directives.              argument(s)pB              One or more symbolic arguments or expressions of the?              specified conditional test. If the argument is an3B              expression, it cannot contain any undefined symbols.F              The assembler converts relocatable arguments to absoluteD              arguments by discarding the relocatable portion of theH              expression and using only the offset from the beginning of@              the psect. Arguments must be separated by a comma.              range H              The block of source code that is conditionally included in              the assembly.EI                                                                     5-57            Assembler Directives         .IFcI        Table_5-4_Condition_Tests_for_Conditional_Assembly_Directives____Q                                                                        ConditionrL        Condition         Complement                         Number     ThatQ                          Condition              Argument    of         Assembles M        Test              Test                   Type        Arguments  Blocku/                   Short                  Shortf         LongI        Form_______Form___Long_Form_______Form___________________________ S        EQUAL      EQ     NOT_EQUAL       NE     Expression  1 or       Expression-bL                                                             2[1]       1 isP                                                                        equal toS                                                                        expression- P                                                                        2 or notP                                                                        equal toS                                                                        expression-oJ                                                                        2.S        GREATER    GT     LESS_EQUAL      LE     Expression  1 or       Expression- L                                                             2[1]       1 isO                                                                        greaterL                                                                        thanS                                                                        expression- L                                                                        2 orL                                                                        lessO                                                                        than or P                                                                        equal toS                                                                        expression- J                                                                        2.I        [1]If_the_second_argument_is_omitted,_comparison_is_made_against__
  4.         0.I                                                 (continued on next page)o         5-58 m I                                                     Assembler DirectivestI                                                                      .IFdB        Table 5-4 (Cont.) Condition Tests for Conditional AssemblyI        __________________Directives_____________________________________Q                                                                        ConditionL        Condition         Complement                         Number     ThatQ                          Condition              Argument    of         Assembles M        Test              Test                   Type        Arguments  Block/                   Short                  Shorta         LongI        Form_______Form___Long_Form_______Form___________________________iS        LESS_      LT     GREATER_EQUAL   GE     Expression  1 or       Expression-aL        THAN                                                 2[1]       1 isL                                                                        lessL                                                                        thanS                                                                        expression- L                                                                        2 orO                                                                        greaterO                                                                        than orP                                                                        equal toS                                                                        expression-_J                                                                        2.N        DEFINED    DF     NOT_DEFINED     NDF    Symbolic    1          SymbolJ                                                                        isO                                                                        definedrN                                                                        or notP                                                                        defined.P        BLANK      B      NOT_BLANK       NB     Macro       1          ArgumentP                                                                        is blankN                                                                        or notN                                                                        blank.Q        IDENTICAL  IDN    DIFFERENT       DIF    Macro       2          ArgumentsDK                                                                        areNO                                                                        identi-_N                                                                        cal orO                                                                        differ- L                                                                        ent.I        [1]If_the_second_argument_is_omitted,_comparison_is_made_against_ 
  5.         0.I        _________________________________________________________________AI                                                                     5-59o m t        Assembler Directives         .IFu        Descriptiono@              A conditional assembly block is a series of sourceG              statements that are assembled only if a certain conditionI              is met. A .IF starts the conditional block and a .ENDC ends G              the conditional block; each .IF must have a correspondingvD              .ENDC. The .IF directive contains a condition test andC              one or two arguments. The condition test specified is H              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,iF              you can use the .ELSE directive (or a combination of theG              .IFF, .IFT, and .IFTF directives) to specify an alternate F              series of statements to assemble if the test is not met.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 outera              and inner block.        Notes I              o  The assembler displays an error message if the following G                 directives occur outside a conditional assembly block:MC                 .ENDC, .ELSE, .IF_FALSE, .IF_TRUE, .IF_TRUE_FALSE.rD              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 error                  message.eG              o  The effect of logical expressions can only be achieved G                 by using several levels of .IF directives. See Example                  5. 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 specifiesnH                 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.t         5-60 d tI                                                     Assembler Directives I                                                                      .IF        Examples                 Example 1C                 An example of a conditional assembly directive is: K                .IF EQUAL  ALPHA+1        ; Assemble block if ALPHA+1=0. Do_K                  .                       ;   not assemble if ALPHA+1 not=0R                  .                  .n                .ENDCe                 Example 2=                 Nested conditional directives take the form:l+                .IF   condition argument(s)y+                .IF   condition argument(s)m                  .a                  .t                  .                 .ENDCt                .ENDCa                 Example 3H                 The following conditional directives can govern whether=                 assembly of the specified range is to occur:N!                .IF DEFINED  SYM1!                .IF DEFINED  SYM2                   .t                  .                   .                 .ENDC                .ENDC                  Example 4C                 In this example, if the outermost condition is not2C                 satisfied, no deeper level of evaluation of nestedAB                 conditional statements within the program occurs.F                 Therefore, both SYM1 and SYM2 must be defined for the1                 specified range to be assembled.FI                 An alternate series of statements can be specified using                 .ELSE: I                                                                     5-61i p t        Assembler Directives         .IF B                .IF EQUAL A,B        ; Assemble if A is equal to BF                .ELSE                ; Assemble if A is not equal to B                .ENDCn                 Example 5H                 The following example demonstrates the use of .ELSE and                 nesting:sC                .IF LESS_THAN X,Y    ; Assemble if X is less than YpC                   .IF DEFINED Z     ; Assemble if Z is defined andl8                                     ;  X is less than YG                   .ELSE             ; Assemble if Z is not defined and 8                                     ;  X is less than Y                   .ENDCR                .ELSE                ; Assemble if X is greater than or equal to YH                   .IF DEFINED Z     ; Assemble if Z is defined and X isB                                     ;  greater than or equal to Y                   .ENDC                .ENDCn         5-62 f _I                                                     Assembler DirectivesaI                                                                    .IF_x I        _________________________________________________________________         .IF_x 6              Subconditional assembly block directives        Format              .IF_FALSEt              .IF_TRUE              .IF_TRUE_FALSE        DescriptionOG              For compatibility with VAX MACRO, MACRO-64 provides three53              directives for use within .IF blocks: I              ___________________________________________________________EI              Directive_______Function___________________________________D              .IF_FALSE       If the condition of the assembly blockC                              tests false, the program includes the A                              source code following the .IF_FALSE_E                              directive and continuing up to the nextGG                              subconditional directive or to the end of =                              the conditional assembly block.eD              .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.lH              .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 ofnI              ________________the_assembly_block)_is_always_included.____nG              The implied argument of a subconditional directive is the D              condition test specified when the conditional assembly@              block was entered. A conditional or subconditionalE              directive in a nested conditional assembly block is notI                                                                     5-63             Assembler Directives        .IF_xdD              evaluated if the preceding (or outer) condition in theC              block is not satisfied (see Example 3 and Example 4). D              A conditional block with a subconditional directive isI              different from a nested conditional block. If the condition_I              in the .IF is not met, the inner conditional blocks are notTI              assembled, but a subconditional directive can cause a block               to be assembled.        Notes@              o  If a subconditional directive appears outside aF                 conditional assembly block, the assembler displays an                 error message.E              o  The alternate forms of .IF_FALSE, .IF_TRUE, and .IF_ 6                 TRUE_FALSE are .IFF, .IFT, and .IFTF.F              o  You cannot use .ELSE in the same conditional block as                 .IF_x.f        Examples                 Example 13                 Assume that symbol SYM is defined:          5-64 e hI                                                     Assembler DirectivesiI                                                                    .IF_xoU                   .IF DEFINED   SYM               ; Tests TRUE since SYM is defined. T                     .                             ;   Assembles the following code.                     .                     .O                   .IF_FALSE                       ; Tests FALSE since previous N                     .                             ;   .IF was TRUE.  Does notS                     .                             ;   assemble the following code.                      .U                   .IF_TRUE                        ; Tests TRUE since SYM is defined. T                     .                             ;   Assembles the following code.                     .                     .M                   .IF_TRUE_FALSE                  ; Assembles following code G                     .                             ;   unconditionally.a                     .                     .U                   .IF_TRUE                        ; Tests TRUE since SYM is defined.dM                     .                             ;   Assembles remainder ofmR                     .                             ;   conditional assembly block.                     .                   .ENDC                 Example 2I                 Assume that symbol X is defined and that symbol Y is not                  defined:fS                   .IF DEFINED  X                  ; Tests TRUE since X is defined.iX                   .IF DEFINED  Y                  ; Tests FALSE since Y is not defined.W                   .IF_FALSE                       ; Tests TRUE since Y is not defined. T                     .                             ;   Assembles the following code.                     .                     .X                   .IF_TRUE                        ; Tests FALSE since Y is not defined.V                     .                             ;   Does not assemble the following<                     .                             ;   code.                     .                   .ENDC                   .ENDCI                                                                     5-65             Assembler Directives        .IF_xe                 Example 3I                 Assume that symbol A is defined and that symbol B is not                  defined:eS                   .IF DEFINED  A                  ; Tests TRUE since A is defined. T                     .                             ;   Assembles the following code.                     .                     .T                   .IF_FALSE                       ; Tests FALSE since A is defined.V                     .                             ;   Does not assemble the following<                     .                             ;   code.                     .Q                   .IF NOT_DEFINED B               ; Nested conditional directive H                     .                             ;   is not evaluated.                     .                     .                   .ENDC                   .ENDC                 Example 4D                 Assume that symbol X is not defined but symbol Y is                 defined:X                   .IF DEFINED  X                  ; Tests FALSE since X is not defined.V                     .                             ;   Does not assemble the following<                     .                             ;   code.                     .Q                   .IF DEFINED  Y                  ; Nested conditional directive H                     .                             ;   is not evaluated.                     .                     .J                   .IF_FALSE                       ; Nested subconditionalR                     .                             ;   directive is not evaluated.                     .                     .J                   .IF_TRUE                        ; Nested subconditionalR                     .                             ;   directive is not evaluated.                     .                     .                   .ENDC                   .ENDC         5-66 a nI                                                     Assembler Directives I                                                                     .IIF I        _________________________________________________________________          .IIF<              Immediate conditional assembly block directive        Format7              .IIF  condition [,]argument(s), statementi        Parameters              conditionF              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 anI              comma, space, or tab. If the first argument can be a blank, G              the condition must be separated from the arguments with a               comma.              argument(s)gI              An expression or symbolic argument (described in Table 5-4)RF              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                                                                     5-67             Assembler Directives         .IIF        Notes @                 The assembler displays an error message if .IIFC                 specifies a condition test other than those listed F                 in Table 5-4, which the assembler considers valid, an6                 illegal argument, or a null argument.        ExamplesI              In the following example, the symbol EXAM is defined within !              the source program: +                .IIF DEFINED EXAM, BR ALPHAr:              This directive generates the following code:                BR    ALPHA          5-68 i I                                                     Assembler Directives I                                                                 .INCLUDErI        _________________________________________________________________.        .INCLUDE+              Include source file directivea        Format&              .INCLUDE  quoted-literal        Parameters              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 tot7              specify quoted literals, see Section 2.4.b        DescriptionC              .INCLUDE indicates that the current input source filevH              should be suspended and the specified file should be used.F              When that file ends, the original source stream resumes,2              starting at the line after .INCLUDE.        NotesB                 The assembler issues an error message if the file*                 nesting level exceeds 50.        Examples$                .INCLUDE "file1.m64"I                                                                     5-69o e y        Assembler Directives        .INSTRUCTIONI        _________________________________________________________________         .INSTRUCTION#              Instruction directivee        Format&              .INSTRUCTION  expression        Parameters              expressionC              An absolute expression in the range of -2147483648 to H              2147483647. For more information on terms and expressions,D              see Section 2.8. The expression cannot be relocatable,#              external, or complex.s        Description I              The specified value is stored at the current location as an H              instruction. You can use .INSTRUCTION to specify arbitraryC              instructions. Similar to .LONG, .INSTRUCTION stores a E              longword (32-bits) of data. Unlike .LONG, the assembler I              considers .INSTRUCTION an instruction and allows its use in               code psects.        Notesa?              o  This directive can only be used within code or E                 mixed psects (psects that have either the EXE or MIX D                 attributes). For more information, see Section 5.1.F              o  If automatic data alignment is enabled within a mixedB                 psect, this directive aligns the current location?                 counter to a longword (32-bit) boundary before $                 allocating storage.I              o  This directive can be used to store arbitrary, longword,u?                 assembly-time constant data in a code section.          5-70    I                                                     Assembler Directives I                                                             .INSTRUCTIONm        Examples                .INSTRUCTION 7I                                                                     5-71             Assembler Directives         .IRPI        _________________________________________________________________E         .IRP2              Indefinite repeat argument directive        Format*              .IRP  symbol,<argument list>                 .                 .                 .              range                  .                 .                 .              .ENDR         Parameters              symbolF              A formal argument that is successively replaced with theC              specified actual arguments enclosed in angle bracketsE              (<>). If no formal argument is specified, the assembler (              displays an error message.              <argument list>DG              A list of actual arguments enclosed in angle brackets andtF              used in expanding the indefinite repeat range. An actualF              argument can consist of one or more characters. MultipleF              arguments must be separated by a legal separator (comma,F              space, or tab). If no actual arguments are specified, no              action is taken.              rangenC              The block of source text to be repeated once for each E              occurrence of an actual argument in the list. The rangeH              can contain macro definitions and repeat ranges. .MEXIT isI              legal within the range and causes the current and remaining (              repetitions to be aborted.         5-72   I                                                     Assembler DirectiveshI                                                                     .IRPT        DescriptioniD              .IRP replaces a formal argument with successive actualG              arguments specified in an argument list. This replacement C              process occurs during the expansion of the indefinite G              repeat block range. The .ENDR directive specifies the end               of the range.EC              .IRP is analogous to a macro definition with only one I              formal argument. At each successive expansion of the repeat E              block, this formal argument is replaced with successive D              elements from the argument list. The directive and itsE              range are coded in line within the source program. This C              type of macro definition and its range do not require E              calling the macro 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 (see_C              the description of .REPEAT). The rules for specifying G              .IRP arguments are the same as those for specifying macroR              arguments.        Examples1              The macro definition is as follows:_:                .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                        .endc                     .endrd;                    .if eq, OK  ; If unknown procedure kind G                        .error "Unknown procedure kind: PROCEDURE_KIND"i                    .endc*                .endm CHECK_PROCEDURE_KIND-                CHECK_PROCEDURE_KIND REGISTER +                CHECK_PROCEDURE_KIND FOOZLEtI                                                                     5-73l            Assembler Directives         .IRPD              The macro call and expansion of the previously defined"              macro is as follows:-                CHECK_PROCEDURE_KIND REGISTER B                    OK = 0      ; Assume procedure kind is unknown4                    .if identical,<REGISTER>,<BOUND>                    .endc 3                    .if identical,<REGISTER>,<NULL>                     .endcc7                    .if identical,<REGISTER>,<REGISTER>_8                        OK = 1 ; Procedure kind is known8                        .mexit ; No need to look further;                    .if eq, OK  ; If unknown procedure kind                     .endc +                CHECK_PROCEDURE_KIND FOOZLE B                    OK = 0      ; Assume procedure kind is unknown2                    .if identical,<FOOZLE>,<BOUND>                    .endc 1                    .if identical,<FOOZLE>,<NULL>i                    .endc5                    .if identical,<FOOZLE>,<REGISTER>o                    .endc 2                    .if identical,<FOOZLE>,<STACK>                    .endcd;                    .if eq, OK  ; If unknown procedure kind ?                        .error "Unknown procedure kind: FOOZLE"                     .endcoE              In this example the CHECK_PROCEDURE_KIND macro uses thetI              .IRP directive to iterate over a list of reference keywordseG              to determine if its argument matches one of the referencepF              keywords. If a match is not found, the macro displays an              error message.         5-74 T aI                                                     Assembler Directives I                                                                    .IRPC I        _________________________________________________________________         .IRPC3              Indefinite repeat character directive        Format$              .IRPC  symbol,<STRING>                 .                 .                 .              range                 .                 .                 .              .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 and C              used in the expansion of the indefinite repeat range.eD              Although the angle brackets are required only when theA              string contains separating characters, their use is.)              recommended for legibility.t              range C              The block of source text to be repeated once for eachUB              occurrence of a character in the list. The range canD              contain macro definitions and repeat ranges. .MEXIT is%              legal within the range. I                                                                     5-75            Assembler Directives        .IRPCm        Description H              .IRPC is similar to .IRP except that .IRPC permits single-G              character substitution rather than argument substitution.pC              On each iteration of the indefinite repeat range, thebH              formal argument is replaced with each successive characterH              in the specified string. The .ENDR directive specifies the              end of the range.;D              .IRPC is analogous to a macro definition with only oneE              formal argument. At each expansion of the repeat block, I              this formal argument is replaced with successive characters D              from the actual argument string. The directive and itsF              range are coded in line within the source program and do4              not require calling the macro by name.E              .IRPC can appear either inside or outside another macro G              definition, indefinite repeat block, or repeat block (see &              description of .REPEAT).        Examples1              The macro definition is as follows:&                    .macro X_COUNT ARG!                        COUNT = 03&                        .irpc CH,<ARG>F                            .iif identical,<CH>,<X>, COUNT = COUNT + 1                        .endr !                    .endm X_COUNT ?              The macro call and expansion of the macro defined;'              previously is as follows:          5-76   I                                                     Assembler DirectivesI                                                                    .IRPCe'                    X_COUNT XXFOOXBARXX !                        COUNT = 0 .                        .irpc CH,<XXFOOXBARXX>F                            .iif identical,<CH>,<X>, COUNT = COUNT + 1                        .endr;E                            .iif identical,<X>,<X>, COUNT = COUNT + 1 E                            .iif identical,<X>,<X>, COUNT = COUNT + 1aE                            .iif identical,<F>,<X>, COUNT = COUNT + 1oE                            .iif identical,<O>,<X>, COUNT = COUNT + 1 E                            .iif identical,<O>,<X>, COUNT = COUNT + 1 E                            .iif identical,<X>,<X>, COUNT = COUNT + 1E                            .iif identical,<B>,<X>, COUNT = COUNT + 1 E                            .iif identical,<A>,<X>, COUNT = COUNT + 1eE                            .iif identical,<R>,<X>, COUNT = COUNT + 1 E                            .iif identical,<X>,<X>, COUNT = COUNT + 1 E                            .iif identical,<X>,<X>, COUNT = COUNT + 1i0                        .print "%integer(COUNT)"7                %MACRO64-I-GENPRINT, Generated PRINT: 5 G              This example uses the .IRPC directive to iterate over the C              characters in the argument to the X_COUNT macro. Each D              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.eI                                                                     5-77_ _ _        Assembler Directives        .LIBRARYI        _________________________________________________________________t        .LIBRARY%              Macro library directive        Format9              .LIBRARY  quoted-literal1 [quoted-literal2]l        Parameters              quoted-literal1 E              A string enclosed within double quotes that is the file H              specification of a macro library. If a logical name existsG              and it is the same as the macro library name, specify the H              .MLB file extension to override the logical name. For more>              information on quoted literals, see Section 2.4.              quoted-literal2eC              An optional string enclosed within double quotes thatoF              specifies a search list of file specifications where theH              assembler should look for the specified macro library. TheF              assembler successively processes the search list in leftG              to right order and attempts to locate the specified macromI              library in each location specified in the search list untilnE              the macro library is found. If the macro library is notcF              found, the assembler issues a diagnostic message. If youE              omit the second argument to the .LIBRARY directive, the B              assembler uses the following search list by default:1              o  The current device and directoryfG              o  The device and directory specified by the logical nameo-                 MACRO64$LIBRARY (if defined)aG              o  The device and directory specified by the logical namen+                 ALPHA$LIBRARY (if defined) G              o  The device and directory specified by the logical name                  SYS$LIBRARY?              Logical names may be defined as VMS search lists.t         5-78  I                                                     Assembler DirectivesFI                                                                 .LIBRARY         DescriptionwD              .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-name G              argument, default values are assumed. The device defaultsI              to you current default disk; the directory defaults to your G              current default directory; the file type defaults to MLB.         Examples&                .LIBRARY "MY_MACROS" 1                .LIBRARY "PROJ__3        MACROS" "PROJ:[MACRO],PROJ:[DEVELOPMENT]" 2dI              1  The first statement adds the macro library MY_MACROS.MLBlE                 to the macro library list. The assembler first looks I                 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 logicalv@                 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 byfD                 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 directoriesoH                 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 assemblerD                 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,m;                 the assembler issues a diagnostic message.eI                                                                     5-79f 1 8        Assembler Directives        .LINKAGE_PAIR I        _________________________________________________________________         .LINKAGE_PAIR               Linkage directive         Format!              .LINKAGE_PAIR  nameo        Parameters              nameD              The name of the procedure descriptor, possibly definedF              in a different module of the routine to which linkage is              required.)        Description E              .LINKAGE_PAIR causes a linkage pair to be stored at thelF              current location counter. A linkage pair consists of twoF              quadwords. The first quadword is the code entry point ofE              the routine indicated by the specified identifier. (See C              .CODE_ADDRESS.) The second quadword is the address of F              the procedure descriptor of the routine indicated by theF              specified identifier. The second quadword is also calledF              the procedure value. The specified name should referenceF              a procedure descriptor that is either defined within theC              assembly unit or that becomes defined at the time thei               program is linked.        NotesE              o  This directive can only be used within data or mixedcA                 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 directiveI                 aligns the current location counter to an octaword (128- 9                 bit) boundary before allocating storage.          5-80 _ _I                                                     Assembler Directives I                                                            .LINKAGE_PAIR         ExamplesK                .LINKAGE_PAIR A     ; Code address A followed by address of <                                    ; procedure descriptor AI                                                                     5-81             Assembler Directives        .LISTkI        _________________________________________________________________         .LISTa              Listing directive         Format$              .LIST  [argument-list]        Parameters              argument-listdH              One or more of the symbolic arguments defined in Table 5-7I              . You can use either the long form or the short form of the F              arguments. If multiple arguments are specified, separate0              them with commas, spaces, or tabs.        DescriptionaH              .LIST is equivalent to .SHOW. See the description of .SHOW#              for more information.          5-82    I                                                     Assembler DirectivesaI                                                      .LOCAL_CODE_ADDRESSeI        _________________________________________________________________         .LOCAL_CODE_ADDRESSA2              Local code address storage directive        Format,              .LOCAL_CODE_ADDRESS  name-list        Parameters              name-listm@              A list of symbols separated by commas. Each symbolG              references a procedure descriptor, defined in the currenth              module.f        DescriptioneB              .LOCAL_CODE_ADDRESS causes the code addresses of theE              specified identifiers to be placed at the current psectoI              and current location counter. The specified identifier mustoI              reference a procedure descriptor defined within the module.h        Notes E              o  This directive can only be used 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 directive B                 aligns the current location counter to a quadword=                 (64-bit) boundary before allocating storage.e        Examples+                .PROCEDURE_DESCRIPTOR P1,C1                 .BLKQ 1r;                .LOCAL_CODE_ADDRESS P1       ; Code addressoG                                             ; of P1...address of C1...>                                             ; is stored here.I                                                                     5-83  u p        Assembler Directives        .LOCAL_LINKAGE_PAIR,I        _________________________________________________________________I        .LOCAL_LINKAGE_PAIR %              Local linkage directiven        Format'              .LOCAL_LINKAGE_PAIR  nameo        Parameters              nameH              The name of a procedure descriptor of the routine to whichE              linkage is required. The specified procedure descriptor 4              must be defined in the current module.        DescriptionCG              .LOCAL_LINKAGE_PAIR causes a linkage pair to be stored at H              the current location counter. A linkage pair consists of aG              code address and the address of the specified identifier.eF              The specified name must reference a procedure descriptor7              that is defined within the assembly unit.:        Notes E              o  This directive can only be used within data or mixedeA                 psects (psects that have either the NOEXE or MIXSD                 attributes). For more information, see Section 5.1.G              o  If automatic data alignment is enabled, this directiveiI                 aligns the current location counter to an octaword (128-u9                 bit) boundary before allocating storage.t        Examples,                .PROCEDURE_DESCRIPTOR P1,CA1                 .                 .                 .                .LOCAL_LINKAGE_ 5        PAIR P1        ; Code address CA1 followed byoP                                              ; procedure descriptor address P1.         5-84   iI                                                     Assembler Directives I                                              .LOCAL_PROCEDURE_DESCRIPTOR I        _________________________________________________________________ #        .LOCAL_PROCEDURE_DESCRIPTORk5              Procedure descriptor labeling directivei        Format;              .LOCAL_PROCEDURE_DESCRIPTOR  pd-name, ca-nameC        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-namehB              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.        DescriptionB              .LOCAL_PROCEDURE_DESCRIPTOR defines a bivalued localG              identifier that is used to represent a local routine. The F              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 thetH              .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 argument I              to the .LOCAL_PROCEDURE_DESCRIPTOR directive. No storage isk              allocated.        NotesoG              o  See the VMS Calling Standard for a full description oft'                 procedure descriptors. H              o  You must specify .LOCAL_PROCEDURE_DESCRIPTOR before the2                 code of the routine it describes.I                                                                     5-85  u n        Assembler Directives#        .LOCAL_PROCEDURE_DESCRIPTOR E              o  See Section 6.7 for a description of the $PROCEDURE_nE                 DESCRIPTOR and $ROUTINE library macros. These macros G                 define the procedure identifier and define the storageI.                 for the procedure descriptor.E              o  This directive can only be used within data or mixed A                 psects (psects that have either the NOEXE or MIX A                 attributes). For more information on psects, see                  Section 5.1.pG              o  If automatic data alignment is enabled, this directive.G                 aligns the current location counter to a quadword (64- H                 bit) boundary before defining the procedure identifier.        Examples2                .LOCAL_PROCEDURE_DESCRIPTOR LP1,C1         5-86    I                                                     Assembler DirectivesrI                                                                    .LONG I        _________________________________________________________________u        .LONGr(              Longword storage directive        Format$              .LONG  expression-list        Parameters              expression-list :              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.d        Notes E              o  This directive can only be used within data or mixed A                 psects (psects that have either the NOEXE or MIXD                 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.<F              o  You can define a 32-bit address item using macros and2                 the .LONG directive. For example:'                 .macro address_32 item                  .long item !                 .endm address_32>        Examples=                .LONG 4     ; Places 4 in 4 bytes of storage. I                                                                     5-87            Assembler Directives        .MACROI        _________________________________________________________________         .MACRO(              Macro definition directive        Format7              .MACRO  macro-name [formal-argument-list]N                 .                 .                 .              range                  .                 .                 .!              .ENDM  [macro name]i        Parameters              macro-nameG              The name of the macro to be defined; this name can be anyN4              legal symbol up to 31 characters long."              formal-argument-listE              The symbols, separated by commas, to be replaced by ther1              actual arguments in the macro call.i              range D              The source text to be included in the macro expansion.        DescriptionlI              .MACRO begins the definition of a macro. It gives the macrofG              name and a list of formal arguments. The .MACRO directive H              is followed by the source text to be included in the macroE              expansion. The .ENDM directive specifies the end of the_              range.I              Macro names do not conflict with user-defined symbols. BotheG              a macro and a user-defined symbol can have the same name.e         5-88   aI                                                     Assembler DirectivesnI                                                                   .MACRObB              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 is               expanded.eD              The symbols in the formal argument list are associatedE              with the macro name and are limited to the scope of the D              definition of that macro. For this reason, the symbolsE              that appear in the formal argument list can also appeard'              elsewhere in the program.4              For more information, see Section 4.1.        NotesnI              o  If a macro has the same name as an Alpha AXP opcode, the G                 macro is used instead of the instruction. This feature >                 allows you to temporarily redefine an opcode.E              o  A macro can be redefined by using a .MACRO directive F                 with the same name as in a previous macro definition.G                 Therefore, the previous macro definition is implicitlyCD                 deleted and the new macro definition supersedes theI                 previous definition. See the .MDELETE directive for mored/                 information on macro deletion.pF              o  A macro definition can be nested within another macroE                 definition. The inner macro is not defined until the(                 outer macro is invoked.G              o  A macro invocation can be nested so that one macro can C                 invoke another. The assembler suports nested macrotC                 invocations to a depth of 1000. If a macro invokestH                 itself, either directly or indirectly, it is recursive.G                 Recursive macros must specify a basis-step in order to G                 avoid infinite recursion. A basis-step is a macro exit H                 condition that will eventually cause the macro to exit,C                 thus ending the recursion (see the example below). I                                                                     5-89u n e        Assembler Directives        .MACRO        Examples                 Example 1I                 This example shows how macro definitions and invocations[E                 may be nested. It also shows examples of the various E                 forms of parameter passing. See Section 4.1 for more 4                 information on parameter passing. .$                .MACRO OP1 A,B=R4,?C&                C:      ADDL R2, B, R3                .MACRO OP'Br                        TRAPBi                .ENDM OP'B&                        ADDL A, R2, R3                        OP'B%                        .MDELETE OP'BL                .ENDM OP1aC                 When OP1 is invoked "OP1 R0", the text expands to:i'                33000$: ADDL R2, R4, R3B                .MACRO OPR4f                        TRAPBf                .ENDML'                        ADDL R0, R2, R3                         OPR4%                        .MDELETE OPR4 G                 Processing this text will cause OPR4 to be expanded to /                 TRAPB; the final text will be:g&                33000$: ADDL R2, R4 R3'                        ADDL R0, R2, R3                         TRAPBi         5-90    I                                                     Assembler DirectivesoI                                                                   .MACROR                 Example 2@                 The following example shows macro redefinition:!                .MACRO INITIALIZE ;                   .MACRO INITIALIZE   ;Redefine to nothing1#                   .ENDM INITIALIZEv                   X=0                   Y=1                   Z=-1_                 .ENDM INITIALIZEC                 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 36                 This example shows a recursive macro:"                .MACRO FACTORIAL NA                   .IF EQUAL <N>,0      ;Basis step; stop at zerou                      F=1t                   .ELSE%                      FACTORIAL <N-1> !                      F = F * <N>o                   .ENDC                .ENDM FACTORIAL I                                                                     5-91  t          Assembler Directives        .MCALLI        _________________________________________________________________e        .MCALL"              Macro call directive        Format%              .MCALL  macro-name-list         Parameters              macro-name-listH              A list of macros to be defined for this assembly. Separate*              the macro names with commas.        Description G              .MCALL specifies the names of the system and user-defineduI              macros that are required to assemble the source program buti1              are not defined in the source file. D              If any named macro is not found upon completion of theH              search (that is, if the macro is not defined in any of theH              macro libraries), the assembler displays an error message.        NotesiH                 Using the .MCALL directive is optional unless the macroF                 name is the same as an opcode or assembler directive.I                 The assembler automatically searches for a library macro G                 when it encounters an identifier that is not an opcodeE                 or directive in the opcode field. If your macro name H                 is the same as an opcode or directive, you must use theH                 .MCALL directive. You can also use the .MCALL directiveE                 in your program to document which macros are used bye                 your program.        ExamplesD                .MCALL TRAPB       ; Substitute macro in library for6                                   ; TRAPB instruction         5-92    I                                                     Assembler DirectiveseI                                                                 .MDELETE I        _________________________________________________________________v        .MDELETE&              Macro deletion directive        Format'              .MDELETE  macro-name-list        Parameters              macro-name-list G              A list of macros whose definitions are to be deleted. You =              may separate the macros with a comma or spaces.         Description_C              .MDELETE deletes the definitions of specified macros.DD              .MDELETE completely deletes the macro. If you delete aE              macro that is currently expanding (such as a macro thateI              deletes itself), the macro name is immediately removed from H              the macro name table and the macro is marked for deletion.?              When the macro finishes expanding, it is deleted.t        Examples                .MACRO FOO%                .PRINT "In macro FOO"                 .ENDM FOO                 FOO                 .MDELETE FOOI                                                                     5-93r f d        Assembler Directives        .MEXITI        _________________________________________________________________p        .MEXIT"              Macro exit directive        Format              .MEXIT        DescriptionC              .MEXIT terminates a macro expansion before the end of A              the macro. Termination is the same as if .ENDM weredG              encountered. You can also use the directive within repeat I              blocks. .MEXIT is useful in conditional expansion of macros G              and repeat blocks because it bypasses the complexities of I              nested conditional directives and alternate assembly paths.         Notes D              o  When .MEXIT occurs in a repeat block, the assemblerC                 terminates the current repetition of the range and B                 suppresses further expansion of the repeat range.I              o  When macros or repeat blocks are nested, .MEXIT exits to 4                 the next higher level of expansion.H              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 .MEXIToI                 directive to exit the current macro when it has finishedt:                 processing a particular kind of argument.         5-94    I                                                     Assembler DirectivesdI                                                                   .MEXITf2                        .macro STORE REG, LOCATION3                           .if identical,<REG>,<FP> 1                                STQ REG, LOCATION &                                .mexit!                            .endcv4                            .if identical,<REG>,<SP>1                                STQ REG, LOCATION &                                .mexit!                            .endc C                            .if identical,<%extract(0,1,<REG>)>,<R> 1                                STQ REG, LOCATIONa&                                .mexit!                            .endc C                            .if identical,<%extract(0,1,<REG>)>,<F> 1                                STT REG, LOCATION &                                .mexit!                            .endcrH                            .error "Register argument is not a register"#                        .endm STORE                  Example 2H                 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 withEG                 F as its first letter). The following example show twon/                 expansions of the STORE macro.c'                        STORE R1, 0(SP) 3                            .if identical,<R1>,<FP>.!                            .endc 3                            .if identical,<R1>,<SP>o!                            .endciC                            .if identical,<%extract(0,1,<R1>)>, <R>a1                            .if identical,<R>,<R> -                                STQ R1, 0(SP)n&                                .mexitI                                                                     5-95O U D        Assembler Directives        .MEXIT,                        STORE 24(SP), 16(SP)7                            .if identical,<24(SP)>,<FP> !                            .endc 7                            .if identical,<24(SP)>,<SP> !                            .endcuF                            .if identical,<%extract(0,1,<24(SP)>)>,<R>1                            .if identical,<2>,<R> !                            .endcdF                            .if identical, <%extract(0,1<24(SP)>)>,<F>1                            .if identical,<2>,<F>.!                            .endceH                            .error "Register argument is not a register"E                 The first call of the STORE macro above stores R1 at I                 0(SP). The STORE macro determines to do an integer storePG                 by recognizing the letter R as the first letter of theeH                 register name. Once it has done so, it abandons furtherC                 expansion of the macro using the .MEXIT directive.LB                 The second invocation attempts to store 24(SP) atE                 16(SP). Since the STORE macro cannot identify 24(SP)UE                 as a legitimate register in any of the four forms itrF                 recognizes, the STORE macro does not attempt to storeF                 the REG argument, and does not abandon expansion withG                 the .MEXIT directive. Instead, the STORE macro expandsE1                 and issues a diagnostic message.f         5-96   I                                                     Assembler Directives I                                                                    .NARG I        _________________________________________________________________s        .NARG +              Number of arguments directive        Format              .NARG  symbol         Parameters              symbolF              A symbol that is assigned a value equal to the number of5              positional arguments in the macro call.         Description_E              .NARG determines the number of arguments in the currentr              macro call.sH              .NARG counts all the positional arguments specified in theI              macro call, including null arguments (specified by adjacentrF              commas). The value assigned to the specified symbol doesG              not include any keyword arguments or any formal arguments '              that have default values.t        NoteseI                 If .NARG appears outside a macro, the assembler displays "                 an error message.        Examples              Example 1 1              The macro definition is as follows: I                .MACRO  CNT_ARG A1,A2,A3,A4,A5,A6,A7,A8,A9=DEF9,A10=DEF10 G                .NARG   COUNTER         ; COUNTER is set to no. of ARGS @                .WORD   COUNTER         ; Store value of COUNTER                .ENDM   CNT_ARGfI                                                                     5-97  n a        Assembler Directives        .NARG               Example 2.D              The macro calls and expansions of the macro previously%              defined are as follows::                CNT_ARG TEST,FIND,ANS   ; COUNTER will = 3G                .NARG   COUNTER         ; COUNTER is set to no. of ARGS @                .WORD   COUNTER         ; Store value of COUNTER:                CNT_ARG                 ; COUNTER will = 0G                .NARG   COUNTER         ; COUNTER is set to no. of ARGSn@                .WORD   COUNTER         ; Store value of COUNTERD                CNT_ARG TEST,A2=SYMB2,A3=SY3      ; COUNTER will = 1G                .NARG   COUNTER         ; COUNTER is set to no. of ARGS.@                .WORD   COUNTER         ; Store value of COUNTERK                                        ; Keyword arguments are not countedr:                CNT_ARG ,SYMBL,,        ; COUNTER will = 4G                .NARG   COUNTER         ; COUNTER is set to no. of ARGS @                .WORD   COUNTER         ; Store value of COUNTERD                                        ; Null arguments are counted         5-98 r xI                                                     Assembler Directives I                                                                    .NCHReI        _________________________________________________________________i        .NCHRc,              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.               <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 (;).c        Description F              .NCHR determines the number of characters in a specifiedE              character string. It can appear anywhere in an MACRO-64rF              program and is useful in calculating the length of macro              arguments.        NoteshH                 You can use the %LENGTH lexical operator instead of the!                 .NCHR directive.        Examples                 Example 14                 The macro definition is as follows:G                .MACRO   CHAR    MESS                    ; Define MACROpQ                .NCHR    CHRCNT,<MESS>                   ; Assign value to CHRCNT F                .WORD    CHRCNT                          ; Store valueK                .ASCII   "MESS"                          ; Store characters A                .ENDM    CHAR                            ; Finish I                                                                     5-99    d        Assembler Directives        .NCHR                 Example 2G                 The macro calls and expansions of the macro previously (                 defined are as follows:I                CHAR     <HELLO>                        ; CHRCNT will = 5.P                .NCHR    CHRCNT,<HELLO>                 ; Assign value to CHRCNTF                .WORD    CHRCNT                          ; Store valueK                .ASCII   "HELLO"                         ; Store charactersO                CHAR     <14, 75.39  4>                 ; CHRCNT will = 12(dec) P                .NCHR    CHRCNT,<14, 75.39  4>          ; Assign value to CHRCNTF                .WORD    CHRCNT                          ; Store valueK                .ASCII   "14, 75.39  4"                  ; Store charactersi        5-100g e cI                                                     Assembler Directives I                                                                   .NLISTeI        _________________________________________________________________        .NLIST)              Listing exclusion directiven        Format%              .NLIST  [argument-list]x        Parameters              argument-listaG              One or more of the symbolic arguments listed in Table 5-7 A              . Use either the long form or the short form of the D              arguments. If you specify multiple arguments, separate0              them with commas, spaces, or tabs.        Description E              .NLIST is equivalent to .NOSHOW. See the description of )              .SHOW for more information.I                                                                    5-101             Assembler Directives        .NOSHOW I        _________________________________________________________________         .NOSHOW )              Listing exclusion directive         Format&              .NOSHOW  [argument-list]        Parameters              argument-list G              One or more of the symbolic arguments listed in Table 5-7,F              in the description of .SHOW. Use either the long form orF              the short form of the arguments. If you specify multipleD              arguments, separate them with commas, spaces, or tabs.        Description@              .NOSHOW specifies listing control options. See the8              description of .SHOW for more information.        5-102  h 1I                                                     Assembler Directives I                                                                    .OCTA I        _________________________________________________________________i        .OCTAe(              Octaword storage directive        Format$              .OCTA  expression-list        Parameters              expression-list.G              A list of constant values separated by commas. Each valueeG              results in a 64-bit value being sign-extended to 128 bits.(              and stored in an octaword.        Description A              .OCTA generates 128 bits (16 bytes) of binary data.N        Notes 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 quadwordeF                 contains zero if the specified value is positive, andH                 it contains all bits set to 1 if the specified value is                 negative.E              o  This directive can only be used within data or mixedA                 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 directivenI                 aligns the current location counter to an octaword (128-d9                 bit) boundary before allocating storage. I                                                                    5-103t   t        Assembler Directives        .OCTAn        Examples9                .OCTA  0                         ; OCTA 0rK                .OCTA  ^X01234ABCD5678F9         ; OCTA hex value specified D                .OCTA  VINTERVAL                 ; VINTERVAL has 64-        bit value,B                                                 ;   sign-extended        5-104d   I                                                     Assembler Directives I                                                                     .ODD I        _________________________________________________________________o         .ODD6              Odd location counter alignment directive        Format              .ODD        Description I              .ODD ensures that the current value of the location counterBE              is odd by adding 1 if the current value is even. If the ?              current value is already odd, no action is taken.         Notes E                 This directive can be used only within data or mixed_A                 psects (psects that have either the NOEXE or MIXED                 attributes). For more information, see Section 5.3.I                                                                    5-105w e f        Assembler Directives        .PACKEDeI        _________________________________________________________________         .PACKEDs5              Packed decimal string storage directiveM        Format.              .PACKED  decimal-string[,symbol]        Description G              .PACKED is supplied as a library macro with MACRO-64. Forn.              more information, see Chapter 6.        5-106n e cI                                                     Assembler DirectivesCI                                                                    .PAGEI        _________________________________________________________________         .PAGE %              Page ejection directive         Format              .PAGEe        DescriptionMC              .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, textYG              beginning with the original macro invocation line appearsT'              at the top of a new page.c        Examples<                .MACRO SKIP    ; macro definition with .PAGE                 .PAGE          ;                 .ENDM SKIP     ;                 .PSECT A,NOEXE ;                 .BLKW 10       ;A                SKIP           ; In the listing file, a form feede7                               ;  will be inserted hereuI                                                                    5-107T i t        Assembler Directives        .PRINTI        _________________________________________________________________t        .PRINT(              Assembly message directive        Format$              .PRINT  quoted-literal        Parameters              quoted-literalG              The string of characters enclosed in quotes are displayedhG              when encountered during assembly. For more information on/              quoted literals, see Section 2.4.         Description E              .PRINT causes the assembler to display an informational :              message. The message consists of the string.        NotescF              o  .PRINT, .WARN, and .ERROR are directives that displayC                 messages. You can use these to display information E                 indicating unexpected or important conditions within                  the assembly.B              o  This directive also accepts VAX MACRO syntax. SeeC                 VAX MACRO and Instruction Set Reference Manual for                 details.         Examples+                .PRINT "Questionable usage"                 ^TH                %MACRO64-I-GENPRINT, Generated PRINT: Questionable usage@                at line number 3 in file DISK$:[TEST]PRINT.M64;2        5-108     I                                                     Assembler Directives I                                                    .PROCEDURE_DESCRIPTOR I        _________________________________________________________________E        .PROCEDURE_DESCRIPTORh5              Procedure descriptor labeling directive         Format5              .PROCEDURE_DESCRIPTOR  pd-name, ca-name         Parameters              pd-nametG              The name of the procedure descriptor. This name can be up(D              to 31 characters long. It cannot be a temporary label.              ca-name B              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.        DescriptioniH              .PROCEDURE_DESCRIPTOR defines a bivalued global identifierC              that is used to represent a global routine. The first C              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 the>E              .PROCEDURE_DESCRITOR directive. The second value is the H              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 is               allocated.        NotesdG              o  See the VMS Calling Standard for a full description ofi'                 procedure descriptors. G              o  You must specify .PROCEDURE_DESCRIPTOR before the codes-                 of the routine it describes.SI                                                                    5-109n t o        Assembler Directives        .PROCEDURE_DESCRIPTOR 9              o  See Section 6.7 for a description of theiD                 $PROCEDURE_DESCRIPTOR  and $ROUTINE library macros.H                 These macros define the procedure identifier and define:                 the storage for the procedure descriptor.E              o  This directive can only be used within data or mixedeA                 psects (psects that have either the NOEXE or MIX,C                 attributes). For more information, see Section 5.1aG              o  If automatic data alignment is enabled, this directiveiG                 aligns the current location counter to a quadword (64- H                 bit) boundary before defining the procedure identifier.        5-110r i  I                                                     Assembler DirectivesI                                                                   .PSECTI        _________________________________________________________________m        .PSECT*              Program sectioning directive        Format:              .PSECT  program-section-name[,argument-list]        Parameters"              program-section-nameF              The name of the program section. For more 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 attributes I              and their functions. Table 5-6 lists the default attributes H              and their opposites. Program sections are aligned when youH              specify an integer in the range 0 to 16 or one of the fiveG              keywords listed in the following table. If you specify an I              integer, the program section is linked to begin at the next E              virtual address that is a multiple of two raised to the_I              power of the integer. If you specify a keyword, the programND              section is linked to begin at the next virtual addressI              that is a multiple of the corresponding value listed in the              following table:I              ___________________________________________________________bI              Keyword_Size_(in_Bytes)____________________________________               BYTE    20= 1s              WORD    21= 2               LONG    22= 4              QUAD    23= 8T              OCTA    24= 16I              ___________________________________________________________ "              QUAD is the default.I                                                                    5-111  l 0        Assembler Directives        .PSECTI        Table_5-5_Program_Section_Attributes_____________________________fI        AttributFunction_________________________________________________=H        ABS     Absolute-The program section has an absolute address. AnF                absolute program section contributes no binary code toG                the image, so its byte allocation request to the linkerG                is zero. You cannot store initial values in an absolute E                program section with directives such as .BYTE, .WORD, E                .LONG, QUAD. Usually the .BLKx directives are used in E                conjunction with label definitions within an absoluteC                program section to define symbolic offsets within a D                structure. Compare this attribute with its opposite,                REL.C        CON     Concatenate-Program sections with the same name and_A                attributes (including CON) from other modules areHC                concatenated into one program section at link time.E                Their contents are concatenated in the order in which G                the linker acquires them. The allocated virtual addresseI                space is the sum of the individual requested allocations.>                Compare this attribute with its opposite, OVL.E        EXE     Executable-The program section contains instructions.sD                This attribute provides the capability of separatingD                instructions from read-only and read/write data. TheH                linker uses this attribute in gathering program sectionsC                and in verifying that the transfer address is in anaE                executable program section. The assembler only allowswG                you to place instructions in a program section that hastF                either or both the EXE or MIX attributes. Compare this3                attribute with its opposite, NOEXE.nC        GBL     Global-Program sections that have the same name andF                attributes will be combined at link time into a singleI                program section even when the individual program sectionsfF                are in different clusters. This attribute is specifiedG                for FORTRAN COMMON block program sections. Compare this 1                attribute with its opposite, LCL.SG        LCL     Local-The program section is restricted to its cluster.A>                Compare this attribute with its opposite, GBL.I                                                 (continued on next page)s        5-112s    I                                                     Assembler DirectiveseI                                                                   .PSECT:I        Table_5-5_(Cont.)_Program_Section_Attributes_____________________I        AttributFunction_________________________________________________CA        MIX     Mix-The program section can contain both data andvH                instructions. The MIX and NOMIX attributes are assembly-G                time attributes which only affect assembler processing.CH                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. IfG                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 notoH                   performed. Optimizations and code-label alignment areG                   not performed on instructions placed in a MIX psect,rE                   regardless of whether the .ENABLE/.DISABLE optionssF                   have been set, or if command line /OPTIMIZATION and?                   /ALIGNMENT=code options have been specified.mH                o  Limited debugging information is provided. No PC-lineI                   (program counter) correlation information is generatedo>                   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 formE                   as a data initializer to the .LONG data directive.aE                There are no restrictions on data directives. CompareeA                this attribute with its opposite, NOMIX. For morer-                information, see Section 5.1. I        NOEXE   Not Executable-The program section contains data only; it H                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)cI                                                                    5-113O           Assembler Directives        .PSECTI        Table_5-5_(Cont.)_Program_Section_Attributes_____________________rI        AttributFunction_________________________________________________aH        NOMIX   The default attribute when you use the .PSECT directive.>                Compare this attribute with its opposite, MIX.G        NOPIC   Non-Position-Independent Content-The program section isdG                assigned to a fixed location in virtual memory (when it I                is in a shareable image). Compare this attribute with itsT                opposite, PIC.A        NORD    Nonreadable-Reserved for future use. Compare this 0                attribute with its opposite, RD.H        NOSHR   No Share-The program section is reserved for private useI                at execution time by the initiating process. Compare thisa1                attribute with its opposite, SHR. G        NOWRT   Nonwriteable-The contents of the program section cannotiI                be altered (written into) at execution time. Compare thisE1                attribute with its opposite, WRT.f?        OVR     Overlay-Program sections with the same name andiE                attributes (including OVR) from other modules receive I                the same relocatable base address in memory at link time.rD                The allocated virtual address space is the requestedE                allocation of the largest overlaying program section.b>                Compare this attribute with its opposite, CON.G        PIC     Position-Independent Content-The program section can be I                relocated; that is, it can be assigned to any memory areaOI                (when it is in a shareable image). Compare this attribute )                with its opposite, NOPIC. H        RD      Readable-Reserved for future use. Compare this attribute(                with its opposite, NORD.D        REL     Relocatable-The linker assigns the program section aE                relocatable base address. The contents of the program H                section can be code or data. Compare this attribute with"                its opposite, ABS.I                                                 (continued on next page)         5-114    I                                                     Assembler DirectivesoI                                                                   .PSECTII        Table_5-5_(Cont.)_Program_Section_Attributes_____________________ I        AttributFunction_________________________________________________ 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.________________________________ I              Table_5-6_Default_Program_Section_Attributes_______________               DefaultaI              Attribute_____Opposite_Attribute___________________________p              CON           OVR!              EXE           NOEXE               LCL           GBL               NOMIX         MIX               NOPIC         PIC               NOSHR         SHR                RD            NORD              REL           ABS_I              WRT___________NOWRT________________________________________a        DescriptionE              .PSECT defines a program section and its attributes and I              refers to a program section once it is defined. Use program +              sections to do the following:e*              o  Develop modular programs.1              o  Separate instructions from data.iA              o  Allow different modules to access the same data. C              o  Protect read-only data and instructions from beingx                 modified.I              o  Identify sections of the object module to the linker and                  the debugger.I                                                                    5-115    G        Assembler Directives        .PSECTG              o  Control the order in which program sections are stored #                 in virtual memory.eC              When the assembler encounters a .PSECT directive thatuD              specifies a new program section name, it creates a newB              program section and stores the name, attributes, andF              alignment of the program section. The assembler includesG              all data or instructions that follow the .PSECT directiveeH              in that program section until it encounters another .PSECTG              directive. The assembler starts all program sections at a -              relative location counter of 0.rA              The assembler does not automatically define programeG              sections. Any code or data placed before the first .PSECT F              directive in the source code produces an assembly error.A              If the assembler encounters a .PSECT directive thateI              specifies the name of a previously defined program section,eC              it stores the new data or instructions after the lasteC              entry in the previously defined program section, evenmE              with program sections that have the OVR attribute. (OVR D              program sections from separate modules are overlaid byH              the linker. The OVR attribute does not affect how multipleD              contributions to a psect are processed within a singleF              assembly unit.) You need not re-list the attributes whenG              continuing a program section, but any attributes that areDG              listed must be the same as those previously in effect for F              the program section. A continuation of a program sectionI              cannot contain attributes conflicting with those specified,=              or defaulted, in the original .PSECT directive._H              The attributes listed in the .PSECT directive describe theE              contents of the program section. Except for the EXE andEF              NOEXE attributes, the assembler does not check to ensureF              that the contents of the program section actually adhereF              to the attributes listed. However, the assembler and theE              linker do check that all program sections with the samedF              name have exactly the same attributes. The assembler andD              linker display an error message if the program section,              attributes are not consistent.D              Program section names are independent of local symbol,B              global symbol, and macro names. You can use the sameI              symbolic name for a program section and for a local symbol,iF              global symbol, or macro name. You may want to use unique4              names for clarity and maintainability.        5-116    I                                                     Assembler DirectivesnI                                                                   .PSECTE        Notes I              o  The .ALIGN directive cannot specify an alignment greater-H                 than that of the current program section; consequently,F                 .PSECT should specify the largest alignment needed in%                 the program section.eH              o  For efficiency of execution and ease of programming, anG                 alignment of quadword or larger is recommended for all :                 program sections that have quadword data.        Examples2                .PSECT A,QUAD,EXE     ; Code psectI                                                                    5-117           Assembler Directives        .QUADhI        _________________________________________________________________         .QUADm(              Quadword storage directive        Format$              .QUAD  expression-list        Parameters              expression-lists:              One or more expressions separated by commas.        DescriptionE?              .QUAD generates 64 bits (8 bytes) of binary data.e        Notes E              o  This directive can only be used 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 directive B                 aligns the current location counter to a quadword=                 (64-bit) boundary before allocating storage.         Examples                A:: .QUAD 4         5-118_ _ _I                                                     Assembler DirectivescI                                                                  .REPEATeI        _________________________________________________________________         .REPEAT         .REPT.$              Repeat block directive        Format               .REPEAT expression                 .                 .                 .              range                  .                 .                 .              .ENDR         Parameters              expressionD              An expression whose value controls the number of timesC              the range is to be assembled within the program. WhenoF              the expression is less than or equal to zero, the repeatE              block is not assembled. The expression must be absolutetH              or relocatable and must not contain any undefined symbols.H              The assembler converts a relocatable value to the relative&              offset within the psect.              rangea@              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. I                                                                    5-119  A          Assembler Directives        .REPEAT_        Description C              .REPEAT repeats a block of code a specified number of H              times, in line with other source code. The .ENDR directive-              specifies the end of the range.l        Notest8                 The alternate form of .REPEAT is .REPT.        Examples                 Example 1@                 The following macro definition uses the .REPEATF                 directive to store an ASCII string a specified number3                 of times, followed by a zero byte:t*                .MACRO  COPIES  STRING,NUM                .REPEAT NUMo                 .ASCII  "STRING"                .ENDRr                .BYTE   0e                .ENDM   COPIES                 Example 2C                 The following macro call stores five copies of thebG                 string "ABCDEF". This example is divided into 4 parts:f"                 Macro invocation:"                COPIES  <ABCDEF>,57                 Macro expansion of .REPEAT invocation:O                  .REPEAT 5o"                  .ASCII  "ABCDEF"                  .ENDRd#                 .REPEAT expansion: "                  .ASCII  "ABCDEF""                  .ASCII  "ABCDEF""                  .ASCII  "ABCDEF""                  .ASCII  "ABCDEF""                  .ASCII  "ABCDEF"        5-120  r eI                                                     Assembler Directives I                                                                  .REPEAT (                 End of macro expansion:                  .BYTE   0s                 Example 3D                 The following macro call stores three copies of theH                 string "How Many Times". This example is divided into 4                 parts: "                 Macro invocation:                VARB = 3/                  COPIES  <How Many Times>,VARBb7                 Macro expansion of .REPEAT invocation:                 .REPEAT VARB*                  .ASCII  "How Many Times"                  .ENDRs#                 .REPEAT expansion:p(                .ASCII  "How Many Times"*                  .ASCII  "How Many Times"*                  .ASCII  "How Many Times"(                 End of macro expansion:                  .BYTE   0nI                                                                    5-121             Assembler Directives        .RESTORE_PSECTI        _________________________________________________________________         .RESTORE_PSECT        .RESTORE@              Restore previous program section context directive        Format              .RESTORE_PSECT              .RESTORE        DescriptionG              .RESTORE_PSECT retrieves the program section from the toprH              of the program section context stack, an internal stack inF              the assembler. If the stack is empty when .RESTORE_PSECTF              is issued, the assembler displays an error message. WhenE              .RESTORE_PSECT retrieves a program section, it restores G              the current location counter to the value it had when thetG              program section was saved. The maximum stack level is 50. F              See the description of .SAVE_PSECT for more information.        Notes B              o  The alternate form of .RESTORE_PSECT is .RESTORE.D              o  You cannot use .RESTORE_PSECT to overwrite previousH                 data storage initializations. In the following example,E                 MACRO-64 attempts to store "42" over "43" and fails,s+                 resulting in a diagnostic.                  .PSECT Ac                 .SAVE PSECT                 .PSECT Am                 .QUAD 43h                 .RESTORE PSECT:                 .QUAD 42m        5-122o l lI                                                     Assembler DirectivesaI                                                           .RESTORE_PSECTr        Examples'                    .PSECT A,QUAD,NOEXEi                A1: .WORD 5                 A2: .QUAD 6/>                    .SAVE_PSECT        ; Saves psect A context'                    .PSECT B,QUAD,NOEXEL                B1: .WORD 6iB                    .RESTORE_PSECT     ; Return A location counter                A3: .WORD 5o'                    .PSECT B,QUAD,NOEXEl                1$: .WORD 5                      .SAVE LOCAL_4        BLOCK  ; Saves psect B context and temporary6                                       ; label context"                    .PSECT C,NOEXE                1$: .WORD 6 C                    .RESTORE_PSECT     ; Restores psect B and saves 6                                       ; label contextB                    .ADDRESS 1$        ; References the address ofC                                       ; psect B temporary label 1$ I                                                                    5-123n n n        Assembler Directives        .SAVE_PSECTcI        _________________________________________________________________         .SAVE_PSECTa        .SAVE <              Save current program section context directive        Format(              .SAVE_PSECT  [LOCAL_BLOCK]"              .SAVE  [LOCAL_BLOCK]        Description G              .SAVE_PSECT stores the current program section context on G              the top of the program section context stack, an internalD              assembler stack. It leaves the current program sectionF              context in effect. The program section context stack canE              hold up to 50 entries. Each entry includes the value ofSI              the current location counter and the maximum value assignedIH              to the location counter in the current program section. IfI              the stack is full when .SAVE_PSECT is encountered, an errori              occurs.iA              If the LOCAL_BLOCK option is specified, the current E              temporary label block is saved with the current program.              section context.E              .SAVE_PSECT and .RESTORE_PSECT are especially useful insI              macros that define program sections. See the description ofe>              .RESTORE_PSECT for an example using .SAVE_PSECT.        NotesS<                 The alternate form of .SAVE_PSECT is .SAVE.        5-124  a rI                                                     Assembler DirectiveshI                                                              .S_FLOATINGaI        _________________________________________________________________e        .S_FLOATINGhG              Single-precision IEEE floating-point arithmetic directiveh        Format5              .S_FLOATING  floating-point-number-listi        Parameters(              floating-point-number-listF              A list of IEEE single-precision floating-point constantsI              separated by commas. For more information on floating-point;)              numbers, see Section 2.3.2.a        Descriptionw@              .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-,H              point data (1 bit of sign, 8 bits of exponent, and 23 bitsE              of fractional significance). See the description of .T_gB              FLOATING for information on storing double-precisionA              floating-point IEEE numbers and the descriptions of H              .D_FLOATING, .F_FLOATING, and .G_FLOATING for descriptions.              of other floating-point numbers.        Notes E              o  This directive can only be used within data or mixed A                 psects (psects that have either the NOEXE or MIXeD                 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-p9                 bit) boundary before allocating storage.o        Examples)                .S_FLOATING 2.0,3.0,4.405 I                                                                    5-125  t h        Assembler Directives        .SHOW I        _________________________________________________________________         .SHOWo        .NOSHOW_8              Listing inclusion and exclusion directives        Format$              .SHOW  [argument-list]&              .NOSHOW  [argument-list]        Parameters              [argument-list] B              Use one or more of the symbolic arguments defined inF              Table 5-7. You can use either the long form or the shortG              form of the arguments. If you specify multiple arguments,F              you must separate them by commas. If any argument is notC              specifically included in a listing control statement,_F              the assembler assumes its default value (show or noshow),              throughout the source program.I        Table_5-7_.SHOW_and_.NOSHOW_Symbolic_Arguments___________________                         ShortI        Long_Form_______Form______Default___Function_____________________tI        CONDITIONALS    CND       Noshow    Lists unsatisfied conditionale@                                            code associated withD                                            the conditional assembly7                                            directives. H        EXPANSIONS      ME        Noshow    Lists macro and repeat range7                                            expansions.e>        LIBRARY         None      Noshow    Includes the macroD                                            definitions in a library;                                            in the listing. F        INCLUDE         None      Noshow    Lists include file text inI        ____________________________________the_listing_file.____________i        5-126    lI                                                     Assembler Directives I                                                                    .SHOWa        DescriptionrF              .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.fI              When you use them with an argument list, .SHOW includes andtF              .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.oF              When the listing level count is negative, the listing isH              suppressed, unless the line contains an error. Conversely,C              when the listing level count is positive, the listingpC              is generated. When the count is 0, the line is eitheruI              listed or suppressed, depending on the value of the listingt)              control symbolic arguments.r        NoteseC              o  The listing level count allows macros to be listedtD                 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 too$                 its original value.G              o  The alternate forms of .SHOW and .NOSHOW are .LIST and                  .NLIST.E              o  The initial setting for each list .LIST/.SHOW optioneD                 is obtained from the command line setting using theF                 /SHOW qualifier. For more information on command line-                 qualifiers, see Section 1.2. I                                                                    5-127s h a        Assembler Directives        .SHOWo        ExamplesH                .NOSHOW   ; Turn off listing file display.  Counter < 0.                   .                   .                   .G                .SHOW     ; Turn on listing file display.  Counter = 0.A<                          ; Value of .SHOW options are used.                   .                   .                   .A                .SHOW     ; Counter > 0.  Listing file display is-E                          ; on for all options regardless of setting.l                   .                   .                   .        5-128r f eI                                                     Assembler DirectivesoI                                                             .SIGNED_BYTEtI        _________________________________________________________________         .SIGNED_BYTE+              Signed byte storage directive        Format+              .SIGNED_BYTE  expression-list         Parameters              expression-listsG              An expression or list of expressions separated by commas._G              Each expression specifies a value to be stored. The valuee5              must be in the range -128 through +127.p        Description G              .SIGNED_BYTE generates successive bytes of binary data inrI              the object module and performs signed range checking. Apart G              from the range check, .SIGNED_BYTE is equivalent to .BYTE %              for storage allocation.d        NotesiE                 This directive can only be used within data or mixedA                 psects (psects that have either the NOEXE or MIX.D                 attributes). For more information, see Section 5.1.        Examples                .PSECTA,NOEXEc>                .SIGNED_BYTE   LABEL1-LABEL2  ;  Data must fit=                .SIGNED_BYTE   -126           ;     in a byte I                                                                    5-129             Assembler Directives        .SIGNED_WORDI        __________________________________________________________________        .SIGNED_WORD+              Signed word storage directiveA        Format+              .SIGNED_WORD  expression-list         Parameters              expression-list G              An expression or list of expressions separated by commas. G              Each expression specifies a value to be stored. The value ;              must be in the range -32,768 through +32,767.        DescriptionsG              .SIGNED_WORD generates successive words of binary data in I              the object module and performs signed range checking. ApartsG              from the range check, .SIGNED_WORD is equivalent to .WORD -              in terms of storage allocation.         NotesdE              o  This directive can only be used within data or mixedvA                 psects (psects that have either the NOEXE or MIXiD                 attributes). For more information, see Section 5.1.G              o  If automatic data alignment is enabled, this directivehG                 aligns the current location counter to a word (16-bit)n4                 boundary before allocating storage.        Examples"                .PSECT $DATA,NOEXE$                .SIGNED_WORD -32766;9                .SIGNED_WORD 32769 ;causes assembly error         5-130    -I                                                     Assembler Directives I                                                                .SUBTITLEuI        _________________________________________________________________i        .SUBTITLEc        .SBTTL(              Listing subtitle directive        Format'              .SUBTITLE  quoted-literalm$              .SBTTL  quoted-literal        Parameters              quoted-literalH              An ASCII string enclosed in quotes from 1 to 31 charactersI              long; excess characters are truncated. For more information 2              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 listing D              page. This subtitle text is printed on each page untilI              altered by a subsequent .SUBTITLE directive in the program.         Noteso;              o  The alternate form of .SUBTITLE is .SBTTL.c              oPB              o  This directive also accepts VAX MACRO syntax. SeeC                 VAX MACRO and Instruction Set Reference Manual fore                 details.         Examples5                .SUBTITLE "Terminal Display Routines"AI                                                                    5-131"           Assembler Directives        .T_FLOATING I        _________________________________________________________________         .T_FLOATING G              Double-precision IEEE floating-point arithmetic directive         Format5              .T_FLOATING  floating-point-number-listo        Parameters(              floating-point-number-listF              A list of IEEE double-precision floating-point constantsI              separated by commas. For more information on floating point )              numbers, see Section 2.3.2.b        Descriptionc@              .T_FLOATING evaluates the specified floating-pointD              constants and stores the results in the object module.G              .T_FLOATING generates 64-bit, double-precision, floating-MI              point data (1 bit of sign, 11 bits of exponent, and 52 bitsAE              of fractional significance). See the description of .S_ B              FLOATING for information on storing single-precisionE              floating-point IEEE numbers and the descriptions of .D_ F              FLOATING, F_FLOATING, and G_FLOATING for descriptions of+              other floating-point numbers._        Notes_E              o  This directive can only be used 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 directive B                 aligns the current location counter to a quadword=                 (64-bit) boundary before allocating storage.w        Examples(                .T_FLOATING 4.5036,6.034        5-132  n  I                                                     Assembler Directives I                                                                   .TITLE I        _________________________________________________________________h        .TITLE%              Listing title directive         Format3              .TITLE  module-name ["listing-title"]T        Parameters              module-nameEI              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"cF              Optional quoted literal that specifies a title to appearI              within the first line of each listing output file. For moreS>              information on quoted literals, see Section 2.4.        Description 9              .TITLE assigns a name to the object module.a        Notes ?              o  The module name specified with .TITLE bears no E                 relationship to the file specification of the object G                 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.rI              o  If .TITLE is not specified, MACRO-64 assigns the default E                 name (.MAIN.) to the object module. If more than oneLI                 .TITLE directive is specified in the source program, the G                 last .TITLE directive encountered establishes the name .                 for the entire object module.B              o  This directive also accepts VAX MACRO syntax. SeeC                 VAX MACRO and Instruction Set Reference Manual forf                 details. I                                                                    5-133          Assembler Directives        .TITLE        Examples0                .TITLE "MAIN" "Main Entry Point"        5-134_ _ _I                                                     Assembler DirectivesoI                                                                    .WARNCI        _________________________________________________________________        .WARNS              Warning directivem        Format#              .WARN  quoted-literalm        Parameters              quoted-literalG              The string of characters enclosed in quotes are displayedxG              during assembly. For more information on quoted literals,               see Section 2.4.        Description H              .WARN causes the assembler to display a warning message onG              the terminal or in the batch log file, and in the listing %              file (if there is one).E        Notes,F              o  .PRINT, .WARN, and .ERROR are directives that displayB                 messages. You can use them to display information?                 indicating an unexpected or important assembly.                 condition. B              o  This directive also accepts VAX MACRO syntax. SeeC                 VAX MACRO and Instruction Set Reference Manual forS                 details.s        Examples:                .WARN "Illegal parameter value; 0 assumed"                ^                %MACRO64-W- F        GENWARN, Generated WARNING: Illegal parameter value; 0 assumed?                at line number 3 in file DISK$:[TEST]WARN.M64;2 I                                                                    5-135_ _ _        Assembler Directives        .WEAK I        _________________________________________________________________m        .WEAK -              Weak symbol attribute directive         Format               .WEAK  symbol-list        Parameters              symbol-list 8              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.SF              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, E              it uses that definition. If the linker does not find anaI              external definition, the symbol has a value of zero and the,I              linker does not report an error. The linker does not searchtI              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'sxG              symbol table. Consequently, searching the library at link I              time to resolve this symbol does not cause the module to be              included.v        5-136    _I                                                     Assembler DirectivesI                                                                    .WEAKs        Examples                    .WEAK A,B,CE                A:: .WORD 5     ; A and B are weak global definitions                 B:: .QUAD 6 @                    .ADDRESS C  ; C is a weak external referenceI                                                                    5-137    o        Assembler Directives        .WORDnI        _________________________________________________________________         .WORDb$              Word storage directive        Format$              .WORD  expression-list        Parameters              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 the               object module.        Notes A              o  The expression is first evaluated as a quadword, F                 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 assemblerwC                 displays an error if the high-order 6 bytes of theeD                 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  This directive can only be used 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 directiveoG                 aligns the current location counter to a word (16-bit)g4                 boundary before allocating storage.        5-138H i uI                                                     Assembler DirectivesI                                                                    .WORD         Examples                .WORD 5,6,7eI                                                                    5-139n   I                                                                        6nI        _________________________________________________________________eI                                                 MACRO-64 Supplied MacroseE              This chapter describes the library macros supplied withtG              the MACRO-64 assembler. These macros make it easy for youeH              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.t%        6.1 MACRO-64 Supplied LibraryeF              The MACRO-64 assembler provides a library of macros thatI              help you to program in conformance with the OpenVMS Calling F              Standard. This library also allows you to define you ownH              opcodes. This library, called MACRO64.MLB, is installed on6              your system with the MACRO-64 assembler.G              The MACRO-64 assembler automatically adds the MACRO64.MLBLE              library to the library list before it begins processingoG              your source program. Consequently, you do not need to addt7              it manually using the .LIBRARY directive.n?              The following macros are supplied by the MACRO-64              Assembler.                  $BEGIN_EPILOGUE                 $CALL                 $CODE_SECTION                 $DATA_SECTION                 $END_EPILOGUE                 $END_PROLOGUE                 $END_ROUTINE                  $LINKAGE_PAIR!                 $LINKAGE_SECTION                  $OPDEFu&                 $PROCEDURE_DESCRIPTOR                 $RETURNI                                                                      6-1  .           MACRO-64 Supplied Macros%        6.1 MACRO-64 Supplied Libraryl                 $ROUTINE G              Also, Appendix B explains how to program more effectively G              using the MACRO-64 assembly language within the framework.              of the OpenVMS Calling Standard.&        6.2 Routines and Lexical ScopeF              The calling-standard macros use the concept of a single,H              current, active routine. A routine is simply a programmingC              entity that is associated with a procedure descriptorG              that may be called, or is a main routine specified as the 1              transfer address of a linked image.aI              Only one routine can be active or current at any given time E              during assembly. If more than one routine is defined incG              a single assembler source file, all items associated witheF              the current routine, that is within the lexical scope ofF              the routine, must be completed before making a differentF              routine current. The lexical scope of one routine cannot;              overlap the lexical scope of another routine. G              A routine becomes current or comes into scope by invoking I              the $ROUTINE macro with the appropriate arguments. $ROUTINEpH              marks the beginning of the lexical scope of a routine. TheE              complementary macro, $END_ROUTINE, marks the end of the .              current routine's lexical scope.+        6.2.1 Routines and Program Sections G              Routines have three types of associated program sections: E              o  Code section-Contains the executable instructions of E                 the routine. This section is typically read only and                  executable.B              o  Data section-Contains data accessed by a routine.B                 Typically, this is where variable data is stored.D                 This section is typically non-executable, readable,                 and writeable. ?              o  Linkage section-Contains a routine's procedureE                 descriptor and the necessary linkage information for G                 calling other routines, and for linkage to data not in H                 the linkage section, if any. Also, constant data may beF                 placed here. Typically, this section is read only and                  not executable.         6-2c k SI                                                 MACRO-64 Supplied Macros I                                           6.2 Routines and Lexical ScopeiI                 The linkage section is considered a type of data section -                 with the following function:fF                 -  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 descriptor =                    so that calls can be made to the routine.4                 -  Defines constant or static data.4        6.3 Using Macros to Control Program SectionsD              The following section explains how to use the MACRO-64G              supplied macros to define and control the various program_'              sections during assembly.T'        6.3.1 Defining Program SectionsiG              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:xF              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 psects                 current. 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 makesiG              the linkage psect associated with the current routine theo              current psect.D              You can also control the psect name and attributes forG              each of the program sections by defining arguments to the_D              $ROUTINE macro. For more information, see Section 6.7.I                                                                      6-3h i i         MACRO-64 Supplied Macros4        6.3 Using Macros to Control Program Sections*        6.3.2 Using Macro Specific SymbolsF              The following symbols are defined by the $ROUTINE macro.A              These symbols are useful while programming with thefE              calling-standard macros to refer to particular data ande$              linkage section items:@              o  $CS-The address of the beginning of the current(                 routine's code section.@              o  $LS-The address of the beginning of the current+                 routine's linkage section.g@              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).nG              o  $SIZE-The size of the fixed stack area in bytes. $SIZEsC                 is defined using the value specified with the SIZEi                 argument.F              o  $RSA_OFFSET-The offset within the fixed stack area toI                 the register save area. $RSA_OFFSET is defined using the >                 value specified with the RSA_OFFSET argument.G              o  $RSA_END-The offset within the fixed stack area to thelE                 first byte beyond the end of the register save area.nH              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 storeEH              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 stacklI              using the $STACK_ARG_SIZE symbol. For more information, seee7              the description of $CALL in this chapter.i         6-4l F mI                                                 MACRO-64 Supplied MacroseI                             6.3 Using Macros to Control Program Sections%        6.3.3 Defining Procedure Typel@              The OpenVMS Calling Standard defines four types ofB              routines; stack, register, null, and bound. For moreD              information on types of routines, see Section B.4, and+              the OpenVMS Calling Standard.p?              You can define the routine type by using the KINDdE              keyword argument with $ROUTINE or $PROCEDURE_DESCRIPTORiC              macros. The validity and values of other $ROUTINE and C              $PROCEDURE_DESCRIPTOR macro parameters are determinedIC              by the type of routine being declared. For example, a B              null procedure type has no stack size, therefore theC              SIZE parameter is invalid and cannot be specified fortE              a null procedure type. When using the KIND keyword withID              the $ROUTINE or $PROCEDURE_DESCRIPTOR macros, note the#              following exceptions: G              o  The $SIZE symbol defined by $ROUTINE is only valid forv-                 stack and register routines. I              o  The $RSA_OFFSET symbol defined by $ROUTINE is only valid%                 for a stack routine./        6.3.4 Using Macros in Prologue Sections B              With stack and register routines, $ROUTINE generates9              a standard prologue sequence if you specify :              the STANDARD_PROLOGUE=TRUE keyword argument.D              STANDARD_PROLOGUE=TRUE is the default for register and              stack routines.tD              Alternatively, you can code your own prologue sequenceC              by specifying the STANDARD_PROLOGUE argument as FALSEeB              and using the $END_PROLOGUE macro to mark the end ofC              your prologue sequence. In this case, you may wish to C              use the $SIZE and $RSA_OFFSET symbols to symbolicallypI              specify the fixed stack size and register save area offset,l              respectively. >              For more information on the prologue sequence ofH              instructions that must occur at the beginning of all stackF              and register routines, see the OpenVMS Calling Standard.I                                                                      6-5             MACRO-64 Supplied Macros4        6.3 Using Macros to Control Program Sections/        6.3.5 Using Macros in Epilogue SectionsdG              With stack and register routines, you can use the $RETURNlD              macro to generate an epilogue sequence. Alternatively,?              you can code your own epilogue sequence using thedB              $BEGIN_EPILOGUE and $END_EPILOGUE macros to mark the;              beginning and end of your epilogue sequences. F              The OpenVMS Calling Standard also describes the epilogueI              sequence of instructions that must be executed every time a_>              stack or register routine returns to its caller.6        6.4 Programming Examples Using Supplied MacrosI              The following program examples show how to use the calling- I              standard macros to define a routine, switch control between I              psects, generate an epilogue sequence, and end the routine. 7              Example 6-1 Program Using Supplied MacrosN                      $ROUTINE MAIN, KIND=STACK,      - ; Stack routine kind 1N                          SAVED_REGS=<FP>,            - ; Saves FP           2N                          SIZE=48                       ; Stack size is 48   3X                      $LINKAGE_SECTION                  ; Switch to the linkage psect. 4I              X:      .long 6                           ; X is a constantdI              FP1_ADDR:                                 ; FP1_ADDR -> FP1e"                      .address FP1V                      $DATA_SECTION                     ; Switch to the data section 5I              A::     .blkw 5                           ; $DS points here              B::     .blkw V                      $CODE_SECTION                     ; Switch to the code section 6K                                                        ; ($CS points here)e                             .                             .                             .W                      $RETURN                           ; Perform epilogue and return 7rW                      $END_ROUTINE MAIN                 ; Mark the end of the routine 8 G              1  $ROUTINE defines the routine MAIN. The routine type is H                 defined as a stack routine using the kind=stack keyword                 argument.         6-6     I                                                 MACRO-64 Supplied Macros I                           6.4 Programming Examples Using Supplied Macros D              2  The keyword argument SAVED_REGS=<FP> adds the frameG                 pointer register to the list of registers saved on theF                 stack by the prologue code. The saved_regs keyword isG                 valid only for stack procedures. If you do not specifynI                 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 andI                 stack routines. If you do not specify a stack size for aaI                 stack or register routine, $ROUTINE computes the minimumsF                 stack size required to accomodate the other arguments5                 you specify or leave as the default. B              4  The LINKAGE_SECTION macro switches to the linkageF                 section. The $LS symbol created by the $ROUTINE macroC                 can be used to point to the address of the current @                 routine's linkage section. $ROUTINE creates theE                 procedure descriptor and leaves the current locationlC                 counter within the linkage section just beyond thew&                 procedure descriptor.E              5  The DATA_SECTION macro switches to the data section.rI                 The $DS symbol created by the $ROUTINE macro can be usedF                 to point to the address of the current routine's data                 section.yE              6  The CODE_SECTION macro switches to the code section. E                 The $CS symbol created by the $ROUTINE macro is usedaF                 to point to the address of the current routine's code                 section.@              7  The $RETURN macro generates a standard epilogueG                 instruction sequence. You can use this macro only with-D                 stack or register routine defined with the $ROUTINE                 macro.E              8  The $END_ROUTINE macro marks the end of the routine. I                                                                      6-7           MACRO-64 Supplied Macros!        6.5 Using the $CALL Macro !        6.5 Using the $CALL MacroG              $CALL calls local or external routines previously defined C              by the $ROUTINE macro or defined in another language._E              To call a routine using standard linkage, use the $CALL I              macro. You invoke this macro from within the routine's codeb<              section. $CALL performs the following actions:H              o  Searches a list of linkage pairs referenced in previousI                 invocations of the $CALL and $LINKAGE_PAIR macros withineH                 the calling routine. If a linkage pair is already foundB                 to exist on the list, $CALL uses the linkage pairF                 stored from the previous invocation. Otherwise, $CALLE                 stores the linkage pair of the called routine in thegF                 caller's linkage section and adds the linkage pair to#                 the caller's list.yC              o  Allocates stack space for arguments, if necessary.tF              o  Loads arguments specified with the ARGS argument intoG                 argument registers and onto the stack, as appropriate. 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 linkage.I                 pair generated from above, and the value of Rls, linkage G                 register, which is assumed to point to the base of theP!                 linkage section:GT                          LDQ R26, code_addr_offset(Rls)         ; load code addressQ                          LDQ R27, proc_desc_addr_offset(Rls)    ; load procedure U                                                                 ; descriptor address B                                                                 ;V                          JSR R26, R26                           ; Jump to the routineU                                                                 ;  saving the returnaR                                                                 ;  address in R26F              o  Frees argument stack space, if any, and if the called=                 routine doesn't return a value on the stack.rG                 Like $ROUTINE, the $CALL macro invokes other macros toy)                 perform the above tasks.p         6-8    tI                                                 MACRO-64 Supplied MacrosdI                                                6.5 Using the $CALL Macro ?                 If you do not specify the Rls argument in youraF                 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:                  .BASE R27, $LS F                 This source statement defines the base address of theI                 linkage section to be R27, and to be associated with thetI                 macro symbol $LS. This source statement should be placedoC                 in your source code prior to the $CALL macro call.,(        6.5.1 Using $CALL in Source CodeG              Example 6-2 uses the source code from Example 6-1, exceptE              it uses the $CALL macro to show how to call a local ands              external routine.oI                                                                      6-9    e         MACRO-64 Supplied Macros!        6.5 Using the $CALL Macron-              Example 6-2 Program Using $CALLb                          .                           .y                          . T                      $CODE_SECTION                     ; Switch to the code sectionK                                                        ; ($CS points here)o                          .i                          .n                          . )                      MOV     R27,R2    1 )                      .base   R2, $LS   2e                          .o                          .                           . W                      $CALL SUB1                        ; Call external routine SUB1  3dW                      $CALL SUB2, LOCAL=TRUE            ; Call local routine SUB2     4                          .s                          .f                          . U                      $RETURN                           ; Perform epilogue and returnrU                      $END_ROUTINE MAIN                 ; Mark the end of the routineC              1  The $LS symbol is defined to be the address of theeF                 procedure that is defined within the linkage section.H                 The calling routine places the address of the procedure?                 descriptor in R27 before making the call. This G                 guarantees that the address associated with the symboleC                 $LS is stored in R27 upon routine entry. Since the E                 information in R27 is erased during a standard call,u4                 a copy is preserved in register R2.F              2  Register R2 now contains the address of our procedureE                 descriptor, which is the base address of our linkagepC                 section. Since $LS is defined to point to the baseeG                 address of the linkage section, the assembler computesrG                 the offsets within the linkage section using the .BASE                  directive.$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.x         6-10 n I                                                 MACRO-64 Supplied Macros I                                           6.6 Programming Considerations &        6.6 Programming ConsiderationsH              This section discusses some programming considerations youI              need to be aware of when using the calling-standard macros.o9        6.6.1 Making Multiple Calls From the Same Routine A              The $CALL macro generates the following instructionh              sequence:bY                  LDQ R26, code_address_offset(Rls)                   ; load code address V                  LDQ R27, procedure_descriptor_address_offset(Rls)   ; load procedureU                                                                      ;    descriptor R                                                                      ;    addressG                  JSR R26, R26                                        ;lC              The contents of R26 and R27 are erased as a result ofdG              using the $CALL macro. This is important since Rls in thetF              previous sequence is typically R27. Thus, if you requireE              subsequent access to your linkage section, such as whenaI              making subsequent calls, you need to make a working copy ofsI              R27 to use after the first call. Example 6-2 shows how thist               technique is used.H              Note that $CALL also overwrites the values in the argumentB              registers and the scratch registers specified or theE              default set by the SCRATCH_REGS argument, when you passv-              arguments to the called routine "        6.6.2 Non-Standard LinkageE              Under certain circumstances, there may be advantages inuI              using a non-standard routine linkage. For more information,$>              see Appendix B and the OpenVMS Calling Standard."        6.6.3 Routine RestrictionsE              Different routine types have different capabilities and_B              restrictions. For example, only a stack routine thatD              specifies BASE_REG_IS_FP=TRUE can make standard calls.G              For more information, see the description for $ROUTINE in               this chapter.A              For a description of the different capabilities and A              restrictions associated with each routine type, see ;              Section B.4 and the OpenVMS Calling Standard.rI                                                                     6-11t   t         MACRO-64 Supplied Macros        6.7 Macro Descriptions        6.7 Macro DescriptionsA              This section provides a detailed description of theo(              following MACRO-64 macros:                  $BEGIN_EPILOGUE                 $CALL                 $CODE_SECTION                 $DATA_SECTION                 $END_EPILOGUE                 $END_PROLOGUE                 $END_ROUTINE                  $LINKAGE_PAIR!                 $LINKAGE_SECTION                  $OPDEF &                 $PROCEDURE_DESCRIPTOR                 $RETURN                 $ROUTINE        6.7.1 Syntax Rules?              You may use either positional or keyword argumentr@              association or a combination of the two with theseE              macros. For positional association, the order of formalnH              arguments is shown with the format of each macro. For moreE              information on argument association, see Chapter 4. TheRF              following syntax rules apply when invoking the assembler<              using the command line qualifier /NAMES=as_is:H              o  When specifying macro names, you must use all uppercaseA                 or all lowercase characters. You cannot use botho1                 uppercase and lowercase letters. I              o  When specifying keyword arguments, you must use the same I                 alphabetic case as the macro name it is associated with.rI                 If you use lowercase characters with the macro name, you$I                 must use lowercase characters with the keyword argument.aI                 If you use uppercase characters with the macro name, youyI                 must use uppercase characters with the keyword argument.          6-12 e cI                                                          MACRO-64 Macros I                                                          $BEGIN_EPILOGUETI        _________________________________________________________________         $BEGIN_EPILOGUEdF              Marks the beginning of an epilogue instruction sequence.        Format              $BEGIN_EPILOGUEe        DescriptionO@              $BEGIN_EPILOGUE marks the beginning of an epilogueB              instruction sequence that you code within a stack or?              register routine defined with the $ROUTINE macro.OE              At each point where a stack or register routine returnseC              to its caller, the routine must perform a sequence of F              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, youiF              must mark the beginning and end of the epilogue sequence@              with the $BEGIN_EPILOGUE and $END_EPILOGUE macros.        NotesyA                 You must not use $BEGIN_EPILOGUE for an epiloguenC                 instruction sequence generated by $RETURN. $RETURNfI                 automatically invokes $BEGIN_EPILOGUE and $END_EPILOGUE.sI                                                                     6-13            MACRO-64 Macrost        $BEGIN_EPILOGUE.        ExamplesB                        $ROUTINE MUMBLE, KIND=REGISTER, SAVE_FP=R1                            :e                            :a                            :s'                        $BEGIN_EPILOGUEcL                        MOV     R1,FP               ; Restore caller's frameF                        RET     (R26)               ; Return to caller%                        $END_EPILOGUEn                            :                             :                             : +                        $END_ROUTINE MUMBLE          6-14    I                                                          MACRO-64 Macros I                                                                    $CALL I        _________________________________________________________________         $CALLT/              Issues a call to another routine.s        Format0              $CALL  NAME=routine-being-called -5                     [Rls=linkage-section-register] - 3                     [LS=linkage-section-address] -t&                     [LOCAL=boolean] -+                     [ARGS=argument-list] -$3                     [SET_ARG_INFO=boolean-value] - 9                     [STACK_RETURN_VALUE=boolean-value] -6                     [SCRATCH_REGS=scratch_reg-list] -*                     [TIE=boolean-value] -S                     [FUNC_RETURN={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.o              RlsnF              Linkage section register to use when generating the LDQ,G              LDQ, JSR instruction sequence. This argument is optional.gE              If Rls is omitted, $CALL assumes that you have issued avF              .BASE directive prior to invoking $CALL that establishesD              the value of a base register pointing into the linkageB              section. If you omit the Rls argument and you do notG              issue such a .BASE directive prior to invoking $CALL, theiE              assembler issues the following error message during the $              $CALL macro expansion:T                  "Argument 2 invalid"  The assembler failed to find a base registerO                   specified with a previous .BASE directive to form a registere5                   expression of the form offset(Rn)"LI                                                                     6-15  b c        MACRO-64 Macros         $CALLc              LSB              LS is the address of the linkage section. If you useC              $CALL within a routine defined by the $ROUTINE macro, C              the LS argument defaults to the $LS symbol defined bykE              $ROUTINE. If you use $CALL outside of a routine definedD              by the $ROUTINE macro, there are two ways that you canD              indicate the location of the linkage section to $CALL.B              First, you can specify the LS argument to $CALL as aD              relocatable address expression that indicates the baseH              of the linkage section. In this case you must also specifyI              the Rls argument. Second, you can specify both the linkage-aH              section base register and the linkage section address in aH              .BASE directive prior to invoking $CALL. In this case, you?              must omit both the Rls and LS arguments to $CALL. G              Digital recommends that you omit this argument if you use C              $CALL within a routine defined by the $ROUTINE macro.               LOCALH              A boolean value (TRUE or FALSE) that specifies whether theE              routine to be called is local to the module or globally G              visible. By default, $CALL generates a call to a globally F              visible routine. To generate a call to a routine that is@              not globally visible, you must specify LOCAL=TRUE.              ARGSA              An optional list of arguments to pass to the calledrF              routine. Enclose the argument list within angle bracketsD              (<>), and separate the arguments with commas (,).  YouE              can use the following qualifiers with each argument youiG              specify with the ARGS argument. Table 6-1 describes these G              qualifiers. Each argument is an address expression (which I              may include a register), followed by a qualifier. The table F              also contains the argument type, the instruction used toE              load the argument into a register, the instruction used'H              to store the argument on the stack, and the encodings usedD              in the Argument Information Register (R25) in the callH              signature block when you specify TIE=TRUE. See the OpenVMSG              Calling Standard for more information on these encodings.aG              Note that arguments are only stored on the stack if there B              are more than six arguments provided to the routine.         6-16    I                                                          MACRO-64 MacrosaI                                                                    $CALLeI              Table_6-1_ARGS_Arguments___________________________________i;              Argument                                  RegnG                      Argument  LOAD    STORE   AI      Arg     Mem Arg)I              QualifieType______InstructInstructionodingSignaturSignatureaC              /A      Address   LDA     STQ     I64     I64     I64 C              /D      D-        LDG     STG     FD      FD      I64                       floatingC              /F      F-        LDF     STF     FF      FF      I64                       floatingC              /G      G-        LDG     STG     FG      FG      I64a                      floatingC              /L      Longword  LDL     STQ     I64     I32     I32C              /Q      Quadword  LDQ     STQ     I64     I64     I64C              /S      S-        LDS     STS     FS      FS      I64                       floatingC              /T      T-        LDT     STT     FT      FT      I64t                      floatingC              /UL[1]  Unsigned  LDL     STQ     I64     U32     I64d$                      longword  /ZAP%                                #^xF0 I              [1]Unsigned_32-bit_integers_are_normally_passed_using______aD              the /L argument qualifier. Therefore, Digital does not@              recommend that you use the /UL argument qualifier.I              ___________________________________________________________s              SET_ARG_INFOC              An optional argument to indicate whether $CALL shouldfG              set the Argument Information (AI) register (R25) with theoG              appropriate argument information or not. By default or ifsI              you specify SET_ARG_INFO=TRUE, $CALL stores the appropriatemI              argument information in R25. If specify SET_ARG_INFO=FALSE,sE              $CALL does not affect R25. In this case, you must store I              the appropriate information in R25 yourself before invokingl              $CALL.               STACK_RETURN_VALUEF              An optional argument to indicate that the called routineE              returns a value on the stack. By default, $CALL assumes D              that the called routine does not return a value on theH              stack. In this case, $CALL removes any arguments passed toI                                                                     6-17             MACRO-64 Macros         $CALL G              the called routine from the stack when the called routinec              returns.E              If the called routine returns a value on the stack, the B              returned value is placed at a lower address than theD              arguments on the stack. In this case, you must specifyH              STACK_RETURN_VALUE=TRUE to prevent $CALL from removing theH              arguments to the called routine from the stack and erasingI              the value returned by the called routine. You must retrieve E              the return value and remove it from the stack. Then youF              can remove the arguments to the called routine using the6              $STACK_ARG_SIZE symbol defined by $CALL.              SCRATCH_REGSI              An optional list of scratch registers for $CALL to use when H              processing arguments passed to the called routine with theG              ARGS argument. If you pass more than six arguments to thewH              called routine, $CALL may need to use scratch registers to              process the call. @              By default, $CALL uses R0, R1, F0, and F1. You canE              cause $CALL to use different scratch registers with the $              SCRATCH_REGS argument.F              If you are passing integer arguments, you should specifyI              at least one integer register. If you are passing floating-.H              point arguments, you should specify at least one floating-              point register.wD              $CALL can process arguments to the called routine moreF              efficiently if you specify two or more scratch registersG              of the type or types appropriate to the arguments you aret              passsing.s              TIE D              A boolean value (TRUE or FALSE) that specifies whetherF              $CALL should generate a call sequence that is compatible@              with both native routines and the Translated ImageE              Environment (TIE). By default, $CALL generates a fasternI              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 F              routines. If you are calling a VAX routine in a sharableF              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 argument         6-18 u oI                                                          MACRO-64 MacrossI                                                                    $CALLuI              or specify TIE=FALSE. While $CALL generates a call sequence F              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_RETURN H              An optional argument used to indicate the type of functionC              return when you also specify TIE=TRUE. Note that this C              argument is ignored unless you also specify TIE=TRUE.rD              Specify one of I64, D64, I32, U32, FF, FD, FG, FS, FT,H              FFC, FDC, FGC, FSC, or FTC. These values correspond to theG              RASE$K_FR_* signature encodings described in table 3-7 inoF              the VMS 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.F                ________________________ Note ________________________B                Specification of the FUNC_RETURN argument does not@                in itself cause $ROUTINE to generate a procedureB                signature block. However, if you specify either orC                both the ARGLIST or USES_VAX_ARGLIST arguments, anySB                value you specify with the FUNC_RETURN argument isA                recorded in both the procedure descriptor and the *                procedure signature block.F                ______________________________________________________              USES_VAX_ARGLISTI              An optional argument to indicate whether the called routinecB              uses a VAX argument list. Note that this argument isI              ignored unless you also specify TIE=TRUE. By default, $CALLeD              assumes the called routine does not use a VAX argumentF              list. Specify USES_VAX_ARGLIST=TRUE to indicate that the6              called routine uses a VAX argument list.              SIGNATURE_BLOCK I              An optional argument that you can use to supply the addressdB              of the call signature block. Note that this argumentD              is ignored unless you also specify TIE=TRUE. Note alsoC              that you cannot specify a SIGNATURE_BLOCK argument inNE              combination with either of the FUNC_RETURN or USES_VAX_NC              ARGLIST arguments. By default, $CALL generates a call D              signature block for you when you specify TIE=TRUE, andD              you can in part control the contents of that signatureI                                                                     6-19r            MACRO-64 Macrosa        $CALL H              block with the FUNC_RETURN and USES_VAX_ARGLIST arguments.E              If you wish to define your own call signature block, dooG              not specify either of the FUNC_RETURN or USES_VAX_ARGLIST E              arguments and supply the address of your call signaturem6              block with the SIGNATURE_BLOCK argument.              NONSTANDARD D              A boolean value (TRUE or FALSE) that specifies whetherF              $CALL should suppress warning and informational messagesE              concerning non-standard usage. By default, $CALL issuesk@              warning and informational messages to indicate youD              are using $CALL in a way that violates the VMS CallingD              Standard or in a way that requires special programmingE              considerations. Specify NONSTANDARD=TRUE if you wish to &              suppress these messages.        DescriptionoE              $CALL issues a call to another routine and performs thee               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 inG                 the caller's linkage section and adds the linkage pairBH                 to the caller's list. If you use $CALL within a routineI                 defined with the $ROUTINE macro, $CALL and $LINKAGE_PAIRdB                 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.aB              5. Generates the instruction sequence shown below toA                 perform the actual call based on the location oftE                 the linkage pair generated from Step 1 above and the I                 address specified or defaulted with the LS argument. ThenG                 register specified with the Rls argument is assumed toeI                 point to the base of the linkage section as shown in the#                 following example:u         6-20 N II                                                          MACRO-64 MacrosNI                                                                    $CALL_\                     LDQ R26, code_address_offset(Rls)                   ; load code addressY                     LDQ R27, procedure_descriptor_address_offset(Rls)   ; load procedure X                                                                         ;    descriptorU                                                                         ;    address !                     JSR R26, R26UF              6. Frees argument stack space, if any, and if the called>                 routine does not return a value on the stack.        Examples                 Example 1>                    $CALL SUB1, Rls=R13, LS=MY_LINKAGE_SECTION1                    .BASE R13, MY_LINKAGE_SECTION                     $CALL SUB2A                    $ROUTINE SUB3, KIND=STACK, SAVED_REGS=<R2,FP>4$                    $LINKAGE_SECTION                    .QUAD 1                 XX: !                    $CODE_SECTION                     MOV R27, R2 "                    $CALL SUB4, R2!                    .BASE R2, $LS_                    $CALL SUB5!                    $CALL SUB6, -a+                       ARGS=<XX/A, R0/Q>, - -                       SCRATCH_REGS=<R22,R23> !                    $CALL SUB7, --)                       ARGS=<1/A,2/A,3/A>a                    $RETURN %                    $END_ROUTINE SUB3                  Example 2@                $CALL FOO, ARGS=<A,B,C,D,E,F,G,H>, STACK_RETURN_        VALUE=TRUEX                                                ; Fetch octaword return value from stack>                LDQ R4, 0(SP)                   ; low quadword?                LDQ R5, 8(SP)                   ; high quadword =                LDA SP, $STACK_ARG_SIZE+16(SP)  ; RESET STACKTI                                                                     6-21             MACRO-64 Macros-        $CODE_SECTIONaI        _________________________________________________________________i        $CODE_SECTIOND              Switches control to the current routine's code section              psect.        Format              $CODE_SECTION         DescriptionE              $CODE_SECTION switches control to the current routine's!              code section psect.         Examples                  $CODE_SECTIONa         6-22 o II                                                          MACRO-64 MacroscI                                                            $DATA_SECTIONoI        _________________________________________________________________         $DATA_SECTIONaD              Switches control to the current routine's data section              psect.        Format              $DATA_SECTION         DescriptiontE              $DATA_SECTION switches control to the current routine's !              data section psect.        Examples                $DATA_SECTION I                                                                     6-23d            MACRO-64 Macros         $END_EPILOGUEsI        _________________________________________________________________e        $END_EPILOGUE @              Marks the end of an epilogue instruction sequence.        Format              $END_EPILOGUEe        Description D              You can use the $END_EPILOGUE macro to mark the end ofE              an epilogue instruction sequence that you code yourself A              within a stack or register routine defined with the E              $ROUTINE macro. At each point where a STACK or REGISTERG              routine returns to its caller, the routine must perform aG              sequence of operations to restore any saved registers andH              to perform stack-frame management. This sequence is calledD              the epilogue and is described in detail in the OpenVMS              Calling Standard.eB              You can use the $RETURN macro to generate a standardC              epilogue instruction sequence for you. Alternatively, B              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 ands1              $END_EPILOGUE macros, respectively.iF              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.iE              The $END_ROUTINE macro invokes $END_EPILOGUE for you ifeE              you invoke the $BEGIN_EPILOGUE macro without a matchingnD              invocation of the $END_EPILOGUE macro. You must invokeE              $END_EPILOGUE with epilogue sequences that occur in the %              middle of your routine.i         6-24    I                                                          MACRO-64 MacrosAI                                                            $END_EPILOGUEc        ExamplesB                        $ROUTINE MUMBLE, KIND=REGISTER, SAVE_FP=R1                            :                             :                             :r'                        $BEGIN_EPILOGUEeL                        MOV     R1,FP               ; Restore caller's frameF                        RET     (R26)               ; Return to caller%                        $END_EPILOGUE                             :                            :g                            :_+                        $END_ROUTINE MUMBLE I                                                                     6-25_ t t        MACRO-64 Macrosr        $END_PROLOGUE I        _________________________________________________________________         $END_PROLOGUE ?              Marks the end of a prologue instruction sequence.F        Format              $END_PROLOGUE6        Description ?              $END_PROLOGUE marks the end of a routine prologue G              instruction sequence that you code yourself. The prologueoG              instruction sequence begins with the first instruction ofdE              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 use G              this macro when the routine type is stack or register and H              you specify STANDARD_PROLOGUE=FALSE to the $ROUTINE macro.        Notes_H                 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 for H                 you when you specify or leave the default of $ROUTINE's4                 STANDARD_PROLOGUE argument to TRUE.        Examples&                        MOV     SP, FP%                        $END_PROLOGUEC         6-26 s sI                                                          MACRO-64 MacrosoI                                                             $END_ROUTINE I        _________________________________________________________________         $END_ROUTINE)              Marks the end of a routine.         Format/              $END_ROUTINE  [name=routine-name]         Parameters              nameE              The name of the routine that is ended. This argument is I              optional. If you specify a name, $END_ROUTINE verifies thatCH              the name matches that which was specified with $ROUTINE toI              begin the routine. If the name does not match, $END_ROUTINEuF              issues a diagnostic message. There is no default. If youD              omit the name, $END_ROUTINE does not verify a matching              name.e        DescriptionCE              You must use this macro at the end of a routine that isuD              defined with the $ROUTINE macro to delimit the end theF              current routine and to perform final macro processing of              the routine.        Examples,                    $END_ROUTINE NAME=FOOZLEI                                                                     6-27    C        MACRO-64 Macrost        $LINKAGE_PAIReI        _________________________________________________________________e        $LINKAGE_PAIRE              Locates or defines a linkage pair in the linkage psect.        Format0              $LINKAGE_PAIR  name, local=boolean        Parameters              nameB              Name of the linkage pair to define. This argument is              required.e              localsH              A boolean value (TRUE or FALSE) that specifies whether theG              routine is defined within the module for not. The defaultaG              is to store a linkage pair for a global routine. You mustnF              specify LOCAL=TRUE to store a linkage pair for a routine+              that is not globally visible.c        DescriptionlE              You can invoke this macro to locate or define a linkagerB              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 D              $CALL use the same list of linkage pairs. The $ROUTINEH              macro resets this list. $LINKAGE_PAIR restores the current$              psect when it is done.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.         6-28 i eI                                                          MACRO-64 Macros I                                                            $LINKAGE_PAIR         Notes H                 Because the $CALL macro invokes the $LINKAGE_PAIR macroG                 for you, you do not need to use $LINKAGE_PAIR when youC                 are using $CALL. You may wish to use $LINKAGE_PAIRsC                 when you are not using $CALL or when you require ayG                 specific ordering or placement of linkage pairs withinn%                 the linkage section.T        Examples                    $LINKAGE_ C        PAIR SUB1          ; define linkage pair in linkage section                      LDQ R26, $LP"                    LDQ R27, $LP+8                     JSR R26, R26I                                                                     6-29  F          MACRO-64 Macros        $LINKAGE_SECTIONI        _________________________________________________________________t        $LINKAGE_SECTIONH              $LINKAGE_SECTION switches control to the current routine's$              linkage section psect.        Format              $LINKAGE_SECTION        Description_H              $LINKAGE_SECTION switches control to the current routine's$              linkage section psect.        Examples                 $LINKAGE_SECTION         6-30   hI                                                          MACRO-64 MacrosfI                                                                   $OPDEFoI        _________________________________________________________________         $OPDEF%              Used to define opcodes._        Format0              $OPDEF  MNEMONIC, FORMAT, ENCODING        Parameters              MNEMONICD              MNEMONIC is the mnemonic name by which the instructionD              is called. You may optionally specify a qualifier listF              separated from the name by a slash (/). A qualifier listD              is a sequence of one or more letters or digits with no/              intervening spaces or separators.t              FORMAT7              FORMAT is one of the following arguments: I        _________________________________________________________________.I        Format__________________________Description______________________T>        MEMORY                          Standard memory format5                                        instructions.eI        MEMORY_FUNCTION                 Memory format instructions with ae6                                        function code.B        JUMP                            Memory format instructionsI                                        formatted like jump instructions. >        BRANCH                          Standard branch format5                                        instructions. F        OPERATE                         Standard operate instructions.G        FLOATING_OPERATE                Standard floating-point operate 5                                        instructions.F        PAL                             Standard PALcode instructions.I        [<]CUSTOM[=operand_type_list>]__Custom_format.___________________DG              With the CUSTOM format, you may optionally specify a listG              of the types of operands the instruction is to accept. If G              you specify a list of operand types, you must enclose the H              entire FORMAT argument within angle brackets, and you mustH              specify the operand types in the order they are to be usedI                                                                     6-31t s p        MACRO-64 Macrosi        $OPDEFI              with the instruction. $OPDEF supports the following operands              types:B              IREGISTER        Integer register, such as R5 or SP.C              FREGISTER        Floating-point register, such as F7. F              LITERAL          Integer literal, such as #123 or 32767.I              INDIRECT         Indirect integer register notation such as $                               (R7).F              DISPLACEMENT     Indirect integer register notation withG                               an integer literal displacement, such asd(                               FOO(R12).G              BRANCH_OFFSET    Label or address expression, such as L1.n              For example:4              FORMAT=<CUSTOM=IREGISTER,DISPLACEMENT>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 for G              hexidecimal. Certain instruction formats allow multi-parta              encoding:          6-32    I                                                          MACRO-64 MacrosI                                                                   $OPDEF I              ___________________________________________________________ I              Format________________Encoding_Description_________________ H              MEMORY_FUNCTION       Specify the base opcode, followed byI                                    a dot, followed by the function code. 0                                    For example:6                                    ENCODING=^X10.F000G              JUMP                  Specify the base opcode, optionally H                                    followed by a dot, and the hardware-F                                    hint bits optionally followed by aG                                    dot and the software-hint bits. For ,                                    example:5                                    ENCODING=^X1A.2.1aH              OPERATE               Specify the base opcode, followed byI                                    a dot, followed by the function code. 0                                    For example:4                                    ENCODING=^X12.3C&                                    exH              FLOATING_OPERATE      Specify the base opcode, followed byI                                    a dot, followed by the function code. 0                                    For example:5                                    ENCODING=^X17.02B G              PAL                   Specify the base opcode, optionally F                                    followed by a dot and the functionF                                    code. Omit the function code for aH                                    generic PAL instruction that acceptsG                                    an integer-expression argument. ForR,                                    example:5                                    ENCODING=^X0.0080u1                                    ENCODING=^X19 I              CUSTOM                Specify a comma-separated list of bitiG                                    ranges and values to place in thoseC<                                    bit ranges. For example:J                                    ENCODING = < 26:31=^X14, 21:25=%OP1, -Q              ___________________________________16:20=%OP2.REG,_0:15=%OP2.DISP >_B              For CUSTOM format instructions, specify the ENCODINGI              argument as a comma separated list of bit ranges and values I              to place in those bit ranges. Enclose the list within angleE              brackets. I                                                                     6-33s           MACRO-64 Macros        $OPDEFF              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 integerEB              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 isA              referenced.DH              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.E              For IREGISTER, FREGISTER, and INDIRECT operands, $OPDEFI              places the 5-bit register number into the bit positions you               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 operandp>              literal value exceeds the bit range you specify.G              For DISPLACEMENT operands, $OPDEF defines two parts: a 5-pF              bit register number and a displacement value that can beI              up to 32-bits long. The most significant bits are truncatednI              from the displacement value if the size of the displacementH              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 the I              displacement value by placing .DISP after the operand name.t%              For example: %OP2.DISP. B              For BRANCH_OFFSET operands, $OPDEF stores the signedB              longword offset between the next instruction and theE              specified address in the bit positions you specify. The F              address expression specified for a BRANCH_OFFSET operandI              can be a backward or forward reference to a location withinnG              the current psect. It cannot be an external address or aniG              address in a different psect. The resulting offset can beUF              up to 32-bits in size. If the size of the offset exceeds         6-34  I                                                          MACRO-64 Macros I                                                                   $OPDEF F              the bit range you specify, the most significant bits are              truncated.G              $OPDEF fills any bit positions you leave unspecified with               zeros.        Description F              The $OPDEF macro can be used to define your own opcodes.H              $OPDEF defines a macro using an unqualified version of theH              mnemonic name you specify. When this macro is invoked withD              the instruction qualifiers you specify when you defineD              it with $OPDEF (if any), it expands to the instructionD              representation you have defined with $OPDEF. Note thatG              you can specify the qualfiers in any order as long as the<              combination of qualifiers you use is the same.C              Other uses of the mnemonic name remain vaild providedC              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) dooB              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 macro G              invocation statement, except it is processed in a contexttB              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 expansionC              in a MACAUXMSG diagnostic message, if the instructions(              statement contains errors.C              For instance, if you define a STQ/P instruction usingnG              $OPDEF, you can still use the STQ instruction without theaI              /P qualifier. If you do, and your STQ instruction statementUD              contains an error, the assembler generates a MACAUXMSGB              message indicating that the error occured during theF              expansion of macro STQ. Aside from the fact that the STQI              instruction is processed in the context of the expansion of I              the STQ macro, $OPDEF's definition of the STQ/P instruction?              has no effect on your use of the STQ instruction._I                                                                     6-35            MACRO-64 MacrosD        $OPDEF        Examples3                $OPDEF MNEMONIC=BANG, FORMAT=PAL, -a(                       ENCODING=^X0.0099         6-36   hI                                                          MACRO-64 Macros I                                                                  .PACKEDdI        _________________________________________________________________N        .PACKEDv2              Packed decimal string storage macro.        Format.              .PACKED  decimal-string[,symbol]        Parameters              decimal-stringH              A decimal number from 0 to 31 digits long with an optional6              sign. Digits can be in the range 0 to 9.              symbolG              An optional symbol that is assigned a value equivalent toI              the number of decimal digits in the string. The sign is not!              counted as a digit.o        DescriptionII              .PACKED generates packed decimal data, two digits per byte._E              Packed decimal data is useful in calculations requiringnE              exact accuracy. It is operated on by the decimal stringN              instructions.nG              A packed decimal string is a contiguous sequence of byteskG              in memory. It is specified by two attributes: the address E              A of the first byte and a length L, which is the numberiF              of digits in the string and not the length of the stringH              in bytes. The bytes of a packed decimal string are dividedF              into two, 4-bit fields (nibbles). Each nibble except theC              low nibble (bits 3:0) of the last (highest-addressed) B              byte must contain a decimal digit. The low nibble ofA              the highest-addressed byte must contain a sign. TheeD              representation for the digits and sign is indicated as              follows:I                                                                     6-37L A P        MACRO-64 Macrosi        .PACKEDI              ___________________________________________________________               Digith              orI              Sign___Decimal__________Hexadecimal________________________I'              0      0                0 '              1      1                1E'              2      2                2 '              3      3                3n'              4      4                4'              5      5                5o'              6      6                6e'              7      7                7 '              8      8                8'              9      9                9 1              +      10,12,14, or 15  A,C,E, or FeI              -______11_or_13_________B_or_D_____________________________cF              The preferred sign representation is 12 for plus (+) andG              13 for minus (-). The length L is the number of digits inG              the packed decimal string (not counting the sign); L must H              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 isI              required that an extra zero appear in the high nubble (bitsH              7:4) of the first byte of the string. Again, the length in-              bytes of the string is L/2 + 1. C              The address A of the string specifies the byte of the_F              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 lowF              nibble within a byte. Thus +123 has a length of 3 and is%              represented as follows:o              7    4 3    0               +-----+------+               |  1  |   2  |  :A              +-----+------+"              |  3  |  12  |  :A+1              +-----+------+         6-38    I                                                          MACRO-64 Macros I                                                                  .PACKED_D              The packed decimal number -12 has a length of 2 and is%              represented as follows:               7    4 3    0O              +-----+------+               |  0  |   1  |  :A              +-----+------+"              |  2  |  13  |  :A+1              +-----+------+        Examples9                .PACKED -12,PACKED_SIZED        ; PACKED_a        SIZE gets value of 2                .PACKED +500                .PACKED 0o6                .PACKED -0,SUM_SIZE             ; SUM_        SIZE gets value of 1I                                                                     6-39_ _ _        MACRO-64 Macrosm        $PROCEDURE_DESCRIPTORcI        _________________________________________________________________a        $PROCEDURE_DESCRIPTOR E              Defines a procedure descriptor structure at the current               psect and offset.s        Format#              $PROCEDURE_DESCRIPTORn        Description G              The arguments for the $PROCEDURE_DESCRIPTOR macro are the H              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_PROLOGUEI                 arguments.nC              o  There is an additional END_PROLOGUE argument. ThisnD                 argument must be a label that you define at the endE                 of the routine's prologue sequence. This argument isaA                 required for stack and register procedure types.         Notese7                 Because the $ROUTINE macro invokes thesH                 $PROCEDURE_DESCRIPTOR macro for you, you do not need toI                 use the $PROCEDURE_DESCRIPTOR macro if you use $ROUTINE.lG                 You may wish to use $PROCEDURE_DESCRIPTOR when you areo$                 not using $ROUTINE.        Examples9                    $PROCEDURE_DESCRIPTOR p1,           - 9                                      KIND=NULL,        -i4                                      ENTRY=p1_entry         6-40   I                                                          MACRO-64 Macros I                                                                  $RETURNEI        _________________________________________________________________         $RETURNeA              Generates a standard epilogue instruction sequence.        Format              $RETURNn        Description E              Generates a standard epilogue instruction sequence whenhF              used within a stack or register routine defined with theH              $ROUTINE macro. The epilogue sequence generated by $RETURND              restores any registers you specify with the SAVED_REGSF              argument to $ROUTINE and performs stack frame managementF              as necessary. You can use $RETURN whether you specify or7              default STANDARD_PROLOGUE as TRUE or not.eD              You can use $RETURN any number of times within a givenI              stack or register routine to affect a return to the calling^              routine.C              You must not use the $BEGIN_EPILOGUE or $END_EPILOGUE C              macros for an epilogue sequence generated by $RETURN. H              $RETURN invokes $BEGIN_EPILOGUE and $END_EPILOGUE for you.        Examples:                $ROUTINE FOOZLE, KIND=REGISTER, SAVE_FP=R1                    :_                    :_                    :                $RETURN_#                $END_ROUTINE FOOZLE_I                                                                     6-41             MACRO-64 Macrosl        $ROUTINEI        _________________________________________________________________         $ROUTINEG              Defines the current routine and creates a context for theo              routine.        Format+              $ROUTINE  NAME=routine name -r-                        ALIASES=alias names -t-                        LOCAL=boolean value - H                        STANDARD_PROLOGUE=boolean value 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 -L5                        BASE_REG_IS_FP=boolean value-y2                        REI_RETURN=boolean value -:                        STACK_RETURN_VALUE=boolean value -2                        RSA_OFFSET=integer value -2                        SAVE_FP=FP register name ->                        SAVE_RA=return address register name -,                        SIZE=numeric value -6                        SAVED_REGS=list of registers -;                        HANDLER=exception handler address -eI                        HANDLER_DATA=data address for exception handler -i7                        SYNCH_EXCEPTIONS=boolean value- 4                        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 - 9                        DEFAULT_SIGNATURE=boolean value -55                        COMMON_BASE=list of registers_         6-42 2 SI                                                          MACRO-64 Macros I                                                                 $ROUTINE         Parameters              NAMEH              The name of the routine. This argument is required for all@              procedure kinds. There is no default. For example:              NAME=FOOZLE               ALIASES C              List of alias names for the routine. This argument is D              optional for all procedure types. There is no default.              For example:D              ALIASES=<FOO,BAR,FOOBAR,foo,bar,foobar,Foo,Bar,FooBar>              LOCALpC              Boolean value indicating whether the routine is localiD              (TRUE) or externally visible (FALSE). This argument isI              optional for all procedure kinds. The default is FALSE. Fori              example:              LOCAL=TRUE              STANDARD_PROLOGUE D              Specifies a boolean value to indicate whether $ROUTINEG              should generate a standard, instruction prologue sequencehB              at the beginning of the routine's code section. ThisC              argument is optional and valid only with REGISTER andrA              STACK procedures. If the procedure type is stack or E              register , the default is TRUE and $ROUTINE generates aMI              standard prologue sequence. The prologue sequence generateddB              by $ROUTINE saves the registers you specify with theE              SAVED_REGS argument and performs stack-frame management               as necessary.iD              If you also specify BASE_REG_IS_FP=FALSE, the standardI              prologue sequence generated by $ROUTINE makes a copy of the I              procedure descriptor address that is in R27 upon entry intonI              R29 (FP). While you cannot change the value in R29 prior to I              the epilogue, you can use R29 as a working, linkage-section E              register. If you specify the STANDARD_PROLOGUE argument D              as FALSE, you must code your own prologue sequence andH              mark the end of the prologue with the $END_PROLOGUE macro.F              Whether you specify or default STANDARD_PROLOGUE as TRUEG              or not, you can generate a standard epilogue sequence foreI                                                                     6-43             MACRO-64 Macrosn        $ROUTINEG              stack and register procedures with the $RETURN macro. ForR              example:%              STANDARD_PROLOGUE=FALSEg              ENTRY D              The name of the code-entry point. This argument is theE              code entry-point label that $ROUTINE defines for you atfC              the beginning of the code section for the routine. IfdG              this argument is omitted, $ROUTINE generates a label. Forn              example:               ENTRY=FOOZLE_ENTRY              CODE_SECTIONE              The psect name and attributes of the code section. ThishG              argument is optional for all procedure kinds. If omitted, C              the default is the name and attributes defined by the A              $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"gH              Since you must delimit the psect name and attributes usingC              commas, be sure to enclose this argument within anglesG              brackets to avoid having the assembler interpret the namexD              and attributes as different arguments to $ROUTINE. For              example:3              CODE_SECTION=<MY_CODE,EXE,QUAD,NOWRT>d              DATA_SECTIONE              The psect name and attributes of the data section. ThiseG              argument is optional for all procedure kinds. If omitted,nC              the default is the name and attributes defined by thedA              $DATA$ lexical string symbol. If you specify a namecD              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"          6-44 d oI                                                          MACRO-64 MacroseI                                                                 $ROUTINEeH              Since you must delimit the psect name and attributes usingC              commas, be sure to enclose this argument within anglemG              brackets to avoid having the assembler interpret the nameeD              and attributes as different arguments to $ROUTINE. For              example:6              DATA_SECTION=<MY_DATA,NOEXE,QUAD,RD,WRT>"              DATA_SECTION_POINTERF              Boolean value indicating whether $ROUTINE should store aD              pointer to the data section in the linkage section andI              define $DP as the address of that pointer. This argument is I              optional for all procedure kinds. The default is FALSE. Forr              example:'              DATA_SECTION_POINTER=TRUEcG              You can use the DATA_SECTION_POINTER argument as follows: F                          $routine TALLY_HO, data_section_pointer=TRUE'                          $data_sectionr!                  TALLY:  .quad 0 '                          $code_section V                          .base       R27, $LS        ; Inform assembler that R27->$LS?                          LDQ         R1, $DP         ; R1->$DSDS                          .base R1,$DS                ;Inform assembler that R1-$DSMA                          LDQ         R0, TALLY       ; R0<-TALLY@                          LDA         R0, 1(R0)       ; R0<-R0++A                          STQ         R0, TALLY       ; TALLY<-R0 >                          RET         (R26)           ; Return/                          $end_routine TALLY_HOC              In this example, the DATA_SECTION_POINTER argument is_G              specified in order to obtain linkage to the data section.aH              The first LDQ instruction loads R1 with the pointer to theG              data section that $ROUTINE stores in the linkage section.iD              The next three instructions increment the value in theF              TALLY variable in the data section. Finally, the routine@              returns the incremented value to its caller in R0.              LINKAGE_SECTIONaC              The psect name and attributes of the linkage section.dC              This argument is optional for all procedure kinds. IfkE              omitted, the default is the name and attributes definedtH              by the $LINK$ lexical string symbol. If you specify a nameG              and attributes for the LINKAGE_SECTION argument, $ROUTINE F              redefines the $LINK$ lexical string symbol such that theI                                                                     6-45             MACRO-64 Macrosh        $ROUTINEH              specified values become the new default. Initially, $LINK$$              is defined as follows:K              $LINK$ = "$LINK$,OCTA,NOPIC,CON,REL,LCL,NOSHR,NOEXE,RD,NOWRT"bH              Since you must delimit the psect name and attributes usingC              commas, be sure to enclose this argument within angleiG              brackets to avoid having the assembler interpret the nameiD              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 beI              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 used E              to hold the address of the procedure descriptor (or the I              address of the address of the procedure descriptor-refer to H              the OpenVMS Calling Standard. Thus you may use R29 to holdE              a working copy of the linkage-section address passed in F              R27. In addition, your prologue and epilogue instructionC              sequences can be shorter and more efficient. However, E              you cannot not make standard calls to other routines ifsD              BASE_REG_IS_FP is specified as FALSE. This argument isG              optional and valid only with stack and register procedureiG              kinds. It defaults to TRUE if the procedure type is stacky'              or register. For example:         6-46 e tI                                                          MACRO-64 MacrosoI                                                                 $ROUTINE "              BASE_REG_IS_FP=FALSE              REI_RETURNH              Specifies a boolean value to indicate whether this routineI              returns using an REI instruction. This argument is optionalAE              and valid only with STACK, REGISTER, and NULL procedure I              kinds. It defaults to FALSE if the procedure kind is STACK,e-              REGISTER, or NULL. For example:f              REI_RETURN=TRUE3               STACK_RETURN_VALUEG              Specifies a boolean value indicating whether this routine E              has a stack return value. This argument is optional andmH              valid only with STACK, REGISTER, and NULL procedure kinds.B              It defaults to FALSE if the procedure kind is STACK,,              REGISTER or NULL. For example:%              STACK_RETURN_VALUE=TRUE               RSA_OFFSETE              An integer value specifying the stack offset (in bytes) F              of the register save area. This argument is optional andG              valid only for STACK procedures. If you specify BASE_REG__G              IS_FP as TRUE, the value you specify with RSA_OFFSET mustRG              be at least 8. RSA_OFFSET defaults to 8 if BASE_REG_IS_FPu=              is specified as TRUE, 0 otherwise. For example:               RSA_OFFSET=32O              SAVE_FP H              The register that contains a copy of the value of FP (R29)B              upon entry to this routine. The prologue instructionF              sequence must copy FP to the register specified by SAVE_F              FP and the epilogue instruction sequence(s) must restoreI              FP from the register specified by SAVE_FP. This argument isaG              required and only valid for REGISTER procedures. There isn&              no default. For example:              SAVE_FP=R1              SAVE_RA A              The register that contains the return address. This >              argument is optional and only valid for REGISTERI              procedures. If SAVE_RA is not R26, the prologue instruction G              sequence must copy R26 to the register specified by SAVE_ F              RA and the epilogue instruction sequence(s) must use theI                                                                     6-47             MACRO-64 Macros         $ROUTINEH              return address stored in the register specified by SAVE_FPH              to affect its return to caller. SAVE_RA defaults to R26 if:              the procedure kind is REGISTER. For example:              SAVE_RA=R22               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 theeG              amount of stack storage needed for the register save areaiG              (if any) and defines the $RSA_END symbol to be the offsetcE              of the first byte beyond the register save area. If youaH              wish to allocate a fixed area of stack beyond the registerD              save area, you can specify an expression with the SAZEF              argument that includes the term $RSA_END plus the amountG              of fixed stack storage you need for your application. Foru              example:              SIZE=$RSA_END+32              SAVED_REGSI              A list of registers saved on the stack by the prologue codeeH              of this routine. It is valid only for STACK procedures andG              you must specify at least FP (R29) with this argument. ItEE              defaults to FP (R29) for STACK procedures. For example: )              SAVED_REGS=<R5,FP,F2,F3,F4>              HANDLER E              The address of an exception handler. It is optional andC              valid only for STACK and REGISTER procedure kinds. By H              default, the procedure is defined not to have an exception#              handler. For example:R               HANDLER=MY_HANDLER              HANDLER_DATAI              The address of data for the specified handler, if any. ThisnH              argument is optional and valid only for stack and registerB              procedure kinds and has no default value. You cannotG              specify a HANDLER_DATA argument if you do not specify thea,              HANDLER argument. For example:*              HANDLER_DATA=MY_HANDLER_DATA         6-48 o  I                                                          MACRO-64 Macros I                                                                 $ROUTINEA              SYNCH_EXCEPTIONS@              An argument to indicate whether exceptions must beF              syncronized or not. This argument is optional with STACKG              and REGISTER routines and is not allowed with other kinds_H              of routines. This argument defaults to TRUE if you specifyH              an exception handler with the HANDLER argument. Otherwise,B              it defaults to FALSE. When this argument is TRUE andE              you specify or default STANDARD_PROLOGUE=TRUE, $ROUTINEsC              generates a TRAPB instruction as part of the standard C              prologue sequence. In addition, when this argument isAF              true, the $RETURN macro generates a TRAPB instruction asH              part of the standard epilogue sequence. When this argumentC              is FALSE, neither $ROUTINE nor $RETURN generate TRAPBv              instructions.               PROC_VALUEE              The procedure value of a bound procedure's parent. This F              argument is required for BOUND procedures and is invalid9              for all other procedure kinds. For example: $              PROC_VALUE=PARENT_PROC              ENVIRONMENT H              Specifies an environment value. This parameter is optionalD              and valid only for BOUND procedures. It has no default!              value. For example:               ENVIRONMENT=0               FUNC_RETURN B              Specifies the function return type. This argument isG              optional and valid for all procedure kinds. If specified,tF              it must be one of the following: I64, D64, I32, U32, FF,F              FD, FG, FS, FT, FFC, FDC, FGC, FSC, or FTC. These valuesD              correspond to those listed in Table 3-7 of the OpenVMSC              Calling Standard that have an additional "RASE$K_FR_"7              prefix. There is no default. For example:B              FUNC_RETURN=U32F              ARGLISTOI              Argument type list. This argument is optional and valid forG              all procedure kinds. If the argument list contains one or G              more elements, each of the first six elements must be one I              of the following: I64, I32, U32, FF, FD, FG, FS, or FT. ThePI                                                                     6-49E            MACRO-64 Macrosa        $ROUTINEF              seventh and subsequent arguments (if any) must be either              I32 or I64.uD              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.O              For example:*              ARGLIST=<I64,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 alleH              procedure kinds and defaults to FALSE. If you specify thisG              argument, $ROUTINE generates a procedure signature block.               For example:#              USES_VAX_ARGLIST=TRUEl              OVERRIDE_FLAGSF              Specifies overriding flags for the PDSC$W_FLAGS field inE              the procedure descriptor. This argument is optional andoD              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: )              OVERRIDE_FLAGS=PARENT_FLAGS6              DEFAULT_SIGNATURE4H              Specifies a boolean value to indicate whether the standardI              procedure signature is used. TRUE means to use the standardNC              signature. It is optional and valid for all procedureoC              kinds. The default is FALSE if you specify either theyC              ARGLIST or USES_VAX_ARGLIST arguments. Otherwise, theiD              default is TRUE. Note that this argument must be FALSEE              or blank if you specify either the ARGLIST or USES_VAX_l               ARGLIST arguments.$              DEFAULT_SIGNATURE=TRUE              COMMON_BASEaD              An argument to specify one or more base registers thatC              are used in common with other routines. This argumentsE              is optional for all routine kinds. By default, $ROUTINEsC              invalidates any previous .BASE directives that may ber         6-50 r eI                                                          MACRO-64 MacrostI                                                                 $ROUTINE$F              in effect when you invoke $ROUTINE. In this way, you areC              prevented from inadvertently processing the second ortF              subsequent routines in a module with .BASE directives inD              effect that apply only to a previous routine. However,E              you may wish to share a common base register assignmentbH              between a number of routines. To do so, you could re-issueF              the appropriate .BASE directive or directives after eachD              invocation of $ROUTINE. Alternatively, you can specifyD              one or more common base registers with the COMMON_BASED              argument, and issue the appropriate .BASE directive orB              directives only once at the beginning of the module.F              Specify the value for the COMMON_BASE argument as a list0              of integer registers. For example:"              COMMON_BASE=<R5,R13>F              In this example, $ROUTINE invalidates any previous .BASEH              directives except those for registers R5 and R13. PreviousG              .BASE directives for registers R5 and R13 are unaffected.         Description G              $ROUTINE defines a routine, makes it the current routine, 1              and performs the following actions:H              o  Creates and associates a linkage section, code section,3                 and data section with the routine.wF              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 withinX%                 the linkage section.CC              o  Creates the following numeric and lexical symbols:hI                                                                     6-51  e e        MACRO-64 Macrosn        $ROUTINEI                 ________________________________________________________oI                 Symbol________Description_______________________________ H                 $CS           Address of start of the current routine's,                               code section.H                 $DS           Address of start of the current routine's,                               data section.C                 $DP           Optional address of a pointer to the C                               current routine's data section. This D                               symbol has a value that is an addressG                               in the current routine's linkage section E                               at which the $ROUTINE macro has placedDG                               the address of the data section ($DS) as '                               follows: &                               $DP = .+                               .ADDRESS $DSuH                                  $DP enables a programmer to access theG                                  data area of the current routine froma6                                  its linkage section.G                 $LS           Address of the current routine's linkagee'                               section. G                 $SIZE         Size of fixed area of stack frame of the I                               current routine. This symbol is valid onlyh@                               with STACK and REGISTER routines.E                 $RSA_OFFSET   The offset within the fixed stack areaiH                               to the register save area. This symbol is>                               valid only with STACK routines.H                 $RSA_END      The offset within the fixed stack area toG                               the the first byte beyond the end of theO;                               register save area (if any).bG                 $CODE$        A lexical string symbol that defines the H                               routine's code psect name and attributes.@                 $DATA$        A lexical symbol that defines theH                               routine's data psect name and attributes.C                 $LINK$        A lexical string symbol that defines C                               the routine's linkage psect name and I                 ______________attributes._______________________________ F              o  Optionally generates a standard, instruction prologue?                 sequence at the beginning of the code section.          6-52    I                                                          MACRO-64 Macros I                                                                 $ROUTINE E                 If you specify /NAMES=AS_IS on the command line, all C                 but the last three of these symbols are defined in F                 both complete uppercase and complete lowercase. TheseH                 symbols are intended for your use outside of the macrosE                 themselves. For example, the values of these numeric C                 symbols may be useful as a mnemonic when coding an I                 instruction with a register as in the following example: %                  lda   SP,-$SIZE(SP)sG                 The last three symbols ,$CODE$, $DATA$, and $LINK$ areeI                 only defined in uppercase. They are used by the $ROUTINENF                 macro for the default code, data, and linkage sectionI                 psect names and attributes. You can define these symbolsaH                 prior to invoking $ROUTINE to alter the default program%                 sections as follows: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"G                 These statements cause $ROUTINE to use the above psectsD                 names and attributes by default. If you specify anyF                 of the CODE_SECTION, DATA_SECTION, or LINKAGE_SECTIONC                 arguments in your invocation of $ROUTINE, $ROUTINEtF                 uses the psect name and attributes specified with the                 argument.B                 In addition, $ROUTINE redefines the correspondingC                 $CODE$, $DATA$, or $LINK$ lexical string symbol to B                 the value you specify when you specify any of theI                 CODE_SECTION, DATA_SECTION, or LINKAGE_SECTION arguments                  with $ROUTINE.         Examples1                        $ROUTINE MAIN1, KIND=NULL1                        $ROUTINE MAIN1,         - 1                            KIND=STACK,         - 1                            SIZE=48,            -g1                            SAVED_REGS=<R2,FP,F5>tI                                                                     6-53A   tI                                                                        AEI        _________________________________________________________________ I                          MACRO-64 Alpha AXP Architecture Quick ReferenceeC              This appendix provides figures and tables showing the E              data types and addressing capabilities of the Alpha AXPoI              architecture. The information is derived from the Alpha AXP H              Achitecture Quick Reference Guide. Minor changes have beenE              made to reflect the usage of the Alpha AXP architecturet+              that is specific to MACRO-64..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. I                                                                      A-1  h e7        MACRO-64 Alpha AXP Architecture Quick Reference          A-2  c eI                          MACRO-64 Alpha AXP Architecture Quick ReferenceeI                                           A.1 Register Usage Conventionsa&        A.1 Register Usage ConventionsH              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_____________o        For OpenVMS:+        R0               Int func ret value6         R1               Scratch        R2-R15           Saved!        R16-             Argumentu         R21          R22-             Scratch         R24 -        R25      AI      Argument informationA'        R26      RA      Return address (        R27      PV      Procedure value)        R28              Volatile scratcho)        R29      FP      Stack frame basel&        R30      SP      Stack pointer        R31              Zero:/        F0               F-P function ret valueI3        F1               F-P complex func ret valuei        F2-F9            Saved         F10-             Scratch         F15T!        F16-             Argumentl         F22E         F23-             Scratch         F30 I        F31______________Zero____________________________________________rI                                                                      A-3d r e7        MACRO-64 Alpha AXP Architecture Quick ReferenceS(        A.2 Instruction Operand Notation(        A.2 Instruction Operand NotationH              Table A-2 shows the notation for instruction operands. The,              notation format is as follows:-              <name>.<access type><data type> I        Table_A-2_Instruction_Operand_Notation___________________________f        <name>:y         disp  Displacement field$        fnc   PALcode function field6        Ra    Integer register operand in the Ra field6        Rb    Integer register operand in the Rb field5        #b    Integer literal operand in the Rb fieldd6        Rc    Integer register operand in the Rc field=        Fa    Floating-point register operand in the Ra field =        Fb    Floating-point register operand in the Rb field =        Fc    Floating-point register operand in the Rc field         <access type>:C        a     The operand is used in an address calculation to form C              an effective address. The data type code that followslE              indicates the units of addressability (or scale factor)dF              applied to this operand when the instruction is decoded.2        i     The operand is an immediate literal.3        m     The operand is both read and written.r'        r     The operand is read only.c(        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)M/        t     IEEE double floating (T_floating)         w     WordI        x_____The_data_type_is_specified_by_the_instruction______________          A-4     I                          MACRO-64 Alpha AXP Architecture Quick ReferenceiI                                       A.3 Instruction Qualifier Notationa*        A.3 Instruction Qualifier NotationF              Table A-3 shows the notation for instruction qualifiers.I        Table_A-3_Instruction_Qualifier_Notation_________________________cI        /Qualifier_Meaning_______________________________________________t#        C          Chopped roundinga#        D          Dynamic roundingu1                   (mode determined by FPCR<DYN>) (        I          Inexact result enable*        M          Minus infinity rounding-        S          Software completion enable ,        U          Floating underflow enableI        V__________Integer_overflow_enable_______________________________n.        A.4 F-P Control Register (FPCR) FormatF              Table A-4 shows the format for the F-P Control Register.I        Table_A-4_F-P_Control_Register_(FPCR)_Format_____________________rI        Bits____Symbol___Meaning_________________________________________v.        63      SUM      Bitwise OR of <57:52>;        62:60   RAZ      Read as zero; ignored when written                 /IGN5        59:58   DYN      IEEE rounding mode selected:r%                         00   Choppedi,                         01   Minus infinity-                         10   Normal rounding +                         11   Plus infinityTB        57      IOV      Integer overflow of destination precision?        56      INE      Floating mathematically inexact resultfC        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 valuetI                                                 (continued on next page)lI                                                                      A-5     7        MACRO-64 Alpha AXP Architecture Quick Reference.        A.4 F-P Control Register (FPCR) FormatI        Table_A-4_(Cont.)_F-P_Control_Register_(FPCR)_Format_____________eI        Bits____Symbol___Meaning_________________________________________F;        51:0    RAZ      Read as zero; ignored when written I        ________/IGN_____________________________________________________          A-6    I                          MACRO-64 Alpha AXP Architecture Quick ReferencedI                                          A.5 Decodable Pseudo-OperationsS'        A.5 Decodable Pseudo-Operations C              Table A-5 lists decodable pseudo-operations and theirs-              associated actual instructions.oI        Table_A-5_Decodable_Pseudo-Operations____________________________S&        Pseudo-                 ActualI        Operation_______________Instruction______________________________n6        BR        target        BR          R31,target6        CLR       Rx            BIS         R31,R31,Rx5        FABS      Fx,Fy         CPYS        F31,Fx,Fyu6        FCLR      Fx            CPYS        F31,F31,Fx4        FMOV      Fx,Fy         CPYS        Fx,Fx,Fy4        FNEG      Fx,Fy         CPYSN       Fx,Fx,Fy7        FNOP                    CPYS        F31,F31,F31 7        MOV       Lit,Rx        LDA         Rx,lit(R31) <        MOV       {Rx           BIS         R31,{Rx/Lit8},Ry                  /Lit8},Ryw4        MF_FPCR   Fx            MF_FPCR     Fx,Fx,Fx4        MT_FPCR   Fx            MT_FPCR     Fx,Fx,Fx5        NEGF      Fx,Fy         SUBF        F31,Fx,Fy 5        NEGF/S    Fx,Fy         SUBF/S      F31,Fx,Fy 5        NEGG      Fx,Fy         SUBG        F31,Fx,Fy 5        NEGG/S    Fx,Fy         SUBG/S      F31,Fx,Fyr;        NEGL      {Rx           SUBL        R31,{Rx/Lit},Ry                   /Lit8},Ryo;        NEGL/V    {Rx           SUBL/V      R31,{Rx/Lit},Rye                  /Lit8},Ryi;        NEGQ      {Rx           SUBQ        R31,{Rx/Lit},Ryu                  /Lit8},Ry ;        NEGQ/V    {Rx           SUBQ/V      R31,{Rx/Lit},RyE                  /Lit8},Ryo5        NEGS      Fx,Fy         SUBS        F31,Fx,Fy 5        NEGS/SU   Fx,Fy         SUBS/SU     F31,Fx,Fy=5        NEGS      Fx,FY         SUBS/SUI    F31,Fx,Fyg         /SUI5        NEGT      Fx,Fy         SUBT        F31,Fx,FysI                                                 (continued on next page)oI                                                                      A-7. E r7        MACRO-64 Alpha AXP Architecture Quick Reference '        A.5 Decodable Pseudo-Operations I        Table_A-5_(Cont.)_Decodable_Pseudo-Operations____________________ &        Pseudo-                 ActualI        Operation_______________Instruction______________________________ 5        NEGT/SU   Fx,Fy         SUBT/SU     F31,Fx,Fy 5        NEGT      Fx,FY         SUBT/SUI    F31,Fx,Fy          /SUI7        NOP                     BIS         R31,R31,R31,;        NOT       {Rx           ORNOT       R31,{Rx/Lit},Rya                  /Lit8},Ryw;        SEXTL     {Rx/Lit},Ry   ADDL        R31,{Rx/Lit},Ry I        UNOP____________________LDQ_U_______R31,0(Rx)____________________          A-8  m  I                          MACRO-64 Alpha AXP Architecture Quick Reference I                       A.6 Common Architecture Opcodes in Numerical Ordere:        A.6 Common Architecture Opcodes in Numerical Order@              Table A-6 lists the common architecture opcodes in              numerical orderOI        Table_A-6_Common_Architecture_Opcodes_in_Numerical_Order_________ I        Opcode________________Opcode________________Opcode_______________3C        00      CALL_PAL      11.26   CMOVNE        15.01E    CVTDG @                                                              /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    CVTGF @                                                              /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    CVTQF @                                                              /CC        09      LDAH          12.06   EXTBL         15.03E    CVTQG @                                                              /CB        0A      OPC0A         12.0B   INSBL         15.080    ADDFB        0B      LDQ_U         12.12   MSKWL         15.081    SUBFB        0C      OPC0C         12.16   EXTWL         15.082    MULFB        0D      OPC0D         12.1B   INSWL         15.083    DIVFC        0E      OPC0E         12.22   MSKLL         15.09E    CVTDG B        0F      STQ_U         12.26   EXTLL         15.0A0    ADDGB        10.00   ADDL          12.2B   INSLL         15.0A1    SUBGB        10.02   S4ADDL        12.30   ZAP           15.0A2    MULGB        10.09   SUBL          12.31   ZAPNOT        15.0A3    DIVGD        10.0B   S4SUBL        12.32   MSKQL         15.0A5    CMPGEQD        10.0F   CMPBGE        12.34   SRL           15.0A6    CMPGLTD        10.12   S8ADDL        12.36   EXTQL         15.0A7    CMPGLEI                                                 (continued on next page)tI                                                                      A-9    I7        MACRO-64 Alpha AXP Architecture Quick Referenceh:        A.6 Common Architecture Opcodes in Numerical OrderI        Table_A-6_(Cont.)_Common_Architecture_Opcodes_in_Numerical_Order_lI        Opcode________________Opcode________________Opcode_______________eC        10.1B   S8SUBL        12.39   SLL           15.0AC    CVTGF C        10.1D   CMPULT        12.3B   INSQL         15.0AD    CVTGDaC        10.20   ADDQ          12.3C   SRA           15.0AF    CVTGQbC        10.22   S4ADDQ        12.52   MSKWH         15.0BC    CVTQFsC        10.29   SUBQ          12.57   INSWH         15.0BE    CVTQGsB        10.2B   S4SUBQ        12.5A   EXTWH         15.100    ADDFA                                                              /UCxB        10.2D   CMPEQ         12.62   MSKLH         15.101    SUBFA                                                              /UCaB        10.32   S8ADDQ        12.67   INSLH         15.102    MULFA                                                              /UCsB        10.3B   S8SUBQ        12.6A   EXTLH         15.103    DIVFA                                                              /UC C        10.3D   CMPULE        12.72   MSKQH         15.11E    CVTDG A                                                              /UCAB        10.40   ADDL/V        12.77   INSQH         15.120    ADDGA                                                              /UCpB        10.49   SUBL/V        12.7A   EXTQH         15.121    SUBGA                                                              /UClB        10.4D   CMPLT         13.00   MULL          15.122    MULGA                                                              /UCiB        10.60   ADDQ/V        13.20   MULQ          15.123    DIVGA                                                              /UCyC        10.69   SUBQ/V        13.30   UMULH         15.12C    CVTGF A                                                              /UCoC        10.6D   CMPLE         13.40   MULL/V        15.12D    CVTGDeA                                                              /UC C        11.00   AND           13.60   MULQ/V        15.12F    CVTGQ A                                                              /VCCB        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@                                                              /UI                                                 (continued on next page)t         A-10    I                          MACRO-64 Alpha AXP Architecture Quick ReferenceeI                       A.6 Common Architecture Opcodes in Numerical OrderOI        Table_A-6_(Cont.)_Common_Architecture_Opcodes_in_Numerical_Order_ I        Opcode________________Opcode________________Opcode_______________C        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    CVTTS C        15.1A3  DIVG/U        15.583  DIVF/SU       16.0AF    CVTTQ_C        15.1AC  CVTGF/U       15.59E  CVTDG/SU      16.0BC    CVTQS C        15.1AD  CVTGD/U       15.5A0  ADDG/SU       16.0BE    CVTQT B        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@                                                              /DB        15.421  SUBG/SC       16.001  SUBS/C        16.0E3    DIVT@                                                              /DC        15.422  MULG/SC       16.002  MULS/C        16.0EC    CVTTS @                                                              /DC        15.423  DIVG/SC       16.003  DIVS/C        16.0EF    CVTTQC@                                                              /DC        15.42C  CVTGF/SC      16.020  ADDT/C        16.0FC    CVTQSa@                                                              /DC        15.42D  CVTGD/SC      16.021  SUBT/C        16.0FE    CVTQT@                                                              /DB        15.42F  CVTGQ/SC      16.022  MULT/C        16.100    ADDSA                                                              /UCoB        15.480  ADDF/S        16.023  DIVT/C        16.101    SUBSA                                                              /UCoI                                                 (continued on next page)pI                                                                     A-11  u 7        MACRO-64 Alpha AXP Architecture Quick Reference2:        A.6 Common Architecture Opcodes in Numerical OrderI        Table_A-6_(Cont.)_Common_Architecture_Opcodes_in_Numerical_Order_ I        Opcode________________Opcode________________Opcode________________B        15.481  SUBF/S        16.02C  CVTTS/C       16.102    MULSA                                                              /UCB        15.482  MULF/S        16.02F  CVTTQ/C       16.103    DIVSA                                                              /UCnB        15.483  DIVF/S        16.03C  CVTQS/C       16.120    ADDTA                                                              /UCB        15.49E  CVTDG/S       16.03E  CVTQT/C       16.121    SUBTA                                                              /UC B        15.4A0  ADDG/S        16.040  ADDS/M        16.122    MULTA                                                              /UCdB        15.4A1  SUBG/S        16.041  SUBS/M        16.123    DIVTA                                                              /UC C        15.4A2  MULG/S        16.042  MULS/M        16.12C    CVTTSeA                                                              /UCpC        15.4A3  DIVG/S        16.043  DIVS/M        16.12F    CVTTQ A                                                              /VC B        15.4A5  CMPGEQ/S      16.060  ADDT/M        16.140    ADDSA                                                              /UMeB        15.4A6  CMPGLT/S      16.061  SUBT/M        16.141    SUBSA                                                              /UM B        15.4A7  CMPGLE/S      16.062  MULT/M        16.142    MULSA                                                              /UM 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                                                              /UMlB        15.4AF  CVTGQ/S       16.06F  CVTTQ/M       16.161    SUBTA                                                              /UM B        15.500  ADDF/SUC      16.07C  CVTQS/M       16.162    MULTA                                                              /UMrB        15.501  SUBF/SUC      16.07E  CVTQT/M       16.163    DIVTA                                                              /UMnC        15.502  MULF/SUC      16.080  ADDS          16.16C    CVTTS_A                                                              /UM_C        15.503  DIVF/SUC      16.081  SUBS          16.16F    CVTTQaA                                                              /VMtI                                                 (continued on next page)          A-12 o iI                          MACRO-64 Alpha AXP Architecture Quick ReferencenI                       A.6 Common Architecture Opcodes in Numerical Order_I        Table_A-6_(Cont.)_Common_Architecture_Opcodes_in_Numerical_Order_ I        Opcode________________Opcode________________Opcode________________B        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                                                              /SUIDB        16.1C1  SUBS/UD       16.5C2  MULS/SUD      16.7C1    SUBSC                                                              /SUIDpB        16.1C2  MULS/UD       16.5C3  DIVS/SUD      16.7C2    MULSC                                                              /SUIDlB        16.1C3  DIVS/UD       16.5E0  ADDT/SUD      16.7C3    DIVSC                                                              /SUIDsB        16.1E0  ADDT/UD       16.5E1  SUBT/SUD      16.7E0    ADDTC                                                              /SUIDtB        16.1E1  SUBT/UD       16.5E2  MULT/SUD      16.7E1    SUBTC                                                              /SUID B        16.1E2  MULT/UD       16.5E3  DIVT/SUD      16.7E2    MULTC                                                              /SUID B        16.1E3  DIVT/UD       16.5EC  CVTTS/SUD     16.7E3    DIVTC                                                              /SUID I                                                 (continued on next page) I                                                                     A-13    7        MACRO-64 Alpha AXP Architecture Quick Reference :        A.6 Common Architecture Opcodes in Numerical OrderI        Table_A-6_(Cont.)_Common_Architecture_Opcodes_in_Numerical_Order_ I        Opcode________________Opcode________________Opcode_______________ C        16.1EC  CVTTS/UD      16.5EF  CVTTQ/SVD     16.7EC    CVTTSC                                                              /SUID C        16.1EF  CVTTQ/VD      16.6AC  CVTST/S       16.7EF    CVTTQ,C                                                              /SVID C        16.2AC  CVTST         16.700  ADDS/SUIC     16.7FC    CVTQS C                                                              /SUID C        16.500  ADDS/SUC      16.701  SUBS/SUIC     16.7FE    CVTQTFC                                                              /SUIDEC        16.501  SUBS/SUC      16.702  MULS/SUIC     17.010    CVTLQEB        16.502  MULS/SUC      16.703  DIVS/SUIC     17.020    CPYSC        16.503  DIVS/SUC      16.720  ADDT/SUIC     17.021    CPYSN C        16.520  ADDT/SUC      16.721  SUBT/SUIC     17.022    CPYSEA        16.521  SUBT/SUC      16.722  MULT/SUIC     17.024    MT_cB                                                              FPCRA        16.522  MULT/SUC      16.723  DIVT/SUIC     17.025    MF_ B                                                              FPCRE        16.523  DIVT/SUC      16.72C  CVTTS/SUIC    17.02A    FCMOVEQ E        16.52C  CVTTS/SUC     16.72F  CVTTQ/SVIC    17.02B    FCMOVNE3E        16.52F  CVTTQ/SVC     16.73C  CVTQS/SUIC    17.02C    FCMOVLT,E        16.540  ADDS/SUM      16.73E  CVTQT/SUIC    17.02D    FCMOVGEE        16.541  SUBS/SUM      16.740  ADDS/SUIM     17.02E    FCMOVLE E        16.542  MULS/SUM      16.741  SUBS/SUIM     17.02F    FCMOVGTxC        16.543  DIVS/SUM      16.742  MULS/SUIM     17.030    CVTQLC        16.560  ADDT/SUM      16.743  DIVS/SUIM     17.130    CVTQL @                                                              /VC        16.561  SUBT/SUM      16.760  ADDT/SUIM     17.530    CVTQL A                                                              /SV C        16.562  MULT/SUM      16.761  SUBT/SUIM     18.0000   TRAPB B        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   WMB C        16.580  ADDS/SU       16.76F  CVTTQ/SVIM    18.8000   FETCH D        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   RSI                                                 (continued on next page)          A-14   CI                          MACRO-64 Alpha AXP Architecture Quick Reference I                       A.6 Common Architecture Opcodes in Numerical Order I        Table_A-6_(Cont.)_Common_Architecture_Opcodes_in_Numerical_Order_ I        Opcode________________Opcode________________Opcode_______________EC        16.5A1  SUBT/SU       16.782  MULS/SUI      19        PAL19 A        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                                                              COROUTINE5C        16.5A6  CMPTLT/SU     16.7A3  DIVT/SUI      1B        PAL1B C        16.5A7  CMPTLE/SU     16.7AC  CVTTS/SUI     1C        OPC1C0C        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        BEQ0A        22      LDS           2E      STL_C         3A        BLT1A        23      LDT           2F      STQ_C         3B        BLE2B        24      STF           30      BR            3C        BLBSA        25      STG           31      FBEQ          3D        BNE5A        26      STS           32      FBLT          3E        BGE0A        27      STT           33      FBLE          3F        BGT5)        28      LDL           34      BSR I        29______LDQ___________35______FBNE_______________________________ I                                                                     A-15e e h7        MACRO-64 Alpha AXP Architecture Quick Reference/        A.7 OpenVMS PALcode Instruction Summaryp/        A.7 OpenVMS PALcode Instruction Summary_>              Table A-7 lists the OpenVMS unprivileged PALcodeE              instructions and Table A-8 lists the OpenVMS privileged #              PALcode instructions. I        Table_A-7_OpenVMS_Unprivileged_PALcode_Instructions______________ I        Mnemonic______Opcode____Description______________________________sC        AMOVRM        00.00A1   Atomic move from register to memoryE        AMOVRR        00.00A0   Atomic move from register to register *        BPT           00.0080   Breakpoint(        BUGCHK        00.0081   Bugcheck5        CHMK          00.0083   Change mode to kernel 8        CHME          00.0082   Change mode to executive9        CHMS          00.0084   Change mode to supervisor 3        CHMU          00.0085   Change mode to user 6        GENTRAP       00.00AA   Generate software trap7        IMB           00.0086   I-stream memory barrier B        INSQHIL       00.0087   Insert into longword queue at head+                                interlockedB        INSQHILR      00.00A2   Insert into longword queue at head4                                interlocked residentB        INSQHIQ       00.0089   Insert into quadword queue at head+                                interlocked2B        INSQHIQR      00.00A4   Insert into quadword queue at head4                                interlocked residentB        INSQTIL       00.0088   Insert into longword queue at tail+                                interlockedUB        INSQTILR      00.00A3   Insert into longword queue at tail4                                interlocked residentB        INSQTIQ       00.008A   Insert into quadword queue at tail+                                interlocked B        INSQTIQR      00.00A5   Insert into quadword queue at tail4                                interlocked resident@        INSQUEL       00.008B   Insert entry into longword queueI        INSQUEL/D     00.008D   Insert entry into longword queue deferred @        INSQUEQ       00.008C   Insert entry into quadword queueI        INSQUEQ/D     00.008E   Insert entry into quadword queue deferred 5        PROBER        00.008F   Probe for read access1I                                                 (continued on next page)          A-16    I                          MACRO-64 Alpha AXP Architecture Quick Reference I                                  A.7 OpenVMS PALcode Instruction Summary I        Table_A-7_(Cont.)_OpenVMS_Unprivileged_PALcode_Instructions______ 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+                                interlockedoB        REMQHILR      00.00A6   Remove from longword queue at head4                                interlocked residentB        REMQHIQ       00.0095   Remove from quadword queue at head+                                interlocked0B        REMQHIQR      00.00A8   Remove from quadword queue at head4                                interlocked residentB        REMQTIL       00.0094   Remove from longword queue at tail+                                interlocked1B        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 deferred @        REMQUEQ       00.0098   Remove entry from quadword queueI        REMQUEQ/D     00.009A   Remove entry from quadword queue deferred 9        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________________CI        Mnemonic_________Opcode____Description___________________________ .        CFLUSH           00.0001   Cache flush2        CSERVE           00.0009   Console service/        DRAINA           00.0002   Drain aborts 1        HALT             00.0000   Halt processorCI                                                 (continued on next page)I                                                                     A-17     7        MACRO-64 Alpha AXP Architecture Quick Reference /        A.7 OpenVMS PALcode Instruction SummaryQI        Table_A-8_(Cont.)_OpenVMS_Privileged_PALcode_Instructions________5I        Mnemonic_________Opcode____Description___________________________ 9        LDQP             00.0003   Load quadword physicalFC        MFPR_ASN         00.0006   Move from processor register ASN C        MFPR_ESP         00.001E   Move from processor register ESPDC        MFPR_FEN         00.000B   Move from processor register FEN C        MFPR_IPL         00.000E   Move from processor register IPL D        MFPR_MCES        00.0010   Move from processor register MCESD        MFPR_PCBB        00.0012   Move from processor register PCBBD        MFPR_PRBR        00.0013   Move from processor register PRBRD        MFPR_PTBR        00.0015   Move from processor register PTBRD        MFPR_SCBB        00.0016   Move from processor register SCBBD        MFPR_SISR        00.0019   Move from processor register SISRC        MFPR_SSP         00.0020   Move from processor register SSP E        MFPR_TBCHK       00.001A   Move from processor register TBCHKUC        MFPR_USP         00.0022   Move from processor register USPSD        MFPR_VPTB        00.0029   Move from processor register VPTBE        MFPR_WHAMI       00.003F   Move from processor register WHAMI C        MTPR_ASTEN       00.0026   Move to processor register ASTEN C        MTPR_ASTSR       00.0027   Move to processor register ASTSR C        MTPR_DATFX       00.002E   Move to processor register DATFX5A        MTPR_ESP         00.001F   Move to processor register ESP A        MTPR_FEN         00.000B   Move to processor register FEN5B        MTPR_IPIR        00.000D   Move to processor register IPRIA        MTPR_IPL         00.000E   Move to processor register IPL5B        MTPR_MCES        00.0011   Move to processor register MCESE        MTPR_PERFMON     00.002B   Move to processor register PERFMON4B        MTPR_PRBR        00.0014   Move to processor register PRBRB        MTPR_SCBB        00.0017   Move to processor register SCBBB        MTPR_SIRR        00.0018   Move to processor register SIRRA        MTPR_SSP         00.0021   Move to processor register SSP5B        MTPR_TBIA        00.001B   Move to processor register TBIAC        MTPR_TBIAP       00.001C   Move to processor register TBIAP4B        MTPR_TBIS        00.001D   Move to processor register TBISC        MTPR_TBISD       00.0024   Move to processor register TBISDCC        MTPR_TBISI       00.0025   Move to processor register TBISI I                                                 (continued on next page)          A-18 6 0I                          MACRO-64 Alpha AXP Architecture Quick Reference I                                  A.7 OpenVMS PALcode Instruction Summary I        Table_A-8_(Cont.)_OpenVMS_Privileged_PALcode_Instructions________CI        Mnemonic_________Opcode____Description___________________________ A        MTPR_USP         00.0023   Move to processor register USPEB        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____________________ I                                                                     A-19     7        MACRO-64 Alpha AXP Architecture Quick Reference.        A.8 PALcode Opcodes in Numerical Order.        A.8 PALcode Opcodes in Numerical OrderE              Table A-9 lists the PALcode opcodes in numerical order._I        Table_A-9_PALcode_Opcodes_in_Numerical_Order_____________________eI        Opcode(16)Opcode(10)OpenVMS______________________________________E         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_MCESV%        00.0012   00.0018   MFPR_PCBB1%        00.0013   00.0019   MFPR_PRBR %        00.0014   00.0020   MTPR_PRBR %        00.0015   00.0021   MFPR_PTBRN%        00.0016   00.0022   MFPR_SCBB %        00.0017   00.0023   MTPR_SCBB %        00.0018   00.0024   MTPR_SIRR %        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_SSPI                                                 (continued on next page)1         A-20 5  I                          MACRO-64 Alpha AXP Architecture Quick Reference I                                   A.8 PALcode Opcodes in Numerical Order1I        Table_A-9_(Cont.)_PALcode_Opcodes_in_Numerical_Order_____________I        Opcode(16)Opcode(10)OpenVMS______________________________________ $        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_VPTB %        00.002A   00.0041   MTPR_VPTBT(        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   IMB #        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   INSQUEQa%        00.008D   00.0141   INSQUEL/D %        00.008E   00.0142   INSQUEQ/DN"        00.008F   00.0143   PROBER"        00.0090   00.0144   PROBEW!        00.0091   00.0145   RD_PSp        00.0092   00.0146   REI_#        00.0093   00.0147   REMQHIL #        00.0094   00.0148   REMQTILT#        00.0095   00.0149   REMQHIQ #        00.0096   00.0150   REMQTIQ #        00.0097   00.0151   REMQUEL #        00.0098   00.0152   REMQUEQ6I                                                 (continued on next page) I                                                                     A-21     7        MACRO-64 Alpha AXP Architecture Quick Reference .        A.8 PALcode Opcodes in Numerical OrderI        Table_A-9_(Cont.)_PALcode_Opcodes_in_Numerical_Order_____________ I        Opcode(16)Opcode(10)OpenVMS______________________________________%        00.0099   00.0153   REMQUEL/DS%        00.009A   00.0154   REMQUEQ/D3#        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______________________________________          A-22 U SI                          MACRO-64 Alpha AXP Architecture Quick Reference6I                                     A.9 Common Architecture Instructions2,        A.9 Common Architecture InstructionsF              Table A-10 lists common architecture instructions. WhereF              enclosed in square brackets, Ra.wq defaults to R31. This7              occurs for instructions BR, JMP, and RET. I        Table_A-10_Common_Architecture_Instructions______________________MI        Mnemonic________Code____Operands______________Operation__________6E        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.100E        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.120G        ADDL            10.00   Ra.rl,{Rb.rl          Rc< - SEXT((Rav +-A                                /#b.ib},Rc.wq         Rbv)<31:0>)i        ADDL/V          10.40 E        ADDQ            10.20   Ra.rq,{Rb.rq          Rc< - Rav + Rbv-                                /#b.ib},Rc.wq_        ADDQ/V          10.60E        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.700I                                                 (continued on next page)AI                                                                     A-23O N 7        MACRO-64 Alpha AXP Architecture Quick ReferenceA,        A.9 Common Architecture InstructionsI        Table_A-10_(Cont.)_Common_Architecture_Instructions______________ I        Mnemonic________Code____Operands______________Operation__________         ADDS/SUID       16.7C0        ADDS/SUIM       16.740        ADDS/SUM        16.540        ADDS/U          16.180        ADDS/UC         16.100        ADDS/UD         16.1C0        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 RbvA-                                /#b.ib},Rc.wqA@        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 +lD                                                      {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}I                                                 (continued on next page)0         A-24 p iI                          MACRO-64 Alpha AXP Architecture Quick Reference I                                     A.9 Common Architecture InstructionsmI        Table_A-10_(Cont.)_Common_Architecture_Instructions______________eI        Mnemonic________Code____Operands______________Operation__________AF        BIS             11.20   Ra.rq,{Rb.rq          Rc< - Rav OR Rbv-                                /#b.ib},Rc.wq8C        BLBC            38      Ra.rq,disp.al         If Rav<0> = 0 E                                                      Then PC< - PC +eD                                                      {4*SEXT(disp)}C        BLBS            3C      Ra.rq,disp.al         If Rav<0> = 1 E                                                      Then PC< - PC + D                                                      {4*SEXT(disp)}@        BLE             3B      Ra.rq,disp.al         If Rav  0E                                                      Then PC< - PC + D                                                      {4*SEXT(disp)}@        BLT             3A      Ra.rq,disp.al         If Rav < 0E                                                      Then PC< - PC +0D                                                      {4*SEXT(disp)}A        BNE             3D      Ra.rq,disp.al         If Rav /= 0 E                                                      Then PC< - PC + D                                                      {4*SEXT(disp)}J        BR              30      [Ra.wq],disp.al       Ra< - PC; PC< - PC +D                                                      {4*SEXT(disp)}J        BSR             34      Ra.wq,disp.al         Ra< - PC; PC< - PC +D                                                      {4*SEXT(disp)}E        CALL_PAL        00      fnc.ir                Trap to PALcode_E        CMOVEQ          11.24   Ra.rq,{Rb.rq          If Rav = 0 Thenr?                                /#b.ib},Rc.wq         Rc< - Rbv-E        CMOVGE          11.46   Ra.rq,{Rb.rq          If Rav  0 Then ?                                /#b.ib},Rc.wq         Rc< - RbvIE        CMOVGT          11.66   Ra.rq,{Rb.rq          If Rav > 0 Then ?                                /#b.ib},Rc.wq         Rc< - RbveH        CMOVLBC         11.16   Ra.rq,{Rb.rq          If Rav<0> = 0 Then?                                /#b.ib},Rc.wq         Rc< - RbveH        CMOVLBS         11.14   Ra.rq,{Rb.rq          If Rav<0> = 1 Then?                                /#b.ib},Rc.wq         Rc< - Rbv E        CMOVLE          11.64   Ra.rq,{Rb.rq          If Rav  0 Then ?                                /#b.ib},Rc.wq         Rc< - Rbv E        CMOVLT          11.44   Ra.rq,{Rb.rq          If Rav < 0 Thene?                                /#b.ib},Rc.wq         Rc< - RbvI                                                 (continued on next page) I                                                                     A-25u o q7        MACRO-64 Alpha AXP Architecture Quick Referencee,        A.9 Common Architecture InstructionsI        Table_A-10_(Cont.)_Common_Architecture_Instructions______________oI        Mnemonic________Code____Operands______________Operation__________dF        CMOVNE          11.26   Ra.rq,{Rb.rq          If Rav /= 0 Then?                                /#b.ib},Rc.wq         Rc< - RbveD        CMPBGE          10.0F   Ra.rq,{Rb.rq          Rc< - BytewiseE                                /#b.ib},Rc.wq         compare mask of_A                                                      {Rav  Rbv} 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 Then D                                                      Fc< - 0.5 Else?                                                      Fc< - 0.0A        CMPGLE/S        15.4A7G        CMPGLT          15.0A6  Fa.rg,Fb.rg,Fc.wq     If Fav < Fbv Then5D                                                      Fc< - 0.5 Else?                                                      Fc< - 0.0i        CMPGLT/S        15.4A6G        CMPLE           10.6D   Ra.rq,{Rb.rq          If Rav  Rbv Then0J                                /#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 TheneD                                                      Fc< - 2.0 Else?                                                      Fc< - 0.0p        CMPTEQ/SU       16.5A5G        CMPTLE          16.0A7  Fa.rt,Fb.rt,Fc.wq     If Fav  Fbv ThenRD                                                      Fc< - 2.0 Else?                                                      Fc< - 0.0         CMPTLE/SU       16.5A7G        CMPTLT          16.0A6  Fa.rt,Fb.rt,Fc.wq     If Fav < Fbv ThenrD                                                      Fc< - 2.0 Else?                                                      Fc< - 0.0v        CMPTLT/SU       16.5A6I                                                 (continued on next page)          A-26 7 MI                          MACRO-64 Alpha AXP Architecture Quick ReferenceeI                                     A.9 Common Architecture InstructionsrI        Table_A-10_(Cont.)_Common_Architecture_Instructions______________5I        Mnemonic________Code____Operands______________Operation__________ F        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< - 0H        CMPULT          10.1D   Ra.rq,{Rb.rq          If Rav U< Rbv ThenJ                                /#b.ib},Rc.wq         Rc< - 1 Else Rc< - 0F        CPYS            17.020  Fa.rq,Fb.rq,Fc.wq     Fc< - Fav<63> ||?                                                      Fbv<62:0>TI        CPYSE           17.022  Fa.rq,Fb.rq,Fc.wq     Fc< - Fav<63:52> ||I?                                                      Fbv<51:0> G        CPYSN           17.021  Fa.rq,Fb.rq,Fc.wq     Fc< - NOT Fav<63>B                                                      || Fbv<62:0>F        CVTDG           15.09E  Fb.rd,Fc.wg           Fc< - D_Float toD                                                      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.11EF        CVTGD           15.0AD  Fb.rg,Fc.wd           Fc< - G_Float toD                                                      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.12DF        CVTGF           15.0AC  Fb.rg,Fc.wf           Fc< - G_Float toD                                                      F_Float of Fbv        CVTGF/C         15.02C        CVTGF/S         15.4AC        CVTGF/SC        15.42CI                                                 (continued on next page)lI                                                                     A-27_ _ _7        MACRO-64 Alpha AXP Architecture Quick Reference ,        A.9 Common Architecture InstructionsI        Table_A-10_(Cont.)_Common_Architecture_Instructions______________ I        Mnemonic________Code____Operands______________Operation__________N        CVTGF/SU        15.5AC        CVTGF/SUC       15.52C        CVTGF/U         15.1AC        CVTGF/UC        15.12CF        CVTGQ           15.0AF  Fb.rg,Fc.wq           Fc< - G_Float toA                                                      quad of Fbv        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.0FEI                                                 (continued on next page)          A-28   I                          MACRO-64 Alpha AXP Architecture Quick Reference I                                     A.9 Common Architecture Instructions I        Table_A-10_(Cont.)_Common_Architecture_Instructions______________ I        Mnemonic________Code____Operands______________Operation__________         CVTQT/M         16.07E        CVTQT/SUI       16.7BE        CVTQT/SUIC      16.73E        CVTQT/SUID      16.7FE        CVTQT/SUIM      16.77EF        CVTST           16.2AC  Fb.rs,Fc.wt           Fc< - S_Float toD                                                      T_Float of Fbv        CVTST/S         16.6ACF        CVTTQ           16.0AF  Fb.rt,Fc.wq           Fc< - T_Float toA                                                      quad of Fbv         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.16FF        CVTTS           16.0AC  Fb.rt,Fc.ws           Fc< - T_Float toD                                                      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.76CI                                                 (continued on next page)MI                                                                     A-29    07        MACRO-64 Alpha AXP Architecture Quick ReferenceR,        A.9 Common Architecture InstructionsI        Table_A-10_(Cont.)_Common_Architecture_Instructions______________0I        Mnemonic________Code____Operands______________Operation___________        CVTTS/SUM       16.56C        CVTTS/U         16.1AC        CVTTS/UC        16.12C        CVTTS/UD        16.1EC        CVTTS/UM        16.16CE        DIVF            15.083  Fa.rf,Fb.rf,Fc.wf     Fc< - Fav / Fbvu        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 / Fbvm        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 / Fbv5        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.143I                                                 (continued on next page)          A-30   LI                          MACRO-64 Alpha AXP Architecture Quick ReferenceaI                                     A.9 Common Architecture Instructions I        Table_A-10_(Cont.)_Common_Architecture_Instructions______________ I        Mnemonic________Code____Operands______________Operation__________ E        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        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.163H        EQV             11.48   Ra.rq,{Rb.rq          Rc< - Rav XOR {NOT:                                /#b.ib},Rc.wq         Rbv}G        EXCB            18.0400                       Exception barrierUH        EXTBL           12.06   Ra.rq,{Rb.rq          Rc< - Byte extractE                                /#b.ib},Rc.wq         low from Rav at >                                                      Rbv<2:0>H        EXTLH           12.6A   Ra.rq,{Rb.rq          Rc< - Long extractF                                /#b.ib},Rc.wq         high from Rav at>                                                      Rbv<2:0>H        EXTLL           12.26   Ra.rq,{Rb.rq          Rc< - Long extractE                                /#b.ib},Rc.wq         low from Rav at1>                                                      Rbv<2:0>H        EXTQH           12.7A   Ra.rq,{Rb.rq          Rc< - Quad extractF                                /#b.ib},Rc.wq         high from Rav at>                                                      Rbv<2:0>H        EXTQL           12.36   Ra.rq,{Rb.rq          Rc< - Quad extractE                                /#b.ib},Rc.wq         low from Rav at >                                                      Rbv<2:0>H        EXTWH           12.5A   Ra.rq,{Rb.rq          Rc< - Word extractF                                /#b.ib},Rc.wq         high from Rav at>                                                      Rbv<2:0>I                                                 (continued on next page) I                                                                     A-31, .  7        MACRO-64 Alpha AXP Architecture Quick Reference.,        A.9 Common Architecture InstructionsI        Table_A-10_(Cont.)_Common_Architecture_Instructions______________I        Mnemonic________Code____Operands______________Operation__________eH        EXTWL           12.16   Ra.rq,{Rb.rq          Rc< - Word extractE                                /#b.ib},Rc.wq         low from Rav at_>                                                      Rbv<2:0>@        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 + D                                                      {4*SEXT(disp)}@        FBGT            37      Fa.rq,disp.al         If Fav > 0E                                                      Then PC< - PC + D                                                      {4*SEXT(disp)}@        FBLE            33      Fa.rq,disp.al         If Fav  0E                                                      Then PC< - PC + D                                                      {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 /= 0 E                                                      Then PC< - PC + D                                                      {4*SEXT(disp)}E        FCMOVEQ         17.02A  Fa.rq,Fb.rq,Fc.wq     If Fav = 0 Then ?                                                      Fc< - FbviE        FCMOVGE         17.02D  Fa.rq,Fb.rq,Fc.wq     If Fav  0 Then ?                                                      Fc< - Fbv E        FCMOVGT         17.02F  Fa.rq,Fb.rq,Fc.wq     If Fav > 0 Then ?                                                      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< - Fbv F        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) I                                                 (continued on next page)          A-32 f vI                          MACRO-64 Alpha AXP Architecture Quick Reference I                                     A.9 Common Architecture Instructions I        Table_A-10_(Cont.)_Common_Architecture_Instructions______________ I        Mnemonic________Code____Operands______________Operation__________ E        FETCH_M         18.A000 0(Rb.ab)              Prefetch aroundC                                                      (Rbv), modify <                                                      intentG        INSBL           12.0B   Ra.rq,{Rb.rq          Rc< - Byte insert_E                                /#b.iq},Rc.wq         low from Rav atE>                                                      Rbv<2:0>G        INSLH           12.67   Ra.rq,{Rb.rq          Rc< - Long insertEF                                /#b.iq},Rc.wq         high from Rav at>                                                      Rbv<2:0>G        INSLL           12.2B   Ra.rq,{Rb.rq          Rc< - Long insert E                                /#b.iq},Rc.wq         low from Rav at >                                                      Rbv<2:0>G        INSQH           12.77   Ra.rq,{Rb.rq          Rc< - Quad insertF                                /#b.iq},Rc.wq         high from Rav at>                                                      Rbv<2:0>G        INSQL           12.3B   Ra.rq,{Rb.rq          Rc< - Quad insertrE                                /#b.iq},Rc.wq         low from Rav at >                                                      Rbv<2:0>G        INSWH           12.57   Ra.rq,{Rb.rq          Rc< - Word insertMF                                /#b.iq},Rc.wq         high from Rav at>                                                      Rbv<2:0>G        INSWL           12.1B   Ra.rq,{Rb.rq          Rc< - Word insertME                                /#b.iq},Rc.wq         low from Rav at >                                                      Rbv<2:0>I        JMP             1A.0    [Ra.wq],(Rb.ab),hint  Ra< - PC; PC< - RbvRA                                                      AND {NOT 3}#I        JSR             1A.1    Ra.wq,(Rb.ab),hint    Ra< - PC; PC< - RbvaA                                                      AND {NOT 3} I        JSR_COROUTINE   1A.3    Ra.wq,(Rb.ab),hint    Ra< - PC; PC< - Rbv A                                                      AND {NOT 3} A        LDA             08      Ra.wq,disp.ab(Rb.ab)  Ra< - Rbv +R@                                                      SEXT(disp)A        LDAH            09      Ra.wq,disp.ab(Rb.ab)  Ra< - Rbv +.F                                                      SEXT(disp*65536)C        LDF             20      Fa.wf,disp.ab(Rb.ab)  Fa< - ({Rbv + B                                                      SEXT(disp)})I                                                 (continued on next page) I                                                                     A-33  - 7        MACRO-64 Alpha AXP Architecture Quick Referencei,        A.9 Common Architecture InstructionsI        Table_A-10_(Cont.)_Common_Architecture_Instructions______________(I        Mnemonic________Code____Operands______________Operation___________C        LDG             21      Fa.wg,disp.ab(Rb.ab)  Fa< - ({Rbv +NB                                                      SEXT(disp)})H        LDL             28      Ra.wq,disp.ab(Rb.ab)  Ra< - SEXT(({Rbv +I                                                      SEXT(disp)})<31:0>)SH        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 +rB                                                      SEXT(disp)})D        LDQ_U           0B      Ra.wq,disp.ab(Rb.ab)  Ra< - ({{Rbv +I                                                      SEXT(disp)} AND NOT 9                                                      7})rC        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 maskGE                                /#b.iq},Rc.wq         low from Rav at >                                                      Rbv<2:0>E        MSKLH           12.62   Ra.rq,{Rb.rq          Rc< - Long mask/F                                /#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 mask.E                                /#b.iq},Rc.wq         low from Rav ato>                                                      Rbv<2:0>E        MSKWH           12.52   Ra.rq,{Rb.rq          Rc< - Word maskGF                                /#b.iq},Rc.wq         high from Rav at>                                                      Rbv<2:0>I                                                 (continued on next page)          A-34    I                          MACRO-64 Alpha AXP Architecture Quick Reference I                                     A.9 Common Architecture Instructions/I        Table_A-10_(Cont.)_Common_Architecture_Instructions______________FI        Mnemonic________Code____Operands______________Operation__________|E        MSKWL           12.12   Ra.rq,{Rb.rq          Rc< - Word mask E                                /#b.iq},Rc.wq         low from Rav at >                                                      Rbv<2:0>@        MT_FPCR         17.024  Fa.rq,Fa.rq,Fa.wq     FPCR< - FaE        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.102E        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.122G        MULL            13.00   Ra.rl,{Rb.rl          Rc< - SEXT((Rav * A                                /#b.ib},Rc.wq         Rbv)<31:0>)         MULL/V          13.40 E        MULQ            13.20   Ra.rq,{Rb.rq          Rc< - Rav * Rbv -                                /#b.ib},Rc.wq         MULQ/V          13.60xE        MULS            16.082  Fa.rs,Fb.rs,Fc.ws     Fc< - Fav * FbvR        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.742I                                                 (continued on next page) I                                                                     A-35r c  7        MACRO-64 Alpha AXP Architecture Quick Reference ,        A.9 Common Architecture InstructionsI        Table_A-10_(Cont.)_Common_Architecture_Instructions______________ I        Mnemonic________Code____Operands______________Operation__________         MULS/SUM        16.542        MULS/U          16.182        MULS/UC         16.102        MULS/UD         16.1C2        MULS/UM         16.142E        MULT            16.0A2  Fa.rt,Fb.rt,Fc.wt     Fc< - Fav * Fbv         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< - Rbv A                                                      AND {NOT 3}AI        RPCC            18.C000 Ra.wq                 Ra< - Process cyclet=                                                      countersF        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>)5H        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>) I                                                 (continued on next page)          A-36 I SI                          MACRO-64 Alpha AXP Architecture Quick ReferenceI                                     A.9 Common Architecture InstructionsGI        Table_A-10_(Cont.)_Common_Architecture_Instructions______________ I        Mnemonic________Code____Operands______________Operation__________ H        S4SUBQ          10.2B   Ra.rq,{Rb.rq          Rc< - SLL(Rav,2) -9                                /#b.ib},Rc.wq         RbvIN        S8ADDL          10.12   Ra.rl,{Rb.rl          Rc< - SEXT(((SLL(Rav,3))C                                /#b.ib},Rc.wq         + Rbv)<31:0>)H        S8ADDQ          10.32   Ra.rq,{Rb.rq          Rc< - SLL(Rav,3) +9                                /#b.ib},Rc.wq         Rbv N        S8SUBL          10.1B   Ra.rl,{Rb.rl          Rc< - SEXT(((SLL(Rav,3))C                                /#b.ib},Rc.wq         - Rbv)<31:0>)AH        S8SUBQ          10.3B   Ra.rq,{Rb.rq          Rc< - SLL(Rav,3) -9                                /#b.ib},Rc.wq         RbvtM        SLL             12.39   Ra.rq,{Rb.rq          Rc< - SLL(Rav,Rvb<5:0>)o-                                /#b.ib},Rc.wq M        SRA             12.3C   Ra.rb,{Rb.rq          Rc< - SRA(Rav,Rvb<5:0>) -                                /#b.ib},Rc.wq M        SRL             12.34   Ra.rq,{Rb.rq          Rc< - SRL(Rav,Rvb<5:0>) -                                /#b.ib},Rc.wq =        STF             24      Fa.rf,disp.ab(Rb.ab)  ({Rbv + I                                                      SEXT(disp)})< - Fav=        STG             25      Fa.rg,disp.ab(Rb.ab)  ({Rbv +I                                                      SEXT(disp)})< - FavT]        STL             2C      Ra.rl,disp.ab(Rb.ab)  ({Rbv + SEXT(disp)})<31:0>< - Rav<31:0> ]        STL_C           2E      Ra.ml,disp.ab(Rb.ab)  ({Rbv + SEXT(disp)})<31:0>< - Rav<31:0> =        STQ             2D      Ra.rq,disp.ab(Rb.ab)  ({Rbv +0I                                                      SEXT(disp)})< - Rav =        STQ_C           2F      Ra.mq,disp.ab(Rb.ab)  ({Rbv + I                                                      SEXT(disp)})< - Rava>        STQ_U           0F      Ra.rq,disp.ab(Rb.ab)  ({{Rbv +E                                                      SEXT(disp)} AND D                                                      NOT 7})< - Rav=        STS             26      Fa.rs,disp.ab(Rb.ab)  ({Rbv + I                                                      SEXT(disp)})< - Fav =        STT             27      Fa.rt,disp.ab(Rb.ab)  ({Rbv + I                                                      SEXT(disp)})< - Fav E        SUBF            15.081  Fa.rf,Fb.rf,Fc.wf     Fc< - Fav - Fbv         SUBF/C          15.001        SUBF/S          15.481        SUBF/SC         15.401I                                                 (continued on next page)mI                                                                     A-37  X  7        MACRO-64 Alpha AXP Architecture Quick Reference ,        A.9 Common Architecture InstructionsI        Table_A-10_(Cont.)_Common_Architecture_Instructions______________<I        Mnemonic________Code____Operands______________Operation__________a        SUBF/SU         15.581        SUBF/SUC        15.501        SUBF/U          15.181        SUBF/UC         15.101E        SUBG            15.0A1  Fa.rg,Fb.rg,Fc.wg     Fc< - Fav - Fbvs        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 -mA                                /#b.ib},Rc.wq         Rbv)<31:0>)<        SUBL/V          10.491E        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 - Fbvp        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.0E1I                                                 (continued on next page)          A-38   I                          MACRO-64 Alpha AXP Architecture Quick ReferenceEI                                     A.9 Common Architecture Instructions I        Table_A-10_(Cont.)_Common_Architecture_Instructions______________ I        Mnemonic________Code____Operands______________Operation__________r        SUBT/M          16.061        SUBT/SU         16.5A1        SUBT/SUC        16.521        SUBT/SUD        16.5E1        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.161G        TRAPB           18.0000                       Drain any pending ;                                                      traps,C        UMULH           13.30   Ra.rq,{Rb.rq          Rc< - {Rav *U B                                /#b.ib},Rc.wq         Rbv}<127:64>B        WMB             18.4400                       Write memory=                                                      barrier G        XOR             11.40   Ra.rq,{Rb.rq          Rc< - Rav XOR Rbv -                                /#b.ib},Rc.wq I        ZAP             12.30   Ra.rq,{Rb.rq          Rc< - Zap from Rav,-H                                /#b.iq},Rc.wq         byte mask Rbv<7:0>D        ZAPNOT          12.31   Ra.rq,{Rb.rq          Rc< - Zap fromH                                /#b.iq},Rc.wq         Rav, byte mask NOTI        ______________________________________________Rbv<7:0>____________I                                                                     A-39    I                                                                        B I        _________________________________________________________________ H                                               Programming with MACRO-64I              This appendix contains information to help you program morebI              effectively using the MACRO-64 assembly language within thesI              framework of the OpenVMS Calling Standard. It discusses thet$              following information:-              o  The OpenVMS Calling Standard 5              o  Accessing Memory with Base Registers )              o  Types of Data Structures "              o  Types of Routines               o  Example Program$              o  Self Addressability5              o  Optimization and Automatic Alignment E              For more information on the AXP environment, you should 9              become familiar with the following manuals:Q4              o  Alpha Architecture Reference Manual)              o  OpenVMS Calling Standard,'              o  Alpha AXP architecture $        B.1 OpenVMS Calling StandardC              All OpenVMS languages supplied by Digital support the I              OpenVMS Calling Standard. With most compiled AXP languages,oE              the OpenVMS Calling Standard is invisible to you as the>C              programmer. However, when programming with the MACRO-sD              64 assembly language, you are responsible for definingC              the appropriate data structures and using appropriate>G              instruction sequences in order to implement routines thatb7              comply with the OpenVMS Calling Standard. I                                                                      B-1    b!        Programming with MACRO-64 $        B.1 OpenVMS Calling StandardE              Refer to Chapter 6 for a description of several library C              macros that are supplied with the MACRO-64 Assembler.DB              An important role of the OpenVMS Calling Standard isF              support for debugging, exception handling, and tracebackG              routines. These routines are aided by the OpenVMS Calling G              Standard data structures and conventions to determine the0F              current routine and the source of its call. In addition,E              these structures and conventions enable the debugger to E              interpret other information, such as data stored on the $              stack or in registers.G              Again, when programming in MACRO-64 assembly language, itcF              is important that you as the programmer correctly defineG              the data structures and adhere to the conventions defined .              by the OpenVMS Calling Standard.0        B.2 Accessing Memory with Base RegistersI              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.H              The Alpha AXP architecture has 31 general, base registers,C              R0 through R30. R31 is a special base register, which G              always reads as zero. 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.F              However, these areas of virtual memory are typically not/              accessible to user-mode programs. (              Base Register ArchitectureB              Base-register architectures use different methods toF              obtain an initial base address for a routine. Typically,B              base-register architectures load the current programB              counter (PC) into a base register. Thus, data can beF              accessed relative to a location in the code. This methodI              is inconsistent with the high performance objectives of the ?              Alpha AXP architecture for the following reasons:          B-2c    H                                               Programming with MACRO-64I                                 B.2 Accessing Memory with Base Registers/G              o  It requires placing data areas adjacent to code areas, H                 which results in inefficient use of the instruction and                 data caches. C              o  The memory locations near the boundary of the data E                 area and code would likely be duplicated in both the G                 instruction cache and the data cache, thus diminishingc=                 the effectiveness of the caching algorithms.               Procedure Value F              The OpenVMS Calling Standard simplifies obtaining a baseE              address without requiring the data and code areas to be G              adjacent. When a program or routine needs to call another C              routine, it must load R27 with a procedure value. The5D              procedure value is a special base address which is theF              address of the procedure descriptor of the routine it is              calling."              Procedure DescriptorG              The procedure value for a given routine is the address ofF              the procedure descriptor for that routine. Section B.3.1@              describes the procedure descriptor in more detail.F              The procedure descriptor is a data block that resides inF              a special data area owned by the routine. This data area)              called the linkage section. D              Unlike VAX VMS external routine names, which referenceC              its entry point, AXP external routine names reference G              the procedure descriptor which contains the entry point'sC              address.A              Since the called routine has the address of its ownrE              procedure descriptor in R27, it can access not only itsUD              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 descriptorH              resides is called the linkage section. The linkage sectionA              is actually a program section (psect) that contains E              the routine's procedure descriptor. The linkage section .              performs the following function:I                                                                      B-3  r R!        Programming with MACRO-64 0        B.2 Accessing Memory with Base RegistersG              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 to (                 receive and store data.E              o  Stores the addresses of other routines, allowing the 0                 routine to call those routines.E              Figure B-2 illustrates how you access memory using base               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.hA              2  Since memory-reference instructions use a 16-bit_G                 displacement relative to the base address, the linkage6C                 section can be up to 64K bytes in size with direct(                 access relative to R27.I                 In addition, the linkage section psect typically has thecH                 NOWRT attribute and contains only address constants andH                 possibly other constants in order to facilitate placingF                 the linkage section in a shared section in a sharable                 image. D              3  If the called routine needs to access memory beyondF                 its own linkage section, it can store additional baseF                 addresses in its linkage section, load them into baseG                 registers as needed, and thereby access any legitimateR$                 location in memory.F              4  To access read/write data, a separate read/write dataE                 section is defined in a different psect with the WRT G                 attribute and the address of the read/write section is /                 stored in the linkage section.bE              As shown in Figure B-2, the special base address passed ?              in R27 provides the called routine with a seed of F              addressability from which it can directly access its ownI              linkage section and from which it can indirectly access all G              of memory. Each routine in a call chain receives its seed 0              of addressability from its caller.         B-4v )  H                                               Programming with MACRO-64I                                 B.2 Accessing Memory with Base Registers %              MAIN Program Call Chain F              The main routine in a program works in the same way. TheB              operating system passes it a base address within itsD              own linkage section in R27 just like any other callingC              standard-conforming routine. The operating system can F              establish its own seed of addressability in a variety ofG              ways. The important programming consideration is that theaH              main routine is given its requisite seed of addressabilityC              via the base address passed in R27 when the operatingE              system calls the main routine. The main routine must in)G              turn pass a seed of addressability in R27 to any routines8;              that it calls, and so on down the call chain.RE              Figure B-3 illustrates program start up and the program>              call chain. F              The call chain shown in Figure B-3 illustrates a typicalG              program's call chain originating with the transfer to the,I              program's entry point (MAIN) from the operating system. The#I              MAIN routine calls routine A, which in turn calls B. A fullRF              prologue and epilogue are required for routines MAIN andF              A since they both make standard calls. The full prologueI              allocates the fixed stack area and saves the return address H              (R26), procedure value (R27), frame pointer (R29), and anyE              preserved registers that are to be used by the routine. H              Finally, the full prologue establishes the routine's frameE              as the current frame. If MAIN or A need to access theiraG              respective linkage sections after making a standard call, H              they would save a preserved register in the prologue, moveG              R27 to that register before using R27 in a standard call, G              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 epilogue /              can be significantly streamlined.{?              Note that all three routines access data in theirdF              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 own D              linkage section. The caller can then load R27 from itsD              own linkage section prior to the call. The caller thenI                                                                      B-5U C  !        Programming with MACRO-6440        B.2 Accessing Memory with Base RegistersE              goes on to obtain the address of the callee's code from G              the callee's procedure descriptor. With the callee's code G              address (CA) in R26 and the callee's procedure-descriptor D              address in R27, the caller can transfer control to theH              callee with a jump-to-subroutine (JSR) instruction throughI              R26, storing the return address in R26. A more optimal call F              sequence using a linkage pair is shown in Section B.3.3.        B.3 Data Structures1F              This section describes the OpenVMS Calling Standard dataH              structures, and how to use them in practical applications.D              There are three data structures defined by the OpenVMS@              Calling Standard that you should be familiar with:%              o  Procedure descriptor                o  Signature block              o  Linkage pair "        B.3.1 Procedure Descriptor@              The procedure descriptor contains information thatB              describes the routine. More importantly, it containsF              the address of the code for the routine. It includes the$              following information:%              o  Stack usage (if any)0,              o  Register save/restore masks#              o  Exception handlers @              Usually, a routine's name references the routine'sB              procedure descriptor, rather than the address of itsF              code. For example, a global name for an external routineC              represents the address where the procedure descriptorUF              resides, not the address of the routine's code. ProgramsH              which call the routine obtain the address of its code from?              its procedure descriptor or using a linkage pair. G              The .PROCEDURE_DESCRIPTOR and .LOCAL_PROCEDURE_DESCRIPTORnC              assembler directives define the name of the procedure A              descriptor, and indicates that the block of storage >              that follows is the procedure descriptor for the:              specified routine. .PROCEDURE_DESCRIPTOR andA              .LOCAL_PROCEDURE_DESCRIPTOR also associate the code_         B-6_ _ H                                               Programming with MACRO-64I                                                      B.3 Data Structures6F              addresss of the routine's entry point with the procedureD              name. The association between the code address and theG              procedure name allows the assembler and linker to process F              the .CODE_ADDRESS and .LINKAGE_PAIR directives. For more>              information on linkage pairs, see Section B.3.3.@              You need to declare the correct amount of storage,9              and specify the correct initial values. The C              .PROCEDURE_DESCRIPTOR and .LOCAL_PROCEDURE_DESCRIPTOR D              directives do not create the storage for the procedureE              descriptor. Instead, they mark the storage that follows4G              as a procedure descriptor, resulting in a special object- G              module record. Use the $ROUTINE and $PROCEDURE_DESCRIPTOR E              macros to both mark the procedure descriptor and define G              the storage for the procedure descriptor. For information D              on these macros, see Chapter 6. For information on theB              procedure descriptor format, see the OpenVMS Calling              Standard._        B.3.2 Signature BlockE              The signature block describes the parameters, parameter3D              passing methods, and return value used by the routine.C              Using the signature block is optional. If it is used,_B              the procedure descriptor references it. $ROUTINE andD              $PROCEDURE_DESCRIPTOR macros can by used to define theC              signature block. For information on these macros, see               Chapter 6.        B.3.3 Linkage PairH              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 two               quad-words).G              For example, the assembler provides the .CODE_ADDRESS and H              .LOCAL_CODE_ADDRESSS directives to obtain the address of aG              routine's code (a quadword). To obtain the address of thefI              routine's code and procedure descriptor, you can use either F              the .CODE_ADDRESS or .LOCAL_CODE_ADDRESSS in conjunctionF              with the .ADDRESS directive. The following example showsC              how you would use these directives to obtain the code @              address and and procedure descriptor of routine X:I                                                                      B-7u   >!        Programming with MACRO-64         B.3 Data StructuresS                  .CODE_ADDRESS X         ; Store address of X's code (entry point)pU                  .ADDRESS      X         ; Store address of X's procedure descriptorn?              .LINKAGE_PAIR performs the same function as usingpB              .CODE_ADDRESS and .ADDRESS together, as shown in the               following example:!                  .LINKAGE_PAIR Xi-              Using Linkage Pairs in RoutinesdG              Another example of how you can use linkage pairs is shown F              in Example B-1 and Example B-2. Example B-1 shows a code8              sequence that does not use a linkage pair:7              Example B-1 Routine Without Linkage Pairsh)                      .enable local_blocks+                      .psect $LINKAGE,noexen<              LS:     .procedure_descriptor MY_PROC, MY_CODE?                      ; MY_PROC procedure descriptor details...tV              X_ADDR: .address X                      ; Store address of X's proc desc&                      .psect $CODE,exe-              MY_CODE: ; R27 -> LS upon entry 7                      ; Prologue omitted for clarity...gN                      LDQ     R27,X_ADDR-LS(R27)      ; R27 -> proc desc for XL                      LDQ     R26,8(R27)              ; R26 -> code for X  1L                      JSR     R26,(R26)               ; CALL X             27                      ; Epilogue omitted for clarity... F              While the previous code sequence works correctly, it has?              two immediate stalls in the instruction sequence: G              1  The first stall occurs when the second LDQ instruction E                 must wait for the preceding load to R27 to complete. F              2  The second stall occurs when the JSR instruction must@                 wait for the preceding load to R26 to complete.F              Since routine calls occur frequently, these stalls wouldG              significantly increase the amount of time for the routine               to execute.          B-8a m aH                                               Programming with MACRO-64I                                                      B.3 Data StructurestH              The following example is similar to Example B-1, except it4              uses a linkage pair to call routine X.4              Example B-2 Routine With Linkage Pairs)                      .enable local_blockd+                      .psect $LINKAGE,noexea<              LS:     .procedure_descriptor MY_PROC, MY_CODE=                      ;MYPROC procedure descriptor details... Q              X_LP:   .LINKAGE_PAIR X                 ; Store address of X's codeiR                                                      ; followed by address of X'sA                                                      ; proc desc&                      .psect $CODE,exe-              MY_CODE: ; R27 -> LS upon entry 7                      ; Prologue omitted for clarity...rI                      LDQ     R26,<X_LP+0>-LS(R27)    ; R26 -> code for XeN                      LDQ     R27,<X_LP+8>-LS(R27)    ; R27 -> proc desc for X>                      JSR     R26,(R26)               ; CALL X7                      ; Epilogue omitted for clarity...aD              Although the same number of instructions are required,F              the two immediate stalls in the instruction sequence are              eliminated.aC              You can also use the $LINKAGE_PAIR macro or the $CALLhI              macro. For more information on these macros, see Chapter 6.sI              Note that the $CALL macro generates an instruction sequence 3              similar to that shown in Example B-2.         B.4 Types of Routines2A              The OpenVMS Calling Standard defines four differenteF              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:d              o  Null framec              o  Register frameS1              o  Stack frame (fixed and variable)e              o  Bound frameI                                                                      B-9    p!        Programming with MACRO-64s        B.4 Types of RoutinesdD              A null frame routine is a light-weight routine similarF              in concept to a JSB-linkage routine on VAX. A null-frameB              routine executes in the context of its caller and isI              therefore restricted in the operations that it can perform. F              As shown in Table B-1, a null-frame routine requires the?              least overhead and offers the least capabilities.c@              A register frame routine creates its own frame and@              therefore executes in its own context. A register-C              frame routine is an intermediate-weight routine, with F              intermediate capabilities and overhead. A register-frameH              routine maintains the context of its callers in registers.A              A stack frame routine has two categories: fixed andl              variable.tF              o  With the fixed frame stack, the stack frame size doesF                 not vary. A fixed stack frame routine creates its ownI                 frame and stores the context of its caller on the stack.RD                 A fixed stack frame routine is also an intermediateB                 weight routine with intermediate capabilities andB                 overhead. The only significant capability lackingH                 with a fixed stack frame routine is the ability to make                  standard calls.D              o  With the variable frame stack, the stack frame sizeE                 may vary. A variable stack frame routine is the full F                 function, heavyweight type of routine. It creates itsH                 own stack frame and stores the context of its caller onG                 the stack. The variable stackframe routine is the only7>                 type of routine that can make standard calls.A              A bound frame routine is generally used in compiledeF              languages such as Ada and Pascal that require a dynamic,G              up level link to data in an outer routine. Most assembly- I              language programming does not involve bound frame routines.c"        B.4.1 Routine CapabilitiesH              The types of operations that a routine may perform and theG              amount of required overhead in the routine's prologue andtH              epilogue instruction sequences are different for each type              of routine.t         B-10   hH                                               Programming with MACRO-64I                                                    B.4 Types of RoutinesaG              The capabilities and overhead requirements of null frame,iI              register frame, fixed stack frame, and variable stack framen3              routines are summarized in Table B-1:cI        Table_B-1_Frame_Attributes_______________________________________a6                                              Variable+                                      FixedaF                                      RegisterRegisterFixed   VariableC                              Null                    Stack   StackBI        ______________________Frame___Frame___Frame___Frame___Frame______l@        Executes in Frame of  Yes     No      No      No      No        CallerC        Where Caller's        -       RegisterRegisterstack   Stacki        Context is Kept A        Can Allocate Stack    -       Yes     Yes     Yes     Yes         in ProloquesA        Must Allocate Stack   -       No      No      Yes     Yes         in Prologue A        Can Allocate Stack    RestrictNo      Yes     No      Yes         in Routine BodyhA        Can Have an           No      Yes     Yes     Yes     Yes         Exception Handler A        Can Save/Restore      RestrictNo      No      Yes     Yesp        RegistersrA        Can Make Standard     RestrictNo      No      No      YesyI        Calls____________________________________________________________sG              For more information on routines, see the OpenVMS Callingt              Standard. 8        B.4.2 Entry Prologue and Exit Epilogue SequencesF              In general, a standard sequence of instructions are usedD              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.tI                                                                     B-11     !        Programming with MACRO-64s        B.4 Types of RoutinesaL              ENTRY:  LDA     SP, -32(SP)     ; Allocate fixed stack area  1D                      STQ     R27, (SP)       ; Save procedure valueC                      STQ     R26, 8(SP)      ; Save return addressrU                      STQ     R2, 16(SP)      ; Save any preserved regs that are used ;                      STQ     FP, 24(SP)      ; Save old FPeG                      MOV     SP, FP          ; Establish current frame,O                      $END_PROLOGUE           ; Marks the end of the proloque 2iC              1  The ENTRY label marks the code entry point for thef                 routine.eG              2  The $END_PROLOGUE macro is used to mark the end of thea                 proloque.F              The following code example shows a typical exit epilogueD              sequence for a variable stack frame procedure. SeveralE              elements of the epilogue may be omitted for routines of               less complexity.T                      $BEGIN_EPILOGUE         ; Mark the beginning of the epilogue 1O                      MOV     FP, SP          ; Release the variable stack areadD                      LDQ     R28, 8(FP)      ; Fetch return addressK                      LDQ     R2, 16(FP)      ; Restore preserved registerspJ                      LDQ     FP, 24(FP)      ; Reestablish caller's frameL                      LDA     SP, 32(SP)      ; Release the fixed stack area@                      RET     R28             ; Return to callerN                      $END_EPILOGUE           ; Mark the end of the epilogue 1G              1  In this example, the $BEGIN_EPILOGUE and $END_EPILOGUE H                 macros are used to begin and end the epilogue sequence.I              The $ROUTINE macro optionally generates a standard prologueeF              instruction sequence at the beginning of the routine. InH              addition, you can also use the $RETURN macro to generate aG              standard epilogue sequence. For more information on theseC$              macros, see Chapter 6.        B.5 Example Program E              The following example shows a simple routine, ROUTINE1, &              that does the following:=              o  Takes a single, longword parameter as input. B              o  Calls another function, ROUTINE2, passing its own6                 parameter as a parameter to ROUTINE2.         B-12 i (H                                               Programming with MACRO-64I                                                      B.5 Example ProgramiH              o  Adds the return value from ROUTINE2 and the value of anH                 external longword, I, storing the result in a register.H              o  Returns the result of the addition to its caller in R0.G                      $ROUTINE ROUTINE1, KIND=STACK, SAVED_REGS=<R2,FP>a&                      $LINKAGE_SECTIONM                      I_ADDR: .address I              ; Linkage to external I #                      $CODE_SECTION.Y                                                      ; The prologue instruction sequenceS                                                      ; is generated by $ROUTINE by ?                                                      ; default $                      ; Routine bodyM                      .BASE   R27,$LS                 ; Inform assembler that N                                                      ; R27 -> linkage section?                      LDQ     R0, I_ADDR              ; R0 -> Ir?                      LDL     R2, (R0)                ; R2 <- IaU                      MOV     1, R25                  ; AI <- 1 (R16 already containseF                                                      ;  the argument)X                      $CALL   ROUTINE2                ; Call ROUTINE2, R27->linkage sectL                      ADDL    R2, R0, R0              ; retval <- retval + IV                      $RETURN                         ; $RETURN generates the epilogueA                                                      ; sequence.r+                      $END_ROUTINE ROUTINE1 ,        B.6 Establishing Self-AddressabilityH              A MACRO-64 routine can establish addressability to its ownI              linkage section without the help of its caller (the calling B              routine). In this case, the caller does not pass theG              procedure value in R27, as in a standard call. Therefore, H              the routine must establish its own base address within its              linkage section.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 H              allow placement of data in a EXE/NOMIX psect, instructionsE              must be placed in an EXE/MIX psect. When debugging, the F              debugger views execution to have transferred into a dataF              area, because the debugger views all MIX psects as data.I                                                                     B-13o e a!        Programming with MACRO-64d,        B.6 Establishing Self-AddressabilityF                ________________________ NOTE ________________________:                The debugger can correctly display decodedB                instructions in a MIX psect, but it cannot achieveC                source line /program-counter correlation and sourcet                line scrolling.rF                ______________________________________________________I              Example B-3 represents the CLEAR_X_ARRAY routine, which has &              no procedure descriptor.5              Example B-3 Establishing a Base Address<                      .psect CLEAR_X_ARRAY_CODE,exe,mix,quad              X_ARRAY_ADDR:d&                      .address X_ARRAY              X_ARRAY_SIZE:D7                      .long <X_ARRAY_END - X_ARRAY> / 8               CLEAR_X_ARRAY::oA                      BSR     R1,10$                  ; R1 -> 10$kF              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 > 0h>                      RET     (R26)                   ; Return                      .endE              Other routines may call the CLEAR_X_ARRAY routine usingB              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 linkageI              section is adjacent to its code section, it can access data%              in its linkage section.M         B-14 c eH                                               Programming with MACRO-64I                                 B.7 Optimization and Automatic AlignmentX0        B.7 Optimization and Automatic Alignment<              MACRO-64 provides the following optimizations:)              o  Automatic data alignment )              o  Automatic code alignment               o  Scheduling               o  PeepholingRC              All optimizations and automatic alignment are off, byiE              default. When invoking MACRO-64, the default qualifiers /              are /NOOPTIMIZE and /NOALIGNMENT.tH              You can control optimization and automatic alignment using5              the following qualfiers and directives: 8              o  The /OPTIMIZE and /ALIGNMENT qualifiers4              o  The .ENABLE and .DISABLE directives;              o  The .BEGIN_EXACT and .END_EXACT directives F              The .ENABLE and .DISABLE directives control optimizationD              and automatic code alignment for an assembly unit; youE              cannot use these directives to control optimization andcE              automatic code alignment for a range of statements. Use H              .BEGIN_EXACT and .END_EXACT to suppress optimization for a"              range of statements.&        B.7.1 Automatic Data AlignmentD              Access to naturally aligned data is faster than access@              to unaligned data. MACRO-64 does not align data byD              default. Instead, it places data exactly as specified,F              with no padding. With automatic data alignment selected,D              data directives are automatically aligned on a naturalC              boundary. Pad bytes are added as necessary to achievehD              natural alignment. Labels that occur with the data are2              automatically aligned with the data.I                                                                     B-15e o  !        Programming with MACRO-64o0        B.7 Optimization and Automatic Alignment*        B.7.1.1 Controlling Data AlignmentE              You can control when you want to have data alignment in.G              your program. You do this by using the .ENABLE ALIGN_DATA E              and .DISABLE ALIGN_DATA directives. Note that automaticnF              data alignment is disabled by default. Example B-4 shows7              how to enable and disable data alignment. ?              Example B-4 Enabling and Disabling Data Alignmento#              .PSECT D1,DATA,NONEXE C              .DISABLE ALIGN_DATA     ; This is the default state 1N2              .BYTE   1               ; offset = 02              .QUAD   2               ; offset = 1"              .PSECT D2,DATA,NOEXEE              .ENABLE ALIGN_DATA      ; Turn on automatic alignment 22              .BYTE   1               ; offset = 0Y              .QUAD   2               ; offset = 8 (pad bytes are added at offsets 1 - 7)rG              1  The .DISABLE_ALIGN_DATA directive causes the assemblereG                 to allocate data at the current location with padding,cG                 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 Alignment D              The following MACRO-64 data storage directives provide;              optional, automatic alignment. See Table B-2.aI              Table_B-2_Directives_Using_Automatic_Alignment_____________qI              Directive_____________Alignment_Boundary___________________y,              .WORD                 word (2),              .SIGNED_WORD          word (2)0              .LONG                 longword (4)0              .ADDRESS              quadword (8)1              .OCTA                 octaword (16)d0              .QUAD                 quadword (8)I                                                 (continued on next page)m         B-16   SH                                               Programming with MACRO-64I                                 B.7 Optimization and Automatic AlignmentI              Table_B-2_(Cont.)_Directives_Using_Automatic_Alignment_____ I              Directive_____________Alignment_Boundary___________________ 0              .CODE_ADDRESS         quadword (8)0              .LOCAL_CODE_ADDRESS   quadword (8)1              .LINKAGE_PAIR         octaword (16)t1              .LOCAL_LINKAGE_PAIR   octaword (16) 0              .PROCEDURE_           quadword (8)              DESCRIPTOR0              .LOCAL_PROCEDURE_     quadword (8)              DESCRIPTOR0              .F_FLOATING (.FLOAT)  longword (4)0              .D_FLOATING           quadword (8)              (.DOUBLE)t0              .G_FLOATING           quadword (8)0              .S_FLOATING           longword (4)0              .T_FLOATING           quadword (8)0              .BLKA                 quadword (8)0              .BLKD                 quadword (8)0              .BLKF                 longword (4)0              .BLKG                 quadword (8)0              .BLKL                 longword (4)1              .BLKO                 octaword (16)h0              .BLKQ                 quadword (8)0              .BLKS                 longword (4)0              .BLKT                 quadword (8),              .BLKW                 word (2)0              .ASCID                quadword (8)I              .INSTRUCTION__________longword_(4)_________________________ H              Specify a .PSECT directive alignment attribute that alignsF              the psect on a boundary that is at least as stringent as3              the automatically aligned data items.tI                                                                     B-17    t!        Programming with MACRO-64e0        B.7 Optimization and Automatic Alignment,        B.7.2 Automatic Code Label AlignmentI              Automatic code label alignment improves I-cache utilizationcC              and multi-instruction issue. This optimization aligns H              certain code labels to a quadword boundary by padding withE              NOP and FNOP instructions. Use the /ENVIRONMENT=NOFLOATr6              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 throughc              are aligned.I              Use the /ALIGNMENT=CODE qualifier or the .ENABLE ALIGN_CODE A              directive to select automatic code label alignment. %        B.7.3 Scheduling OptimizationaH              Scheduling reorders instructions to reduce pipeline stallsD              and increases the chances for multi-instruction issue.C              It only reorders instructions; it does not change the E              instructions or the registers used in the instructions.H              In addition, instructions are not scheduled across labels.C              Therefore, the structure of your program is retained.eF                ________________________ Note ________________________F                If you use the same register for two or more logically?                distinct actions, the scheduler schedules these D                actions serially in the sequence you specify. If youA                use different registers for two or more logicallysE                distinct actions, the scheduler schedules the actions D                in parallel, providing faster execution performance.F                ______________________________________________________A              Use the /OPTIMIZE=SCHEDULE qualifier or the .ENABLEhC              SCHEDULE directive to select scheduling optimization. #        B.7.4 Peephole Optimization H              Peephole optimization restructures your program for fasterH              execution. To do so, it reduces the number of instructionsD              executed and replaces long-executing instructions withE              instructions that require less execution time. Although G              this optimization may increase the number of instructionsiD              in memory, the number actually executed, as you followE              the code paths, decreases or remains the same. Peephole          B-18 T H                                               Programming with MACRO-64I                                 B.7 Optimization and Automatic AlignmentlH              optimization matches short code patterns and replaces themH              with more optimal sequences. It also eliminates dead code.G              (Note that dead code is often created by the code changeseI              made by peephole optimization. This dead code is eliminatedeE              by successive iterations where peephole optimization isaG              selected.) Peephole optimization eliminates some branchesrH              by inlining or replicating short sequences from the branch              target.uA              Use the /OPTIMIZE=PEEPHOLE qualifier or the .ENABLE A              PEEPHOLE directive to select peephole optimization.m,        B.7.5 Using MACRO-64 for PerformanceC              High-order language compilers do optimizations calledlA              loop unrolling and inlining. MACRO-64 allows you toA              perform these optimizations manually through coding H              techniques, although it does not offer specific qualifiers4              or directives for these optimizations.H              Loop unrolling reduces the number of branches that must beI              executed. You can unroll loops using the .REPEAT directive..@              The following example shows manual loop unrolling:7              10$:                          ; Copy loopPH              .repeat 10                    ; Unroll the loop, factor=10G                  LDA     R18, -1(R18)      ; Decrement quad-word count2K                  BLT     R18, 20$          ; Branch if quad-word count < 0P>                  LDQ     R0, (R17)         ; Load a quad-wordA                  STQ     R0, (R16)         ; Store the quad-word J                  LDA     R16, 8(R16)       ; Increment the target addressJ                  LDA     R17, 8(R17)       ; Increment the source address                  BR 10$              20$:              .endr C              Loop unrolling complimented with MACRO-64 shcheduling C              and peephole optimizations can significantly increaseeG              performance. For better loop scheduling, you can make the<              counter decrement and the loop exit separable.I                                                                     B-19    !        Programming with MACRO-64.0        B.7 Optimization and Automatic Alignment7              10$:                          ; Copy looptH              .repeat 10                    ; Unroll the loop, factor=10G                  LDA     R18, -1(R18)      ; Decrement quad-word countg>                  LDQ     R0, (R17)         ; Load a quad-wordK                  BLT     R18, 20$          ; Branch if quad-word count < 0 A                  STQ     R0, (R16)         ; Store the quad-word J                  LDA     R16, 8(R16)       ; Increment the target addressJ                  LDA     R17, 8(R17)       ; Increment the source address                  BR 10$              20$:              .endrrF              High oder language compilers often inline a routine callG              if the called routine is small and is defined in the sameAG              module from which it is called. To inline a routine call,gE              the compiler replaces the routine call with the body of G              the called routine. You can use macros to manually inline3              short, local routines with MACRO-64.. *        B.7.6 Viewing Optimization ResultsC              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 a0*              binary machine code listing.         B-20   I                                                                        C I        _________________________________________________________________ I                                                  Using LSE with MACRO-64 F              This appendix explains how to use the Language-SensitiveA              Editor (LSE) with the MACRO-64 language. For LSE toaD              function correctly, LSE must be installed prior to the!              MACRO-64 assembler.         C.1 Invoking LSEB              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 followingn              command:              $ LSE TEST.M64F              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. FornI              example, to edit a file named TEST.ASM, enter the followings              command:2                   $ LSE/LANGUAGE=MACRO64 TEST.ASM        C.2 Running Diagnostics F              You can run diagnostics in LSE to debug programs withoutC              leaving the LSE editor. For more information, see the D              Guide to Language-Sensitive Editor for VMS Systems and)              the MACRO-64 release notes. H              When running diagnostics in an LSE editing session, MACRO-F              64 displays error messages of different severity levels.E              For more information on error messages, see Appendix E. I                                                                      C-1s   II                                                                        DuI        __________________________________________________________________I                                               Differences from VAX MACROtF              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 theAH              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 assemblyG&              directives and features: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 noto%                 present in MACRO-64.d*        D.1 Assembler Features in MACRO-64E              This section describes MACRO-64 features not present in               VAX MACRO.               o  .BASE directiveB                 The .BASE directive is provided for implicit base"                 register support.F              o  .PROCEDURE_DESCRIPTOR and .LOCAL_PROCEDURE_DESCRIPTOR                 directives I                                                                      D-1w   R"        Differences from VAX MACRO*        D.1 Assembler Features in MACRO-64D                 These directives mark the specified identifier as aE                 procedure descriptor. .PROCEDURE_DESCRIPTOR declarestA                 an identifier as a global label that defines the ?                 address of the procedure's description (a data C                 address) and associate the procedure's entry point A                 (a code address) with the name of the procedure. I                 .LOCAL_PROCEDURE_DESCRIPTOR performs a similar function,oF                 defining a local label rather than a global label. NoD                 storage is allocated. For more information on these+                 directives, see Chapter 5.NA              o  .LINKAGE_PAIR and .LOCAL_LINKAGE_PAIR directives C                 These directives cause a linkage pair to be storediE                 at the current psect and current location counter. ArH                 linkage pair consists of a code address and the addressE                 of the specified identifier. For more information one1                 these directives, see Chapter 5.dA              o  .CODE_ADDRESS AND .LOCAL_CODE_ADDRESS directivesaC                 These directives cause the code address(es) of theeD                 specified identifier(s) to be placed at the currentF                 psect and current location counter. See Chapter 5 for"                 more information.         D-2i a aI                                               Differences from VAX MACROnI                                       D.1 Assembler Features in MACRO-64h               o  .ELSE directive?                 MACRO-64 introduces a new conditional-assemblyeE                 directive, .ELSE. It can be used in conjunction with F                 the .IF and .ENDC directives (common to VAX MACRO andD                 MACRO-64) to specify a sequence of statements to beD                 assembled when the condition in the controlling .IFI                 directive is false. While the .ELSE directive is similariG                 to VAX MACRO's .IF_FALSE directive, it differs in that I                 you may specify at most one .ELSE directive within a .IFbG                 /.ENDC block. .IF_FALSE is also provided for VAX MACROaC                 compatibility. See Chapter 5 for more information. #              o  .INCLUDE directiveAI                 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 identifierstH                 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 symbollB                 names. The default is /NAMES=UPPERCASE; uppercaseE                 and lowercase letters are not distinguished, as with ?                 VAX MACRO. See Chapter 1 for more information.eC              o  Lexical operator support for 10 lexical operators. G                 MACRO-64 provides 10 lexical operators, three of which C                 are compatible with VAX MACRO's three macro stringyI                 operators. MACRO-64 lexical operators can be used in anyOI                 context, and are not restricted to macros. See Chapter 3&                 for more information.'              o  Lexical string symbols 4                 See Chapter 3 for more information.-              o  Lexical escape operator (%%) 4                 See Chapter 3 for more information.>              o  Lexical substitution operator (%lexsym_name%)I                                                                      D-3n u a"        Differences from VAX MACRO*        D.1 Assembler Features in MACRO-644                 See Chapter 3 for more information.:              o  More liberal use of value-of operator (\)F                 MACRO-64 as well as VAX MACRO recognizes the value-ofB                 operator (\) in macro invocations and in default-F                 value strings for parameters in .MACRO directives. InH                 addition, MACRO-64 recognizes the value-of operator (\)+                 in the following contexts:RG                 -  With either or both of the two arguments in the .IFO;                    DIFFERENT and .IF IDENTICAL directives. H                 -  With the argument to the .IF BLANK and .IF NOT_BLANK                    directives. C                 -  With the second argument to the .NCHR and .IRPC                     directives. H                 -  With the second and subsequent arguments to the .IRP                    directive.F                 -  With arguments to lexical operators. See Chapter 4)                    for more information.          D-4    dI                                               Differences from VAX MACROKI                                       D.1 Assembler Features in MACRO-64(               o  MACRO64$ symbolH                 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: +                 .MACRO ADDRESS32 EXPR_LISTt)                     .IF DEFINED MACRO64$$                     .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.e              o  Optimizations>                 The assembler optionally performs a number of@                 optimizations. See Chapter 2 (command line) and%                 Chapter 5 (.ENABLE).e              o  $OPDEF macro B                 $OPDEF is supplied in place of VAX MACRO's .OPDEF                 directive. 1              o  OpenVMS Calling Standard Macros:I5                 $ROUTINE              $SEND_PROLOGUEe7                 $CALL                 $LINKAGE_SECTIONa4                 $CODE_SECTION         $DATA_SECTION6                 $LINKAGE_PAIR         $BEGIN_EPILOGUE4                 $RETURN               $END_EPILOGUE                 $PROCEDURE_                 DESCRIPTOR '              o  .INSTRUCTION directivenH                 For more information on the .INSTRUCTION directive, see                 Chapter 5.r7              o  .BEGIN_EXACT and .END_EXACT directives I                                                                      D-5    f"        Differences from VAX MACRO*        D.1 Assembler Features in MACRO-64I                 For more information on these directives, see Chapter 5.n6        D.2 VAX MACRO Features Not Present in MACRO-64F              This section contains features in VAX MACRO that are not"              present in MACRO-64.&              o  EXE/NOEXE restrictionD                 MACRO-64 allows only instructions to be placed in aF                 psect with either the EXE or MIX attributes, or both.G                 Data can be placed in a psect with either the NOEXE orlG                 MIX attributes, or both. VAX MACRO allows instructions @                 and or 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.         D-6o w  I                                               Differences from VAX MACRO-I                           D.2 VAX MACRO Features Not Present in MACRO-64g&              o  Radix unary operatorsG                 VAX MACRO allows unary radix operators on expressions.iF                 MACRO-64 allows unary radix operators only to specifyI                 the radix of numeric constants. The octal constant ^O123tE                 is valid with both VAX MACRO and MACRO-64. The octal F                 expression ^O(10 + 10) is valid with VAX MACRO; it is)                 not valid with MACRO-64.a+              o  The Register mask operatoriH                 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 PAGERH                 Because the Alpha architecture has variable page sizes,E                 MACRO-64 does not support PAGE as an argument to thel"                 .ALIGN directive.?              o  No count specifiers on data storage directivesuE                 MACRO-64 does not allow a repeat count expression oncG                 any data storage directive such as .BYTE or .WORD. TheeG                 %REPEAT lexical function can be used for this purpose.l/              o  No support for .CROSS/.NOCROSShF                 There is no support for these directives in MACRO-64.&              o  No support for .DEBUGD                 There is no support for this directive in MACRO-64.F                 However, even though this directive is not supported,E                 MACRO-64 provides symbolic information in the object 0                 module for use by the debugger.&              o  No .DEFAULT directive>                 This directive in not applicable on MACRO-64.5              o  .ENABLE/.DISABLE directive arguments F                 The MACRO-64 assembler does not support the followingA                 arguments to the .ENABLE or .DISABLE directives:7                 -  ABSOLUTE-Not applicable on MACRO-64h                 -  DEBUGe                 -  SUPPRESSIONtI                                                                      D-7m   "        Differences from VAX MACRO6        D.2 VAX MACRO Features Not Present in MACRO-64                 -  TRACEBACK                  -  TRUNCATION+              o  .END directive differencesiI                 VAX MACRO requires the .END directive. MACRO-64 does not G                 require this directive. MACRO-64 requires the optionaleC                 identifier that follows the .END directive to be am:                 previously declared procedure descriptor./              o  .ENTRY directive not supported F                 Instead, a $ROUTINE macro that accomplishes a similar"                 function is used.%              o  No .GLOBAL directive8B                 There is no support for this directive. VAX MACROI                 provided this directive for MACRO-11 compatibility only.         D-8o   gI                                               Differences from VAX MACROsI                           D.2 VAX MACRO Features Not Present in MACRO-64a)              o  No .H_FLOATING directive I                 Since this data type is not a native MACRO-64 type, thisa,                 directive is not supported."              o  Changes to .IDENTF                 The argument to the .IDENT directive must be a quoted                 literal.e#              o  No .LINK directive8                 There is no support for this directive.#              o  No .MASK directiveD>                 This directive is not applicable to MACRO-64.$              o  No .NTYPE directiveG                 This directive is not supported by MACRO-64. The %TYPE>                 lexical operator provides a similar function.$              o  No .OPDEF directiveI                 There is no support for this directive. The $OPDEF macro_-                 provides a similar function. 0              o  Differences in .PSECT directiveH                 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 directiveF                 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 counterB                 value as the location counter value saved for the*                 matching .SAVE directive.'              o  No .TRANSFER directivef8                 There is no support for this directive.1              o  Differences with .ENDM and .ENDRrI                                                                      D-9  l n"        Differences from VAX MACRO6        D.2 VAX MACRO Features Not Present in MACRO-64F                 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 definitionsSF                 with .ENDM and you must end repeat ranges with .ENDR.         D-10 s  I                                                                        EEI        _________________________________________________________________ I                                                           Error Messages H              This appendix describes the messages produced by the Alpha!              MACRO-64 assembler. A              The description of each message gives the severity,RC              followed by additional explanatory text and suggested               action. @         ADDTRUNC,  Storing an address expression into a storageC            allocation less than the size of an address will result             in data truncation.AE            Informational: The assembler has stored a value too largeCB            for the allocated space. Data truncation has occurred./            User Action: Allocate more storage. A         ALIGNFILLIGN,  The optional .ALIGN fill pattern is beingwD            ignored. It is only valid for psects that do not possess)            the EXE and NOMIX attributes.sC            Warning: The optional fill pattern specified is ignored E            since it is only valid for psects that do not possess the %            EXE and NOMIX attributes.nG            User Action: Omit the fill pattern or specify the MIX psect             attribute.E         ALIGNFILLTRUNC,  The value specified for the .ALIGN optionalRJ            fill pattern should be an integer in the range of 0 . . . 255.H            Data truncation will occur with the currently specified fill/            pattern in a byte storage location.sD            Warning: The value specified as the fill pattern for theE            .ALIGN directive should be in the range 0 . . . 255. DataiE            truncation occurs when the specified value is out of this             range.F            User Action: Specify a smaller value for the fill pattern.I                                                                      E-1  -         Error MessagesH         ALIGNLABELIGN,  The ALIGN_LABEL option has been replaced by the            ALIGN_CODE option.B            Error: The ALIGN_LABEL option has been replaced by the            ALIGN_CODE option.8            User Action: Use the recommended new option.>         ALIGNTOBIG,  Specified alignment too large for PSECT.G            Error: The requested alignment is too large for the current             psect.C            User Action: Check the psect attributes and insure thatRC            the psect alignment is greater than or equal to what isf            requested.H         ASCIITRUNC,  ASCII constant contains too many characters; value            truncated.?            Error: Your ASCII constant contains more than eightKG            characters with the ^A or ^a radix specifier. The assemblerr)            deletes the extra characters.B            User Action: Check your source code. Use eight or less            characters.e5         BADALIGN,  Alignment specifier out of range. B            Error: The alignment specifier used with the .PSECT or-            .ALIGN directive is out of range.E            User Action: Consult the documentation description of the '            .PSECT or .ALIGN directive.o4         BADENDARG,  Bad argument to .END directive.A            Error: The optional argument to the .END directive ise            invalid.E            User Action: The argument, if specified, must reference aC            procedure descriptor within the module. Specify a valid ;            procedure descriptor name or omit the argument. =         BADINSARG,  Argument N invalid for this instruction.h?            Error: The argument number shown is invalid for the             instruction.B            User Action: Check the argument and required format as+            specified in the documentation..         E-2  m  I                                                           Error Messagest3         BADLIB,  Error opening library file XXXXX.cH            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. H            User Action: Examine your source code and consult Chapter 1.+         BADMACRONAME,  Illegal macro name.C7            Error: The indicated macro name is illegal. F            User Action: Check your source code and consult Chapter 2.8         BADOPERAND,  Invalid operand type for operator.?            Error: The resolved operand type is invalid for the_            specified operator.fB            User Action: Consult the documentation descriptions of1            operators, operands, and expressions.t0         BADPARAMSTR,  Illegal parameter string.H            Error: The string specified as a macro parameter is invalid.?            User Action: Check your source code and consult theh            documentation.F         BASEFAIL,  Argument N invalid. The assembler failed to find aF            base register specified with a previous .BASE directive to>            form a register expression of the form offset(Rn).?            Error: The assembler failed to find a base registeroE            specified with a previous .BASE directive to form a valid07            register expression of the form offset(Rn).sB            User Action: Check the use of .BASE directives and the+            instruction in the source code. G         BEGEXPSC,  .BEGIN_EXACT is not valid in a psect with the NOEXE !            and NOMIX attributes.tH            Error: A .BEGIN_EXACT directive is not valid in a psect with+            the NOEXE and NOMIX attributes. 0            User Action: Check your source code.I                                                                      E-3t 3 r        Error MessagesF         BYTEALIGNIGN,  The BYTE_ALIGN option has been replaced by the            ALIGN_DATA option.H            Error: The BYTE_ALIGN option has been replaced by the ALIGN_            DATA option.8            User Action: Use the recommended new option.6         CONPSECTATTR,  Contradictory PSECT attribute.H            Error: A previously specified psect attribute conflicts with(            the flagged psect attribute.E            User Action: Consult the documentation description of thef2            .PSECT directive and psect attributes.C         CONTEOF,  End of file encountered after line continuation. A            Error: The assembler encountered end of file when the ?            previous line encountered specified a continuation.F0            User Action: Check your source code.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.G            User Action: Check the psect attributes and insure that thenD            psect alignment is greater than or equal to the required(            alignment of the data items.G         DATANOTINNOEXE,  Data declarations must be in a psect with the$            MIX, or NOEXE attribute.H            Error: A data declaration, such as a data storage directive,>            has been specified in a psect with incorrect psect            attributes.B            User Action: Make sure the psect has the MIX, or NOEXE            attribute set.F         DIRNOTINNOEXE,  Directive must be in a psect with the MIX, or            NOEXE attribute.F            Error: The directive specified must appear in a psect with+            the MIX or NOEXE attribute set. >            User Action: Check to insure that a psect with the6            appropriate attributes has been specified.         E-4    I                                                           Error Messages F         DISPTOOLGE,  Branch offset is too large for this instruction.=            Error: The specified offset is too large for thism            instruction.D            User Action: Check the range of the specified target. ItC            must be in the inclusive range -1048576 . . . +1048575.6         DUPLEXTERN,  EXTERN item is multiply defined.?            Error: The item declared as externally defined withaC            the .EXTERNAL attribute also has a conflicting multiple 1            definition within this assembly unit.aE            User Action: Check the definitions of the specified item. 5         DUPLGLOBAL,  Duplicate global name detected.O@            Warning: A duplicate global has been detected by the            assembler.D            User Action: Check all references in your source code to            this name.:         DUPMACPARAMNAME,  Duplicate macro parameter name.>            Error: The indicated macro parameter name has been            duplicated. 0            User Action: Check your source code.I         ENDEXPSC,  .END_EXACT is not valid in a psect with the NOEXE andr            NOMIX attributes._F            Error: A .END_EXACT directive is not valid in a psect with+            the NOEXE and NOMIX attributes.0            User Action: Check your source code.'         EOLEXP,  End of line expected. H            Error: The assembler expected no more input from the current            line.e0            User Action: Check your source code.H         ESCAPE,  Illegal escape sequence in string literal; expected \,            ", x, or X. H            Error: The specified escape sequence specified in the string            literal is illegal. 0            User Action: Check your source code.I                                                                      E-5E o         Error MessagesJ         EXP32BITTRUNC,  Expected an integer in the range 0 . . . (2^32)-1I            for unsigned expression OR -(2^31) . . . +(2^31)-1 for signed 3            expression. Data truncation to 32 bits.oA            Warning: Integer found was not in the expected range.hG            User Action: Check your source code. The literal must be inMF            the range 0 . . . (2^32)-1 for an unsigned expression OR -I            (2^31) . . . +(2^31)-1 for signed expression. Data truncation "            to 32 bits will occur.I         EXP32BITTYPE,  Expected an integer in the range 0 . . . (2^32)-1OI            for unsigned expression OR -(2^31) . . . +(2^31)-1 for signedC            expression.rB            Error: Expected an unsigned integer value in the rangeE            0 . . . (2^32)-1 or a signed integer value in the range -t#            (2^31) . . . +(2^31)-1. 0            User Action: Check your source code.H         EXPBINEXPTERM,  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 the 6            expression, such as the right bracket (>).H            User Action: Check the flagged item in the source statement.A         EXPFPREG,  Argument N invalid. Expected a floating pointp            register. H            Error: The instruction argument cited is invalid. A floating'            point register is expected. C            User Action: Check your source code and the instruction             documentation.E         EXPGENREG,  Argument N invalid. Expected a general register. G            Error: The instruction argument cited is invalid. A generalB!            register is expected. C            User Action: Check your source code and the instruction             documentation.         E-6     I                                                           Error Messages ?         EXPIDPROC,  Argument N invalid. Expected an identifiere+            representing a procedure value. H            Error: The argument cited is invalid. The assembler expectedA            a user identifier which represents a procedure value.oC            User Action: Check your source code and the instruction             documentation.?         EXPINTPAL,  Expected integer expression or PAL opcode. ;            Error: Integer expession or PAL opcode missing. H            User Action: Replace the flagged item with an integer or PAL            opcode.E         EXPLAB,  Argument N invalid. Expected a label 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 instructionR            documentation.D         EXPLITVAL,  Argument N invalid. Expected an integer literal5            value in the inclusive range 0 . . . 255.-A            Error: The instruction argument cited is invalid. TherF            assembler expected an integer literal in the range 0 . . .            255.C            User Action: Check your source code and the instruction             documentation.4         EXPMACRONAME,  Expected a valid macro name.C            Error: A valid macro name was expected in this context. B            User Action: Check your source code to insure that theC            item flagged is a user identifier, opcode, or non-macroc            directive.F         EXPPALOPLIT,  Argument N invalid. Expected an integer literal:            value in the inclusive range 0 . . . 67108863.A            Error: The instruction argument cited is invalid. TheX2            assembler expected an integer literal.C            User Action: Check your source code and the instructiona            documentation.I                                                                      E-7  C g        Error MessagesD         EXPREGOFF,  Argument N invalid. Expected a general register.            expression of the form offset(Rn).H            Error: The cited argument is invalid. The assembler expectedH            a general register expression of the form integer_offset(Rn)            for this argument.B            User Action: Check the source code and the instruction            documentation.G         EXPRESEXP,  Argument N invalid. Expected an expression with no >            forward references resolvable to psect +/- offset.H            Error: The argument cited is invalid. The assembler expected5            an expression with no forward references.EC            User Action: Check your source code and the instruction             documentation.?         EXPSTACKOVER,  Internal SEM expression stack overflow. 2            Fatal: An internal error has occurred.E            User Action: Gather as much information as possible about H            the circumstances under which the error occurred, and submit            an SPR.o=         EXPTOOCMPLX,  Expression is too complex to evaluate.tE            Error: The expression is too complex for the assembler toe            evaluate.tE            User Action: Try grouping the expression components usingfB            angle brackets (< >). The most complex expression formA            handled by the assembler resolves to the form: <psectfH            /symbol +/- offset> OPERATOR <psect/symbol +/- offset> whereF            OPERATOR is one of: +, -, *, /, @, \, &, or !. Consult theC            documentation for further descriptions of the assemblerA&            evaluation of expressions.D         EXPZEROFF,  Argument N invalid. Expected a general register1            expression of the form 0(Rn) or (Rn).AH            Error: The cited argument is invalid. The assembler expected<            a general register expression of the form 0(Rn).C            User Action: Check your source code and the instruction            documentation.         E-8    I                                                           Error Messages D         FOUNDEXP,  Found XXXXX when expecting one of the following:            XXXXX.C            Error: An unexpected item was found in a location wherer(            something else was expected.?            User Action: Check the unexpected item found in theRC            source statement. Examine those items cited as expectede4            as alternatives for the unexpected item.$         GENERROR,  Generated ERROR:A            Error: This was generated using the .ERROR directive. 2            User Action: Examine your source code.$         GENPRINT,  Generated PRINT:E            Informational: This statement was generated with a .PRINTs            directive.2            User Action: Examine your source code.%         GENWARN,  Generated WARNING::E            Warning: This was generated using the .WARNING directive.i2            User Action: Examine your source code.H         HEXSTR,  Illegal hexadecimal escape sequence in string literal.H            Error: The specified hexadecimal escape sequence is invalid.F            User Action: Check your source code and the documentation.F         IDFOUND,  Found identifier in the opcode field when expectingF            one of the following: opcode, directive, macro invocation,!            or symbol definition.cB            Error: The identifier cited was unexpected. Rather, anE            opcode, directive, macro invocation, or symbol definitiono            was expected.c0            User Action: Check your source code.=         IDTOOLONG,  Identifier is longer than 31 characters.pH            Error: The identifier exceeds the 31 character maximum size.F            User Action: Check your source code and rename or truncate            the identifier.I                                                                      E-9             Error Messages+         ILLASCII,  Illegal ASCII constant. E            Error: The assembler found an illegal ASCII constant witho)            the 6A or ^a radix specifier.G0            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.g0            User Action: Check your source code.+         ILLDEC,  Illegal decimal constant.nF            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. F            User Action: Check your source code and the documentation.4         ILLFLOAT,  Illegal floating point constant.D            Error: The specified floating point constant is illegal.F            User Action: Check your source code and the documentation./         ILLHEX,  Illegal hexadecimal constant.eF            Error: The assembler found an illegal binary constant with)            the ^X or ^x radix specifier.e0            User Action: Check your source code.(         ILLIFOP,  Illegal .IF operator.?            Error: An illegal operator was encountered as a .IFo            operator.DE            User Action: Check your source code and the documentationm"            for the .IF directive.7         ILLINCL,  Illegal .INCLUDE file specification.fA            Error: An illegal .INCLUDE directive was encountered.tH            User Action: Check the use of the .INCLUDE directive by your            source code.         E-10 n iI                                                           Error Messagesn)         ILLOCT,  Illegal octal constant.nF            Error: The assembler found an illegal binary constant with)            the ^O or ^o radix specifier.M0            User Action: Check your source code.=         ILLOPERANDMIX,  Illegal operand mixing for operator.aC            Error: The resolved operand types are invalid when used.1            together with the specified operator.aB            User Action: Consult the documentation descriptions of1            operators, operands, and expressions.o@         ILLPROCRET,  Illegal procedure return; linkage registerD            (argument 1) must be R31 when software hint (argument 3)            is 1. ,            Error: Illegal procedure return.G            User Action: Check the instruction arguments. When argumenteE            3, software hint, is 1, the first argument specifying the )            linkage register must be R31. H         ILLRADIX,  Illegal radix specifier in numeric constant; specify             A, B, C, D, O, or X.B            Error: The assembler found an illegal radix specifier.G            User Action: Check your source code and use one of A, B, C,n            D, O, or X.rG         INCLDEPTH,  .INCLUDE nest depth exceeds N - check for circularo            .INCLUDE. C            Error: The maximum level of include file depth has been             exceeded. A            User Action: Check your source code for circular file             inclusion.-         INCLOPEN,  .INCLUDE file open error. 5            Error: Included file could not be opened. ?            User Action: Check the file attributes, etc. of the$            specified .INCLUDE file.I                                                                     E-11v a t        Error MessagesH         INSNOTINPSC,  Instructions must be in a MIX, NOEXE; MIX,EXE; or            NOMIX,EXE PSECT.D            Error: An instruction has been specified in a psect with'            incorrect psect attributes. F            User Action: Make sure the psect has MIX, or EXE and NOMIX            attributes set. C         INTERNAL,  Internal assembler error. Please submit an SPR. 2            Fatal: An internal error has occurred.E            User Action: Gather as much information as possible aboutoH            the circumstances under which the error occurred, and submit            an SPR.A@         INTERR,  Internal processing error in the SYN facility.2            Fatal: An internal error has occurred.E            User Action: Gather as much information as possible abouttH            the circumstances under which the error occurred, and submit            an SPR.nD         INVALIGNFILL,  Invalid optional fill pattern specified with            .ALIGN directive.d9            Error: An invalid fill pattern was specified. @            User Action: Check the second argument to the .ALIGN@            directive which is the alignment fill specifier. TheG            argument must resolve to an integer. Check your source coder)            and the .ALIGN documentation. =         INVBASEEXP,  Invalid expression for .BASE directive. C            Error: The expression is not valid for .BASE directive.eE            User Action: The expression specified for a base register >            with the .BASE directive should contain no forwardH            references and resolve to one of the following at this pointH            in assembly: psect +/- offset, external symbol reference +/-H            offset, integer, label +/- offset where the label is definedE            in a psect with the EXE and NOMIX attributes. Consult thetB            documentation for further description of the assembler&            evaluation of expressions.         E-12 E DI                                                           Error Messages I         INVBASEREG,  Invalid base register specified. Base register musth%            be one of R0 through R30. 3            Error: Invalid base register specified.eF            User Action: Specify a base register as a general registerJ            from the range R0 . . . R30. R31 cannot be specified as a base?            register and is implicitly defined as .BASE R31, 0.rC         INVBRTGT,  Invalid branch target. Branch target label musttD            be defined in same psect as the branch instruction which!            references the label. D            Error: The specified label referenced as the target of aC            branch instruction must be defined in the same psect in#            which it is referenced.aG            User Action: Consult the documentation for more informationc            on labels.>         INVCA,  Invalid code address specified with procedureB            descriptor. Code address must be a non-temporary labelF            defined in a psect with the EXE or MIX attribute after its+            use with .PROCEDURE_DESCRIPTOR. G            Error: The code address specified as the second argument tou;            the .PROCEDURE_DESCRIPTOR directive is invalid.RG            User Action: The code address must be a non-temporary labeldE            defined in a psect with the EXE or NOMIX attribute. Check             your source code.c@         INVEXP,  Found XXXXX when expecting a valid expression.F            Error: One of the following was expected by the assembler:C            integer, floating point constant, identifier, register, :            period (.),  left bracket (<), unary operator.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 ina+            the cited directive is invalid. >            User Action: Consult the documentation for further=            explanation of the directive arguments and types.lI                                                                     E-13             Error Messages<         INVEXPRFORSYM,  Invalid expression type for symbol.H            Error: The assembler resolved value for the expression which?            is assigned to a local or global symbol is invalid.eF            User Action: Expressions assigned to a symbol must containD            no forward references and resolve to an integer or psectD            /label +/- offset. Consult the documentation for furtherC            descriptions of how the assembler determines symbol and             expression values.H         INVFPCONST,  Invalid floating point value detected. Check value/            range for floating point data type.rE            Error: An invalid floating point value has been detected..D            User Action: Check the specified range for the directive            type.eI         INVINSQUAL,  Instruction qualifier list specified is invalid forr            the opcode. B            Error: The instruction qualifier(s) specified with the"            opcode is/are invalid.F            User Action: Consult the documentation for a complete list8            of opcodes and valid instruction qualifiers.G         INVLCA,  Invalid or undefined code address found for procedure             descriptor.nF            Error: An invalid or undefined code address corresponds to/            the specified procedure descriptor.uF            User Action: Check your source code for the specified code            address.F         INVLISTOPT,  Invalid option specified with the .LIST or .SHOW            directive.F            Error: An invalid option has been specified with the .LIST            or .SHOW directive. F            User Action: Consult the documentation for valid directive            options.9         INVLPD,  Invalid procedure descriptor specified.vF            Error: An invalid procedure descriptor has been specified.D            There was no definition of a procedure descriptor by the            specified name.0            User Action: Check your source code.         E-14 r MI                                                           Error MessagesB         INVNLISTOPT,  Invalid option specified with the .NLIST or            .NOSHOW directive.G            Error: An invalid option has been specified with the .NLISTv"            or .NO_SHOW directive.F            User Action: Consult the documentation for valid directive            options.G         INVOFF,  Attempting to specify data intialization with currentpF            psect offset that is outside the range of 0 to 2147483647.G            Error: The current psect offset is invalid for specifying a,             data initialization.D            User Action: Check your source code and the value of the!            current psect offset.eI         INVREPCOUNT,  The integer value of the .REPEAT expression is notiH            within the inclusive range of 0 . . . 65535. A zero value is            assumed.G            Warning: The value of the .REPEAT expression must be in theEJ            inclusive range of 0 . . . 65535. Therefore, a zero expression            value is assumed.eH            User Action: Specify a repetition count between 0 and 65535.C         INVSAVEOPT,  Invalid option specified with the .SAVE_PSECT             directive.G            Error: An invalid option has been specified with the .SAVE_E            PSECT directive.F            User Action: Consult the documentation for valid directive            options.5         INVTEMPLAB,  Invalid use of temporary label.eE            Error: A temporary label reference is not allowed in this             context.F            User Action: Consult the documentation on use of temporary-            labels for a further description..B         INVTERM,  Found N when expecting a valid expression term.G            Error: An unexpected item was found where an expression was F            expected. It expected one of the following: floating pointI            number, integer, register, decimal point (.),  identifier, or             left bracket (<).A            User Action: Check the item flagged by the assembler..I                                                                     E-15            Error Messages3         LABELNOTDEF,  Undefined label encountered. 4            Error: The specified label is undefined.F            User Action: Consult the documentation for descriptions of            the valid labels. 5         LABELREDECL,  Illegal redefinition of label.aC            Error: The label is being illegally defined in multiples)            places in this assembly unit. C            User Action: Check all references to this label in your             source code.;         LABNOTINPSECT,  Label must be declared in a PSECT.eE            Error: A temporary, local, or global label declaration isC9            being made and no psect has been established. B            User Action: Make sure the a .PSECT directive has beenC            issued prior to the appearance of the label declarationm!            in the source stream.r5         LEXOPEDITSPEC,  Unrecognized edit specifier:PG            Error: The edit specifier for the %EDIT lexical operator ise            unrecognized.e?            User Action: Check your source code and consult theT/            documentation on lexical operators. G         LEXOPENDM,  Illegal modification of .ENDM directive keyword by             lexical operation.?            Error: While your macro definition contains a .ENDMs?            directive that ends the macro definition, the .ENDM-D            directive is modified by a lexical operator such that itD            can no longer be recognized as a .ENDM directive keyword%            after lexical processing. D            User Action: Change the statement to avoid modifying theE            .ENDM directive keyword with lexical operator processing.h         E-16   I                                                           Error MessagesoG         LEXOPENDR,  Illegal modification of .ENDR directive keyword by             lexical operation.E            Error: While your repeat range contains a .ENDR directiveG            that ends the repeat block, the .ENDR directive is modified ?            by a lexical operator such that it can no longer benA            recognized as a .ENDR directive keyword after lexical            processing.CD            User Action: Change the statement to avoid modifying theE            .ENDR directive keyword with lexical operator processing.hG         LEXOPSYNTAX,  Illegal lexical operator syntax (missing left orr4            right parenthesis, missing comma, etc.).E            Error: The indicated lexical operator has a syntax error.,G            User Action: Check the source code to insure correct syntaxe)            and placement of parenthesis.C         LEXSYM,  XXXXX is already a lexical string symbol name; it ,            cannot also be a numeric symbol.G            Error: You cannot have a lexical and numeric symbol by this:            same name.E            User Action: Check your source code and remove either thee1            lexical or numeric symbol definition.lH         LIBMOD_BADFORMAT,  Library module XXXXX contains illegal syntaxE            (missing .MACRO or label preceding .MACRO, missing or note9            matching .ENDM, or other macro syntax error).i2            Error: Illegal syntax was encountered.7            User Action: Check the syntax of the macro. 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; extra text ignored.G            Warning: The assembler encountered extraneouse text after aaF            .ENDM directive in a library module. This text is ignored.4            User Action: Correct the library module.I                                                                     E-17s t         Error Messages;         LIBMOD_NOT_FOUND,  Library module XXXXX not found.a>            Error: The indicated library module was not found.D            User Action: Check the spelling of the macro library and            module names.eG         LOCCTRNOTDATA,  Location counter cannot be set in an EXE,NOMIX             PSECT.E            Error: The location counter cannot be modified in a psect.            with the EXE and NOMIX attributes.D            User Action: If you need to modify the location counter,F            specify the MIX psect attribute. Consult the documentationB            for a complete description of the MIX psect attribute.E         MACCASEMATCH,  Library macro name is spelled using differentg=            alphabetic case than in .MCALL directive or macro             invocation. F            Error: There is an alphabetic case difference between thatE            specified in the macro library and the alphabetic case ofC            the macro name. A            User Action: Check the case of the macro name in yourH            source code and the case of the macro in the specified macro            library.C         MACEXPNEST,  Macro expansion exceeds maximum nesting depth+            (macro recursion not detected).E            Error: The macro is not recursive but exceeds the maximum &            allowable expansion depth.<            User Action: Check your source code for possible            restructuring.C         MACPARAMGENDEF,  You may specify a generated label defaulto;            value, or a default string value, but not both. G            Error: A default string value AND a generated label default @            value have both been specified, when only one may be            specified.2            User Action: Examine your source code.         E-18 s tI                                                           Error Messages E         MACPARAMSYNTAX,  Illegal macro parameter syntax: Found XXXXX (            when expecting one of XXXXX.5            Error: Macro parameter syntax is invalid.:G            User Action: Try replacing the unexpected argument with onet-            of those items cited as expected.AE         MACRECURSE,  Recursive macro exceeds maximum macro expansiono            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.sI         MACZERO,  Cannot evaluate expression. A zero expression value isf            assumed.H            Informational: The assembler cannot evaluate this expressionA            due to errors encountered. Therefore, a zero value iss            assumed.E            User Action: Check the expression for forward or externala            references. <         MAXIF,  Maximum nesting of .IF directives exceeded.G            Error: The maximum depth nesting of .IF directives has beene            exceeded.a<            User Action: Check your source code for possible            restructuring./         MISSENDC,  Missing .ENDC directive(s).AC            Warning: The assembler did not find a terminating .ENDC."            conditional directive.0            User Action: Check your source code./         MISSINGENDM,  Missing .ENDM directive.eE            Error: No terinating .ENDM directive was found to match a.            .MACRO directive. 0            User Action: Check your source code./         MISSINGENDR,  Missing .ENDR directive.SH            Error: The assembler expected to encounter a .ENDR directive1            to terminate a .IRP or .REPEAT block. 0            User Action: Check your source code.I                                                                     E-19M   E        Error MessagesE         MISSQUOTE,  Missing closing double-quote character in stringn            literal.F            Error: The closing double-quote is missing from the string            literal.D            User Action: Check your source code and insert a closing.            double-quote for a string literal.E         MODCODLOCCTR,  Restoring the location counter in the current B            context causes an illegal modification of the location,            counter for an EXE, NOMIX psect.E            Error: The location counter cannot be modified in a psectt.            with the EXE and NOMIX attributes.D            User Action: If you need to modify the location counter,F            specify the MIX psect attribute. Consult the documentationB            for a complete description of the MIX psect attribute.>         NOBEGEX,  Unmatched .END_EXACT directive encountered.D            Error: A .END_EXACT directive was encountered prior to a#            .BEGIN_EXACT directive.i0            User Action: Check your source code.<         NOCA,  No code address specified as argument 2 with"            .PROCEDURE_DESCRIPTOR.G            Error: No code address was specified as the second argument 3            to the .PROCEDURE_DESCRIPTOR directive.G            User Action: The code address must be a non-temporary label E            defined in a psect with the EXE or NOMIX attribute. Check            your source code.bH         NOQUAL,  Instruction qualifiers are not valid with this opcode.G            Error: No instruction qualifiers may be specified with this             opcode.sF            User Action: Consult the documentation for a complete list8            of opcodes and valid instruction qualifiers.D         NOTAQUAL,  An item specified in the qualifier list is not a            valid qualifier.B            Error: The instruction qualifier(s) specified with the"            opcode is/are invalid.F            User Action: Consult the documentation for a complete list8            of opcodes and valid instruction qualifiers.         E-20   eI                                                           Error Messages >         NOTENOUGHARGS,  Not enough arguments for instruction.C            Error: The instruction needs one or more arguments thanb            specified.H            User Action: Check the argument numbers and required formats.            as specified in the documentation.D         NOTINMACRO,  This statement must only occur within a macro.C            Error: The statement specified is only allowed within a             macro.E            User Action: Consult the documentation description of thee             statement specified.7         NOTINSEM,  Missing functionality in assembler.e6            Error: Missing functionality in assembler..            User Action: Please submit an SPR.H         NUMSYM,  XXXXX is already a numeric symbol name; it cannot also'            be a lexical string symbol.eG            Error: You cannot have a lexical and numeric symbol by thist            same name.E            User Action: Check your source code and remove either then1            lexical or numeric symbol definition. 7         OPTIGN,  VAX MACRO-32 option(s) being ignored.bF            Informational: A VAX MACRO-32 option has been detected and            is ignored. E            User Action: Remove the VAX MACRO options from your Alphau            MACRO-64 program.rB         OVERLAP,  Overlapping initializers detected at offset NN.D            Multiple initial values are specified for the same PSECT            offset.iC            Error: You are trying to statically initialize the samer$            location more than once.0            User Action: Check your source code.I                                                                     E-21             Error Messages?         PSECTALIGNCON,  PSECT alignment conflicts with earlier             declaration.C            Error: A previously specified psect alignment attribute 7            conflicts with the flagged psect attribute.dE            User Action: Check all declarations of the psect. ConsultaE            the documentation description of the .PSECT directive andt            psect attributes..>         PSECTATTRCON,  PSECT attribute conflicts with earlier            declaration.H            Error: A previously specified psect attribute conflicts with(            the flagged psect attribute.E            User Action: Check all declarations of the psect. ConsultrE            the documentation description of the .PSECT directive and             psect attributes.dF         REDUNDELSE,  You cannot specify more than one .ELSE directive&            within a single .IF block.E            Error: More than one .ELSE directive has been encounteredq&            within a single .IF block.0            User Action: Check your source code.6         RESTOREWOSAVE,  PSECT .RESTORE without .SAVE.B            Error: A .RESTORE_PSECT directive was issued without a9            previous corresponding .SAVE_PSECT directive. H            User Action: Check uses of .SAVE_PSECT and .RESTORE_PSECT in            your source code. A         SAVESTACKOVER,  Internal SEM PSECT .SAVE stack overflow.k2            Fatal: An internal error has occurred.E            User Action: Gather as much information as possible about H            the circumstances under which the error occurred, and submit            an SPR.h-         SRCREAD,  Error reading source file. E            Error: The assembler encountered an error in reading your             source file.E            User Action: Check file specifications, protections, etc.:         E-22 r eI                                                           Error Messagesd7         SYMBOLREDECL,  Illegal redefinition of symbol.s>            Error: The symbol is already defined as a label orH            explicitly declared as externally defined with the .EXTERNAL            directive.5            User Action: Check all uses of this item. :         TOOMANYARGS,  Too many arguments for instruction.F            Error: The instruction contains one or more arguments than            necessary.H            User Action: Check the argument numbers and required formats.            as specified in the documentation.G         TOOMANYMACARG,  More arguments specified than defined for thise            macro.G            Error: More arguments have been specified on the macro call,3            than were specified for its definition.rH            User Action: Check the macro definition and point of call in            your source code.C6         TOOMANYMACPARAMS,  Too many macro parameters.;            Error: Too many macro parameters are specified.r0            User Action: Check your source code.-         TRUNCDATA,  Data truncation warning.iE            Warning: The specified data value is out of range for thex<            specified directive. Data truncation will occur.1            User Action: Specify a smaller value..@         UNDCA,  Undefined code address specified with procedure            descriptor.vG            Error: The code address specified as the second argument toE=            the .PROCEDURE_DESCRIPTOR directive is undefined.nG            User Action: The code address must be a non-temporary label E            defined in a psect with the EXE or NOMIX attribute. Checkt            your source code. I                                                                     E-23e c n        Error MessagesA         UNDEFSYM,  Undefined symbol or label. Assuming .EXTERNALN            definition.xD            Warning: The referenced label or symbol does not have anF            explicit definition and an external definition is assumed.C            User Action: Use the .EXTERNAL directive to declare thet            symbol. 0         UNEXPELSE,  Unexpected .ELSE directive.A            Error: An unexpected .ELSE directive was encountered. E            User Action: Check the use of the .ELSE directive in yourC            source code to insure proper positioning with a .IF ande            .ENDC directive.0         UNEXPENDC,  Unexpected .ENDC directive.F            Error: The assembler never encountered a terminating .ENDC;            for a macro conditional directive, such as .IF.t0            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.0         UNEXPENDR,  Unexpected .ENDR directive.A            Error: An unexpected .ENDR directive was encountered.bD            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 this 0            directive occurs within a .IF block.9         UNEXPIFT,  Unexpected .IF_TRUE (.IFT) directive.C            Error: The assembler encountered an unexpected .IF_TRUEb            directive.C            User Action: Check your source code to insure that this 0            directive occurs within a .IF block.         E-24 D I                                                           Error Messages A         UNEXPIFTF,  Unexpected .IF_TRUE_FALSE (.IFTF) directive.eD            Error: The assembler encountered an unexpected .IF_TRUE_            FALSE directive.C            User Action: Check your source code to insure that this 0            directive occurs within a .IF block.2         UNEXPMEXIT,  Unexpected .MEXIT directive.A            Error: The assembler encountered an unexpected .MEXITo            directive.0            User Action: Check your source code.0         UNKDIR,  Unknown directive XXXXX found.1            Error: An internal error has occured.fE            User Action: Gather as much information as possible about G            the circumstances under which the error occurred and please             submit an SPR.D         UNKENDISOPTION,  Unknown .ENABLE/.DISABLE option specified.?            Error: The option specified for .ENABLE/.DISABLE is             incorrect.D            User Action: Check the option specified with the .ENABLE             /.DISABLE directive./         UNKNOWNATTR,  Unknown PSECT attribute. E            Error: The specified psect attribute is not recognized bye            the assembler.E            User Action: Consult the documentation description of thel            .PSECT directive.H         UNTERMEX,  N Unterminated .BEGIN_EXACT directive(s) detected in            psect XXXXX.D            Error: Unmatched .BEGIN_EXACT directive(s) occur for the            indicated psect.0            User Action: Check your source code.G         VAXDIR,  VAX MACRO-32 directive(s) or option(s) being ignored. 1            Continuing processing with next line.lF            Informational: A VAX MACRO-32 directive or option has been%            specified and is ignored.oH            User Action: Remove the VAX MACRO directives from your Alpha            MACRO-64 program.LI                                                                     E-25m r c        Error MessagesG         VMACELSE,  You cannot specify .ELSE in the same .IF block with_G            either .IF_FALSE (.IFF), .IF_TRUE (.IFT), or .IF_TRUE_FALSE             (.IFTF).H            Error: A .ELSE directive was encountered within the same .IFC            block as a .IF_FALSE, .IF_TRUE, or .IF_FALSE directive.gE            User Action: Check your source code and remove either the 3            .ELSE directive or the .IF_x directive. F         WRONGMACID,  Macro name in .ENDM does not match corresponding            .MACRO.oG            Error: The macro name specified as the optional argument toaF            the .ENDM directive does not match the name specified with/            the corresponding .MACRO directive. H            User Action: Check your souce code for matching .MACRO/.ENDM            directive pairs.@         WRONGPL,  The code address specified in the .PROCEDURE_D            DESCRIPTOR directive must occur BEFORE its definition as$            a local or global label.G            Error: The code address specified as the second argument to E            the .PROCEDURE_DESCRIPTOR directive must occur BEFORE its G            definition as a non-temporary label defined in a psect with '            the EXE or NOMIX attribute.i0            User Action: Check your source code.         E-26   wF     _________________________________________________________________F                                                                 IndexE     A                                 ASCII string storage directivec2     _______________________________      (cont'd)D     Absolute expression,  2-23          string descriptor (.ASCID),0     Accessing memory,  B-2                 5-14B     Address                             zero-terminated (.ASCIZ),0       base register (.BASE), 5-18          5-17>       local code storage directive    .ASCIZ directive,  5-17E         (.LOCAL_CODE_ADDRESS),        Assembly termination directive 7         5-83                             (.END),  5-44B       storage directive (.CODE_       Assignment statement,  1-2,.         ADDRESS),  5-28                  2-30E     .ADDRESS directive,  5-9, B-16    Automatic alignment directivest6     Addressing                          See Table B-2"       controlling alignment, B-16       to linkage section, B-13rF     Address storage directive         B______________________________B        (.ADDRESS), 5-9                .BASE directive,  5-18, 6-9:     .ALIGN directive,  5-10           Base register,  B-2@     AND operator,  2-29                 defining address,  B-14>     Argument                          Base register directive8       actual, 4-2                        (.BASE),  5-18C       determining length, 5-99        $BEGIN_EPILOGUE macro,  6-6, .       formal, 4-2                        6-13D       in a macro, 4-2                 .BEGIN_EXACT directive,  5-22=       number of, 5-97                 Binary operator,  2-28 =     Arithmetic shift operator,        .BLKA directive,  B-17v=        2-29                           .BLKD directive,  B-17e=     .ASCIC directive,  5-13           .BLKF directive,  B-17e=     .ASCID directive,  5-14, B-17     .BLKG directive,  B-17u=     .ASCII directive,  5-16           .BLKL directive,  B-17r=     ASCII string storage directive    .BLKO directive,  B-17x       counted (.ASCIC), 5-13e       string (.ASCII), 5-16F                                                               Index-1 a D        .BLKQ directive, B-17             $DATA_SECTION macro,  6-23?        .BLKS directive, B-17             Date and time lexical 7        .BLKT directive, B-17               %TIME, 3-21E3        .BLKW directive, B-17             Delimiter @        .BLKx directive, 5-24               string argument, 4-5F        Block storage allocation          Direct assignment statement,6          directive (.BLKx),  5-24           1-2, 2-30?        .BYTE directive, 5-27             Directives,  1-2, 5-1 =        Byte storage directive (.BYTE)      as operators, 2-4TD          ,  5-27                           for auto alignment, B-16H                                            general assembler, 1-2, 5-1,1        C______________________________       5-4 @        $CALL macro, 6-8, 6-9, 6-10,        macro, 1-2, 5-1, 5-7E          6-15                            Disable assembler functionsrG         instruction sequence,  6-11         directive (.DISABLE), 5-31dB        Character set                     .DOUBLE directive,  5-29?         in source statement,  2-5        Double-precision IEEEE        Character string                     directive (.T_FLOATING),,2         determining length,  5-99           5-132@        $CODE$ symbol, 6-52, 6-53         $DP symbol,  6-4, 6-52D        .CODE_ADDRESS directive, 5-28,    .DSABL, DISABLE directive,1          B-17                               5-31 @        $CODE_SECTION macro, 6-22         $DS symbol,  6-4, 6-52G        Colon (:)                         .D_FLOATING directive,  5-29,h1         in label field,  2-3                B-17 "        Conditional assembly blockI          directive                       E______________________________t>         .ELSE,  5-32                     %EDIT lexical,  3-12D         .ENDC,  5-46                     Element extraction lexical:         .IF,  5-57                         %ELEMENT, 3-14A        Created temporary label, 4-10     %ELEMENT lexical,  3-14U@         range,  2-16                     .ELSE directive,  5-32I        $CS symbol, 6-4, 6-51             .ENABL, ENABLE directive,  5-34eE        Current location counter, 2-31    Enable assembler functions, 1                                             5-34r@        D______________________________   .ENDC directive,  5-46B        $DATA$ symbol, 6-52, 6-53         End conditional assemblyC        Data Storage                         directive (.END), 5-46i?         ALIGN_DATA,  5-34                .END directive,  5-44dH        Data structures, B-6              End macro definition directive:         linkage pair,  B-7                  (.ENDM), 5-47@         procedure descriptor,  B-6       .ENDM directive,  5-47         signature block,  B-7        Index-2e i tG        .ENDR directive, 5-48             Floating-point constants (.D_a<        $END_EPILOGUE macro, 6-6, 6-24       FLOATING), 5-29?        .END_EXACT directive, 5-49        Floating-point number D        $END_PROLOGUE macro, 6-5, 6-26      arithmetic, 5-125, 5-1328        $END_ROUTINE macro, 6-27            format, 2-10=        Epilogue sequence, 6-41, B-5,       .F_FLOATING, 5-53m=          B-10, B-11                        .G_FLOATING, 5-55CD         beginning,  6-13                   in source statement, 2-99        .ERROR directive, 5-50              storage, 5-29e?        Error messages, E-1                 storing, 5-53, 5-55a>        .EVEN directive, 5-51               .S_FLOATING, 5-125>        Exact Instruction block             .T_FLOATING, 5-132@         beginning,  5-22                 Floating-point storage6         ending,  5-49                       directive=        Exact Instruction block             .D_FLOATING, 5-29o=          directive (.BEGIN_EXACT),         .F_FLOATING, 5-53a=          5-22                              .G_FLOATING, 5-55s?        Exclusive OR operator, 2-29       Formal argument,  4-2dG        Expression, 2-22                  .F_FLOATING, FLOAT directive,o1         absolute,  2-23                     5-53 F         evaluation of,  2-22             .F_FLOATING directive,  B-17         external,  2-23I         global,  2-22                    G______________________________eB         relocatable,  2-22, 2-32         Global expression,  2-22<        .EXTERNAL, EXTRN directive,       Global label,  2-3E          5-52                            Global symbol,  2-15, 5-136f:        External expression, 2-23           defining, 5-34G        External symbol, 5-136            .G_FLOATING directive,  5-55,y1         attribute directive                 B-17             (.EXTERNAL),  5-52+         defining,  5-34, 5-52            II        %EXTRACT lexical, 3-15            _______________________________ A                                          .IDENT directive,  5-56NB        F______________________________   Identification directive;        Fields                               (.IDENT), 5-56 >         comment,  2-2, 2-5               .IF directive,  5-57?         label,  2-2, 2-3                 .IFx directive,  5-63eD         operand,  2-2, 2-4               .IF_FALSE directive,  5-63C         operator,  2-2, 2-4              .IF_TRUE directive,  5-63OI        Floating-point arithmetic         .IF_TRUE_FALSE directive,  5-63 ?          directive                       .IIF directive,  5-67i         .S_FLOATING,  5-125         .T_FLOATING,  5-132I                                                                  Index-3u t oA        Immediate conditional assembly    Lexical operators,  3-1 6          block directive (.IIF),           list, 3-11;          5-67                              processing, 3-1 =        .INCLUDE directive, 5-69            syntax rules, 3-1?        Inclusive OR operator, 2-29       Lexical string symbol:G        Indefinite repeat argument          with quoted string literal,u1          directive (.IRP),  5-72             3-4eF        Indefinite repeat character       Lexical string symbols,  3-4C          directive (.IRPC),  5-75        .LIBRARY directive,  5-78aD        Instruction directive, 5-70       $LINK$ symbol,  6-52, 6-53I        .INSTRUCTION directive, 5-70,     .LINKAGE_PAIR directive,  5-80,A1          B-17                               B-17AD        Instructions                      $LINKAGE_PAIR macro,  6-28G         as operators,  2-4               $LINKAGE_SECTION macro,  6-30SF        Integer                           Linking directive (.LINKAGE_8         in source statement,  2-9           PAIR), 5-80@        %INTEGER lexical, 3-16            .LIST directive,  5-82C        Invoking assembler, 1-3           Listing control directive 8        .IRPC directive, 5-75               .IDENT, 5-567        .IRP directive, 5-72                .LIST, 5-82i9                                            .NLIST, 5-101y:        K______________________________     .NOSHOW, 5-102C        Keyword argument, 4-3             Listing directive (.SHOW, ;                                             NOSHOW), 5-126TD        L                                 Listing table of contents,2        _______________________________      5-131?        Label                             Local address storagegD         created temporary,  4-10            directive (.LOCAL_CODE_;         global,  2-3                        ADDRESS), 5-83f;         local,  2-3                      Local label,  2-3 9         temporary,  2-3                    saving, 5-124,;         user-defined temporary,          Local label block 8            2-15, 4-10                      ending, 5-34:        Labeling directive                  starting, 5-34A         .LOCAL_DESCRIPTOR,  5-85         Local linking directivemH         .PROCEDURE_DESCRIPTOR,  5-109       (.LOCAL_LINKAGE_PAIR), 5-84=        Length Determining lexical        Local symbol,  2-14iH         %LENGTH,  3-17                   .LOCAL_CODE_ADDRESS directive,7        %LENGTH lexical, 3-17                5-83, B-17cH        %%-Lexical escape operator,       .LOCAL_LINKAGE_PAIR directive,7          3-5                                5-84, B-17 E        Lexical escape operator (%%),     .LOCAL_PROCEDURE_DESCRIPTORsB          3-5                                directive, 5-85, B-17        Index-4    B        %LOCATE lexical, 3-18             Macro arguments (cont'd)D        Location control directive          SCRATCH_REGS, 6-11, 6-18>         .ALIGN,  5-10                      SET_ARG_INFO, 6-17A         .BLKx,  5-24                       SIGNATURE_BLOCK, 6-19g:        Location counter                    SIZE, 6-4, 6-7D         current,  2-31                     STACK_RETURN_VALUE, 6-17B        Location counter alignment          STANDARD_PROLOGUE, 6-57          directive (.ODD),  5-105          string, 4-5 5        Location counter control            TIE, 6-18rB          directive (.EVEN),  5-51          USES_VAX_ARGLIST, 6-19>        Logical AND operator              Macro call directive=         See AND operator                    (.LIBRARY), 5-92 ;        Logical exclusive OR operator     Macro calls,  4-1r=         See Exclusive OR operator          as operators, 2-4v8                                            nested, 5-89E        Logical inclusive OR operator       number of arguments, 5-97H         See Inclusive OR operator        MACRO command qualifiers,  1-3@        .LONG directive, 5-87, B-16       Macro definition,  4-1>        Longword storage directive          default value, 4-38          (.LONG),  5-87                    ending, 5-47=        $LS symbol, 6-4, 6-10, 6-52         labeling in, 4-10 D                                          Macro definition directive;        M______________________________      (.MACRO), 5-88eB        MACRO-64 Assembler for OpenVMS    Macro deletion directive=          AXP Systems                        (.MDELETE), 5-93tA         introduction,  1-1               .MACRO directive,  5-88tH        Macro arguments, 4-2              Macro exit directive (.MEXIT),1         actual,  4-2                        5-94o?         ARGS,  6-8, 6-16                 Macro expansion,  4-1t9         ARGS parameters,  6-16             printing, 4-1e=         concatenated,  4-9                 terminating, 5-94mA         delimited,  4-5, 4-8             Macro include directive=         formal,  4-2                        (.INCLUDE), 5-69tA         FUNC_RETURN,  6-19               Macro library directive-=         keyword,  4-3                       (.LIBRARY), 5-78 ;         KIND,  6-5, 6-6                  Macro name,  2-13p6         LOCAL,  6-10, 6-16               Macros,  4-1A         LS,  6-16                          calling routines, 6-8 G         NAMES,  6-12                       $CALL instruction sequence,i1         NONSTANDARD,  6-20                   6-8iC         positional,  4-3                   defining a routine, 6-6@         Rls,  6-9, 6-15                    ending routines, 6-2E         RSA_END,  6-4                      for calling routines, 6-2eE         RSA_OFFSET,  6-4                   in epilogue sections, 6-6          SAVED_REGS,  6-6sI                                                                  Index-5  u G        Macros (cont'd)                   Number of arguments directiveu:         in prologue sections,  6-5,         (.NARG), 5-97H            6-6                           Number of characters directive:         in source code,  6-9                (.NCHR), 5-99F         MACRO-64 supplied,  6-1          Numeric complement operator,1         MACRO-64 supplied library,          2-27P8            6-1                           Numeric symbolG         making multiple calls,  6-11       with lexical string symbol, 1         nested,  4-6, 5-89                   3-4n?         passing numeric value to,        Numeric symbols,  3-4             4-9_I         recursive,  5-89                 O______________________________o7         redefining,  5-89                Object module =         supplied,  6-12 to 6-53            identifying, 5-56 9         switching psects,  6-3, 6-6        naming, 5-133 8         syntax rules,  6-12                title, 5-133G         within routines,  6-2            Obtaining information lexicalt7         with same name as opcode,          %TYPE, 3-22rG            5-89                          .OCTA directive,  5-103, B-16rD        .MCALL directive, 5-92            Octaword storage directive;        .MDELETE directive, 5-93             (.OCTA), 5-103@        Memory                            .ODD directive,  5-105:         accessing,  B-2                  One's complement?        Message display directive           of expression, 2-27.0         .ERROR,  5-50                    Opcode<         .PRINT,  5-108                     redefining, 5-89I        Messages                            with the same name as a macroy5         errors,  E-1                         ,  5-89S=        Message warning display           $OPDEF macro,  6-31a7          directive (.WARN),  5-135       Operand,  2-4 8        .MEXIT directive, 5-94            Operator,  2-45                                            AND, 2-29tB        N______________________________     arithmetic shift, 2-298        .NARG directive, 5-97               binary, 2-28<        .NCHR directive, 5-99               complement, 2-27>        .NLIST directive, 5-101             exclusive OR, 2-29>        .NOSHOW directive, 5-102            inclusive OR, 2-29D        Number                              numeric complement, 2-27?         See also Integer, Floating-        radix control, 2-26 7            point number, and Packed        unary, 2-25B>            decimal string                Operator field,  2-4"         in source statement,  2-8        Index-6u i I        P______________________________   Q______________________________6G        .PACKED directive, 5-106          .QUAD directive,  5-118, B-16_D        .PACKED macro, 6-37               Quadword storage directive;        Packed storage directive             (.QUAD), 5-118 ?          (.PACKED),  5-106               Quoted string literal_G        .PAGE directive, 5-107              with lexical string symbol, 1        Page ejection directive               3-4m          (.PAGE),  5-107 I        Period (.)                        R______________________________ G         current location counter,        Radix control operator,  2-26 B            2-31                          Range extraction lexical:        Permanent symbol, 2-11, 2-13        %EXTRACT, 3-15D        Positional argument, 4-3          Register name,  2-11, 2-14G        .PRINT directive, 5-108           Relocatable expression,  2-22 6        .PROCEDURE_DESCRIPTOR             Repeat blockG          directive,  5-109, B-17           argument substitution, 5-72TH        $PROCEDURE_DESCRIPTOR macro,        character substitution, 5-75H          6-40                              terminating repetition, 5-94@        Program section                   Repeat block directive=         attributes,  5-111                  (.REPEAT), 5-119BC         code,  6-2                       .REPEAT directive,  5-119@         data,  6-2                       %REPEAT lexical,  3-19D         defining,  5-111                 Repeat range end directive:         directive                           (.ENDR), 5-48A            .PSECT,  5-111                .REPT directive,  5-119 B            .RESTORE,  5-122              .RESTORE_PSECT, .RESTORE=            .SAVE,  5-124                    directive, 5-122 C         linkage,  6-2                    $RETURN macro,  6-6, 6-41 D         name,  5-116                     $ROUTINE macro,  6-5, 6-42D         restoring context of,  5-122       qualifiers, 6-42 to 6-518         saving context of,  5-124        Routines,  B-99         saving local label,  5-124         See Table B-1e=        Prologues                           bound frame, B-10eG         entry and exit,  B-11              defining type by macro, 6-5 <        Prologue sequence, B-5, B-10,       null frame, B-10=          B-11                              performance, B-11 @         ending,  6-26                      register frame, B-10=        .PSECT directive, 5-111             stack frame, B-10 E                                          $RSA_END symbol,  6-4, 6-522H                                          $RSA_OFFSET symbol,  6-4, 6-5,1                                             6-52tI                                                                  Index-7    e:                                          Strings (cont'd)?        S______________________________     extracting elementsi?        .SAVE_PSECT, .SAVE directive,         (%ELEMENT),  3-14sH          5-124                             extracting range (%EXTRACT),2        Shift operator, 2-29                  3-15G        .SHOW, .NOSHOW directive,           locating lexical (%LOCATE),u2          5-126                               3-18I        Signed byte data directive          obtaining information lexicalD<          (.SIGNED_BYTE),  5-129              (%TYPE),  3-22C        Signed word storage directive       obtaining value lexical >          (.SIGNED_WORD),  5-130              (%STRING),  3-20H        .SIGNED_BYTE directive, 5-129       repeating lexical (%REPEAT),2        .SIGNED_WORD directive, 5-130,        3-19G          B-16                            Subconditional assembly block56        Single-precision IEEE                directive;          directive                         .IF_FALSE, 5-63F:         .S_FLOATING,  5-125                .IF_TRUE, 5-63@        $SIZE symbol, 6-4, 6-5, 6-52        .IF_TRUE_FALSE, 5-63E        $STACK_ARG_SIZE symbol, 6-4       .SUBTITLE, SBTTL directive, 2        Statements                           5-131B         character set,  2-5              Subtitle listing controlC         comment,  2-5                       directive (.SUBTITLE),42         continuation of,  2-2               5-1317         field,  2-1                      Symbol,  2-11 A         format,  2-1                       defined by $CALL, 6-4 D         label,  2-3                        defined by $ROUTINE, 6-4F         operand,  2-4                      determining value of, 2-13A         operator,  2-4                     external, 5-52, 5-136i?         types,  1-1                        global, 2-15, 5-136oB        String argument, 4-5                in operand field, 2-14C        String editing lexical              in operator field, 2-13d7         %EDIT,  3-12                       local, 2-14 <        %STRING lexical, 3-20               macro name, 2-13A        String locating lexical             permanent, 2-11, 2-13 E         %LOCATE,  3-18                     register name, 2-11, 2-14 ;        String repeating lexical            undefined, 5-34 D         %REPEAT,  3-19                     user-defined, 2-12, 2-14D        Strings                           Symbol attribute directive;         date/time lexical (%LEX),           (.WEAK), 5-1366H            3-21                          .S_FLOATING directive,  5-125,1         determining length (%LENGTH),       B-176            3-17!         editing lexical (%EDIT),-            3-12        Index-8, 5 G                                          User-defined temporary label,r1        T______________________________      2-15r7        Tab stops                           range, 2-16 "         in source statement,  2-2I        Temporary label, 2-3              V______________________________TB         user-defined,  2-15              Value conversion lexical:        Term in MACRO statement, 2-22       %INTEGER, 3-16A        %TIME lexical, 3-21               Value obtaining lexical9        .TITLE directive, 5-133             %STRING, 3-2050        Title listing control             ValuesG          directive (.TITLE),  5-133        converting (%INTEGER), 3-16n        %TYPE lexical, 3-22 I        .T_FLOATING directive, 5-132,     W______________________________-A          B-17                            .WARN directive,  5-135 A        U                                 .WEAK directive,  5-136gG        _______________________________   .WORD directive,  5-138, B-16 H        Unary operator, 2-25              Word storage directive (.WORD)4        User-defined symbol, 2-12,           , 5-138          2-14I                                                                  Index-9e