VMS Help  —  MACRO  /ALPHA  Temporary Labels Within Source Code
    Use temporary labels to identify addresses within a block of
    source code.
    Format
    nnnnn$:

 nnnnn

    A decimal integer in the range of 1 to 65,535.

    In most cases, you can use temporary labels in the same way
    you use other labels that you define; however, there are some
    differences:

    o  Temporary labels cannot be referenced outside the temporary
       label block in which they are declared.

    o  Temporary labels can be redeclared in another block of source
       code.

    o  Temporary labels that occur within a psect with the MIX or
       NOMIX attribute do not appear in the debugger symbol table;
       thus, they cannot be accessed by the symbolic debugger.

    o  Temporary labels cannot be used in the .END or
       .PROCEDURE_DESCRIPTOR directives.

    By convention, temporary labels are positioned like statement
    labels: left-justified in the source text. Although temporary
    labels can appear in the program in any order, by convention,
    the temporary labels in any block of source code should be in
    increasing numeric order.

    Temporary labels are useful as branch addresses when you use
    the address only within the block. You can use temporary labels
    to distinguish between addresses that are referenced only in a
    small block of code and addresses that are referenced elsewhere
    in the module. A disadvantage of temporary labels is that their
    numeric names do not provide any indication of their purpose.
    Consequently, you should not use temporary labels to label
    sequences of statements that are logically unrelated; you should
    use user-defined symbols instead.

    Digital recommends that users create temporary labels only in
    the range of 0$ to 29999$ because the assembler automatically
    creates temporary labels in the range of 30000$ to 65535$ for use
    in macros.

    The temporary label block in which a temporary label is valid is
    delimited by the following statements:

    o  A user-defined label: global or local.

    o  A .PSECT directive.

       An example showing the correct and incorrect use of temporary
       labels follows:

       A:    ADDQ R1, R2, R3
             BEQ R3, 2$         ; correct use
             MULQ R2, R3, R4
       2$:   ADDQ R1, R4, R5    ; definition of temporary label
       B:    BNE R5, 2$         ; illegal
       C:    SUBQ R2, R4, R6

       In this example, 2$ is a temporary label defined in the
       block between A: and B:. The forward reference in the second
       instruction is properly resolved. The line labeled B: also
       references 2$, but the label B has already closed the range.
       The temporary label 2$ can be used later in the program, but
       its definition must appear within the same block as the label.

    o  The .ENABLE and .DISABLE directives, which can extend a local
       label block beyond user-defined labels and .PSECT directives.

    A temporary label block is usually delimited by two user-defined
    labels. However, the .ENABLE LOCAL_BLOCK directive starts a local
    block that is terminated by one of the following:

    o  A second .ENABLE LOCAL_BLOCK directive

    o  A .DISABLE LOCAL_BLOCK directive followed by a user-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. See the
    descriptions of the .SAVE_PSECT [LOCAL_BLOCK] directive and the
    .RESTORE_PSECT directive.
Close Help