VMS Help  —  MACRO  /ALPHA  Source Statement Format
    MACRO-64 source statements can have a maximum of four fields, as
    follows:

    o  Label field-Symbolically defines a location in a program.

    o  Operator field-Specifies the action to be performed by the
       statement; this can be an instruction, an assembler directive,
       or a macro call.

    o  Operand field-Contains the instruction operands or the
       assembler directive arguments or the macro arguments.

    o  Comment field-Contains a comment that explains the meaning of
       the statement; this does not affect program execution.

    You can separate statement fields by either a space or a tab
    stop, but Digital recommends that you format statements with the
    Tab key to ensure consistency and clarity.

    Table 1 Using Tab Stops in Statement Fields

              Column
              in
              Which
              Field
    Field     Begins   Tab Stops to Reach Column

    Label     1        0
    Operator  9        1
    Operand   17       2
    Comment   41       5

    The following example shows a typical source statement:

    EXP:    .BLKL   50           ; Table stores expected values
    Rules for Coding Source Statements
    The following rules apply for coding source statements:

    o  You can continue a single statement on several lines by
       using a hyphen (-)  as the last nonblank character before
       the comment field, or at the end of line (when there is no
       comment).

    o  In most cases, you can continue a statement at any point. If a
       symbol name is continued and the first character on the second
       line is a tab or a blank, the symbol name is terminated at
       that character.

    o  Blank lines are legal, but they have no significance in the
       source program except that they terminate a continued line.

    The following sections describe each of the statement fields in
    detail.

1  –  Label Field

    A label is a user-defined symbol that identifies a location in
    the program. The symbol is assigned a value equal to the location
    counter where the label occurs. The following rules apply when
    coding source statements with labels:

    o  If a statement contains a label, the label must be in the
       first field on the line.

    o  The user-defined symbol name can be up to 31 characters long
       and can contain any alphanumeric character, as well as the
       underscore (_),  dollar sign ($), and period (.)  characters.

    o  If a label extends past column 7, Digital recommends you place
       it on a line by itself so that the following operator field
       can start in column 9 of the next line.

    o  A label is terminated by a colon (:)  or a double colon (::).

    In the following source statement, EXP: is the label field:

    EXP:    .BLKL   50           ; Table stores expected values

    There are three types of labels:

    o  Global labels-Can be referenced by other object modules and
       are defined using a double colon (::).

    o  Local labels-Can be referenced only within the current module
       and are defined using a single colon (:).

    o  Temporary labels-Can be referenced only within the bounds
       of either two local labels, two global labels, two psects
       (program sections), or within the bounds of a temporary
       label scope, as defined by .ENABLE LOCAL_BLOCK and
       .DISABLE LOCAL_BLOCK. Temporary labels are defined using one
       to five digits followed by a dollar sign and a single colon
       ($:).

    The following example shows how these labels appear in use:

    EXP:    .BLKL   50           ; EXP is a local label used to
                                 ; identify a 50-word block of storage
    DATA::  .BLKW   25           ; DATA is a global label used to
                                 ; identify a 25-word block of storage
    10$:    .BLKW    5           ; 10$ is a temporary label used to
                                 ; identify a five word block of
                                 ; storage.

2  –  Operator Field

    The operator field specifies the action to be performed by the
    statement. This field can contain an instruction, an assembler
    directive, or a macro call. If the operator is:

    o  An instruction, MACRO-64 generates the binary code for that
       instruction in the object module.

    o  A directive, MACRO-64 performs certain control actions or
       processing operations during source program assembly.

    o  A macro call, MACRO-64 expands the macro.

    Use either a space or a tab stop to terminate the operator
    field; however, Digital recommends that you use the tab stop
    to terminate the operator field.

    In the following source statement, .BLKL is the operator field:

    EXP:    .BLKL   50           ; Table stores expected values

3  –  Operand Field

    The operand field can contain operands for instructions or
    arguments for either assembler directives or macro calls.

    Operands for instructions identify the memory locations or the
    registers that are used by the machine operation. The operand
    field for a specific instruction must contain the correct number
    and type of operands required by that instruction.

    Arguments for a directive must meet the format requirements of
    that directive.

    Operands for a macro must meet the requirements specified in the
    macro definition.

    Use a comma (,)  to separate operands for instructions and
    directives.

    The semicolon that starts the comment field terminates the
    operand field. If a line does not have a comment field, the
    operand field is terminated by the end of the line.

    In the following source statement example, 50 is the operand
    field supplied to the operator field, .BLKL:

    EXP:    .BLKL   50          ; Table stores expected values

4  –  Comment Field

    The comment field contains text that explains the function of the
    statement. You can use comments to describe algorithms, reasons
    for selecting particular methods, and parameters passed to
    routines. Comments do not affect assembly processing or program
    execution.

    The comment field must be preceded by a semicolon (;)  and can
    contain any printable ASCII character. It is terminated by the
    end of the line.

    A comment can appear on a line by itself. If a comment does
    not fit on one line, it can be continued on the next, but the
    continuation must be preceded by another semicolon.

    In the following source statement example, "Table stores expected
    values" is the comment field. Note that the comment field begins
    with a semicolon.

    EXP:    .BLKL   50          ; Table stores expected values
Close Help