Updated: 11 December 1998 |
VAX MACRO and Instruction Set Reference Manual
Previous | Contents | Index |
Cross-reference directives
.CROSS [symbol-list]
.NOCROSS [symbol-list]
symbol-list
A list of legal symbol names separated by commas (,).
When you specify the /CROSS_REFERENCE qualifier in the MACRO command, VAX MACRO produces a cross-reference listing. The .CROSS and .NOCROSS directives control which symbols are included in the cross-reference listing. The .CROSS and .NOCROSS directives have an effect only if /CROSS_REFERENCE was specified in the MACRO command (see the OpenVMS DCL Dictionary).By default, the cross-reference listing includes the definition and all the references to every symbol in the module.
You can disable the cross-reference listing for all symbols or for a specified list of symbols by using .NOCROSS. Using .NOCROSS without a symbol list disables the cross-reference listing of all symbols. Any symbol definition or reference that appears in the code after .NOCROSS used without a symbol list and before the next .CROSS used without a symbol list is excluded from the cross-reference listing. You reenable the cross-reference listing by using .CROSS without a symbol list.
.NOCROSS with a symbol list disables the cross-reference listing for the listed symbols only. .CROSS with a symbol list enables or reenables the cross-reference listing of the listed symbols.
Notes
#1 |
---|
.NOCROSS ; Stop cross-reference LAB1: MOVL LOC1, LOC2 ; Copy data .CROSS ; Reenable cross-reference |
In this example, the definition of LAB1 and the references to LOC1 and LOC2 are not included in the cross-reference listing.
#2 |
---|
.NOCROSS LOC1 ; Do not cross-reference LOC1 LAB2: MOVL LOC1,LOC2 ; Copy data .CROSS LOC1 ; Reenable cross-reference ; of LOC1 |
In this example, the definition of LAB2 and the reference to LOC2 are included in the cross-reference, but the reference to LOC1 is not included in the cross-reference.
Debug symbol attribute directive
.DEBUG symbol-list
symbol-list
A list of legal symbols separated by commas (,).
.DEBUG specifies that the symbols in the list are made known to the VAX Symbolic Debugger. During an interactive debugging session, you can use these symbols to refer to memory locations or to examine the values assigned to the symbols.
Note
The assembler adds the symbols in the symbol list to the symbol table in the object module. You need not specify global symbols in the .DEBUG directive because global symbols are automatically put in the object module's symbol table. (See the description of .ENABLE for a discussion of how to make information about local symbols available to the debugger.)
.DEBUG INPUT,OUTPUT,- ; Make these symbols known LAB_30,LAB_40 ; to the debugger |
Default control directive
.DEFAULT DISPLACEMENT, keyword
keyword
One of three keywords---BYTE, WORD, or LONG---indicating the default displacement length.
.DEFAULT determines the default displacement length for the relative and relative deferred addressing modes (see Section 5.2.1 and Section 5.2.2).
Notes
.DEFAULT DISPLACEMENT,WORD ; WORD is default MOVL LABEL,R1 ; Assembler uses word ; displacement unless ; label has been defined .DEFAULT DISPLACEMENT,LONG ; LONG is default INCB @COUNTS+4 ; Assembler uses longword ; displacement unless ; COUNTS has been defined |
Floating-point storage directive
.D_FLOATING literal-list
.DOUBLE literal-list
literal-list
A list of floating-point constants (see Section 3.2.2). The constants cannot contain any unary or binary operators except unary plus or unary minus.
.D_FLOATING evaluates the specified floating-point constants and stores the results in the object module. .D_FLOATING generates 64-bit, double-precision, floating-point data (1 bit of sign, 8 bits of exponent, and 55 bits of fraction). See the description of .F_FLOATING for information on storing single-precision floating-point numbers and the descriptions of .G_FLOATING and .H_FLOATING for descriptions of other floating-point numbers.
Notes
.D_FLOATING 1000,1.0E3,1.0000000E-9 ; Constant .DOUBLE 3.1415928, 1.107153423828 ; List .D_FLOATING 5, 10, 15, 0, 0.5 |
Function control directive
.DISABLE argument-list
argument-list
One or more of the symbolic arguments listed in Table 6-3 in the description of .ENABLE. You can use either the long or the short form of the symbolic arguments. If you specify multiple arguments, separate them by commas (,), spaces, or tabs.
.DISABLE disables the specified assembler functions. See the description of .ENABLE for more information.
Note
The alternate form of .DISABLE is .DSABL.
Function control directive
.ENABLE argument-list
argument-list
One or more of the symbolic arguments listed in Table 6-3. You can use either the long form or the short form of the symbolic arguments.If you specify multiple arguments, separate them with commas (,), spaces, or tabs.
Long Form | Short Form | Default Condition |
Function |
---|---|---|---|
ABSOLUTE | AMA | Disabled | When ABSOLUTE is enabled, all the PC relative addressing modes are assembled as absolute addressing modes. |
DEBUG | DBG | Disabled | When DEBUG is enabled, all local symbols are included in the object module's symbol table for use by the debugger. |
GLOBAL | GBL | Enabled | When GLOBAL is enabled, all undefined symbols are considered external symbols. When GLOBAL is disabled, any undefined symbol that is not listed in an .EXTERNAL directive causes an assembly error. |
LOCAL_BLOCK | LSB | Disabled | When LOCAL_BLOCK is enabled, the current local label block is ended and a new one is started. When LOCAL_BLOCK is disabled, the current local label block is ended. See Section 3.4 for a complete description of local label blocks. |
SUPPRESSION | SUP | Disabled | When SUPPRESSION is enabled, all symbols that are defined but not referred to are not listed in the symbol table. When SUPPRESSION is disabled, all symbols that are defined are listed in the symbol table. |
TRACEBACK | TBK | Enabled | When TRACEBACK is enabled, the program section names and lengths, module names, and routine names are included in the object module for use by the debugger. When TRACEBACK is disabled, VAX MACRO excludes this information and, in addition, does not make any local symbol information available to the debugger. |
TRUNCATION | FPT | Disabled | When TRUNCATION is enabled, single-precision, floating-point numbers are truncated. When TRUNCATION is disabled, single-precision floating-point numbers are rounded. D_floating, G_floating, and H_floating numbers are not affected by .ENABLE TRUNCATION; they are always rounded. |
VECTOR | Disabled | When VECTOR is enabled, the assembler accepts and correctly handles vector code. If vector assembly is not enabled, vector code produces assembly errors. |
.ENABLE enables the specified assembly function. .ENABLE and its negative form, .DISABLE, control the following assembler functions:
- Creating local label blocks
- Making all local symbols available to the debugger and enabling the traceback feature
- Specifying that undefined symbol references are external references
- Truncating or rounding single-precision floating-point numbers
- Suppressing the listing of symbols that are defined but not referenced
- Specifying that all the PC references are absolute, not relative
Note
The alternate form of .ENABLE is .ENABL.
.ENABLE ABSOLUTE, GLOBAL ; Assemble relative address mode ; as absolute address mode, and consider ; undefined references as global .DISABLE TRUNCATION,TRACEBACK ; Round floating-point numbers, and ; omit debugging information from ; the object module |
Assembly termination directive
.END [symbol]
symbol
The address (called the transfer address) at which program execution is to begin.
.END terminates the source program. No additional text should occur beyond this point in the current source file or in any additional source files specified in the command line for this assembly. If any additional text does occur, the assembler ignores it. The additional text does not appear in either the listing file or the object file.
Notes
.ENTRY START,0 ; Entry mask . . ; Main program . .END START ; Transfer address |
End conditional directive
.ENDC
.ENDC terminates the conditional range started by the .IF directive. See the description of .IF for more information and examples.
End definition directive
.ENDM [macro-name]
macro-name
The name of the macro whose definition is to be terminated. The macro name is optional; if specified, it must match the name defined in the matching .MACRO directive. The macro name should be specified so that the assembler can detect any improperly nested macro definitions.
.ENDM terminates the macro definition. See the description of .MACRO for an example of the use of .ENDM.
Note
If .ENDM is encountered outside a macro definition, the assembler displays an error message.
End range directive
.ENDR
.ENDR indicates the end of a repeat range. It must be the final statement of every indefinite repeat block directive (.IRP and .IRPC) and every repeat block directive (.REPEAT). See the description of these directives for examples of the use of .ENDR.
Entry directive
.ENTRY symbol,expression
symbol
The symbolic name for the entry point.expression
The register save mask for the entry point. The expression must be an absolute expression and must not contain any undefined symbols.
.ENTRY defines a symbolic name for an entry point and stores a register save mask (2 bytes) at that location. The symbol is defined as a global symbol with a value equal to the value of the location counter at the .ENTRY directive. You can use the entry point as the transfer address of the program. Use the register save mask to determine which registers are saved before the procedure is called. These saved registers are automatically restored when the procedure returns control to the calling program. See the description of the procedure call instructions in Chapter 9.
symbol:: .WORD expression |
Although your program can call a procedure starting with this
construct, the entry mask is not checked for any illegal registers, and
the symbol cannot be used in a .MASK directive.
symbol:: first instruction |
The first instruction of the routine immediately follows the symbol.
.ENTRY CALC,^M<R2,R3,R7> ; Procedure starts here. ; Registers R2, R3, and R7 ; are preserved by CALL ; and RET instructions |
Error directive
.ERROR [expression] ;comment
expression
An expression whose value is displayed when .ERROR is encountered during assembly.;comment
A comment that is displayed when .ERROR is encountered during assembly. The comment must be preceded by a semicolon (;).
.ERROR causes the assembler to display an error message on the terminal or batch log file and in the listing file (if there is one).
Notes
.IF DEFINED LONG_MESS .IF GREATER 1000-WORK_AREA .ERROR 25 ; Need larger WORK_AREA; .ENDC .ENDC |
In this example, if the symbol LONG_MESS is defined and if the symbol WORK_AREA has a value of 1000 or less, the following error message is displayed:
%MACRO-E-GENERR, Generated ERROR: 25 Need larger WORK_AREA |
Even location counter alignment directive
.EVEN
.EVEN ensures that the current value of the location counter is even by adding 1 if the current value is odd. If the current value is already even, no action is taken.
External symbol attribute directive
.EXTERNAL symbol-list
symbol-list
A list of legal symbols, separated by commas (,).
.EXTERNAL indicates that the specified symbols are external; that is, the symbols are defined in another object module and cannot be defined until link time (see Section 3.3.3 for a discussion of external references).
.EXTERNAL SIN,TAN,COS ; These symbols are defined in .EXTERNAL SINH,COSH,TANH ; externally assembled modules |
Previous | Next | Contents | Index |
Copyright © Compaq Computer Corporation 1998. All rights reserved. Legal |
4515PRO_007.HTML
|