VMS Help
MACRO, VAX MACRO Assembler, Directives
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
The general assembler directives provide facilities for performing
11 types of functions; listing control, message display,
assembler option, data storage, location control, program
sectioning, symbol control, routine entry point,
conditional and subconditional assembly, cross-reference,
instruction generation, and linker option.
The alternate form, if any, is given in parentheses.
Stores successive longwords containing addresses in the
object module. DIGITAL recommends that you use .ADDRESS rather
than .LONG for storing address data to provide additional
information to the Linker. In shareable images, addresses
that you specify with .ADDRESS produce position-independent
code.
.ADDRESS address-list
address-list
A list of symbols or expressions, separated by commas, which
VAX MACRO interprets as addresses. Repetition factors are not
allowed.
Aligns the location counter to the boundary specified by either
an integer or a keyword.
.ALIGN integer[,expression]
.ALIGN keyword[,expression]
integer
An integer in the range of 0 through 9. The location counter
is aligned at an address that is the value of 2 raised to the
power of the integer.
keyword
One of five keywords that specify the alignment boundary.
The location counter is aligned to an address that is the next
multiple of the values listed below.
Keyword Size (in Bytes)
BYTE 2^0 = 1
WORD 2^1 = 2
LONG 2^2 = 4
QUAD 2^3 = 8
PAGE 2^9 = 512
expression
Specifies the fill value to be stored in each byte. The
expression must not contain any undefined symbols and must
be an absolute expression.
ASCII character storage directives
VAX MACRO has four ASCII character storage directives:
Directive Function
ASCIC Counted ASCII string storage
ASCID String-descriptor ASCII string storage
ASCII ASCII string storage
ASCIZ Zero-terminated ASCII string storage
Each directive is followed by a string of characters enclosed in
a pair of matching delimiters. The delimiters can be any
printable character except the space or tab character, equal
sign (=), semicolon (;), or left angle bracket (<). The character
that you use as the delimiter cannot appear in the string itself.
Although you can use alphanumeric characters as delimiters, use
nonalphanumeric characters to avoid confusion.
Any character except the null, carriage return, and form
feed characters can appear within the string. The assembler
does not convert lowercase alphabetic characters to uppercase.
ASCII character storage directives convert the characters to
their 8-bit ASCII and store them one character to a byte.
Any character, including the null, carriage return, and form
feed characters, can be represented by an expression enclosed
in angle brackets outside of the delimiters. You must define the
ASCII values of null, carriage return, and form feed with a
direct assignment statement. The ASCII character storage
directives store the 8-bit binary value specified by the
expression.
ASCII strings can be continued over several lines. Use the hyphen
as the line continuation character and delimit the string on each
line at both ends. Note that you can use a different pair of
delimiters for each line.
3.1 - .ASCIC
Performs the same function as .ASCII, except that .ASCIC inserts
a count byte before the string data. The count byte contains
the length of the string in bytes. The length given includes any
bytes of nonprintable characters outside the delimited string but
excludes the count byte.
.ASCIC string
string
A delimited ASCII string.
3.2 - .ASCID
Performs the same function as ASCII, except that .ASCID inserts
a string descriptor before the string data.
.ASCID string
string
A delimited ASCII string.
The string descriptor has the following format:
31 0
____________________________________
| information | length |
+----------------+-----------------+
| pointer |
+----------------------------------+
length
The length of the string (two bytes).
information
Descriptor information (two bytes) is always set to 010E.
pointer
Position independent pointer to the string (four bytes).
String descriptors are used in calling procedures.
3.3 - .ASCII
Stores the ASCII value of each character in the ASCII string or
the value of each byte expression in the next available byte.
.ASCII string
string
A delimited ASCII string.
3.4 - .ASCIZ
Performs the same function as .ASCII, except that .ASCIZ appends
a null byte as the final character of the string. When a list or
text string is created with an .ASCIZ directive, you need only
perform a search for the null character in the last byte to
determine the end of the string.
.ASCIZ string
string
A delimited ASCII string.
.BLKx expression
expression
An expression specifying the amount of storage to be allocated.
All the symbols in the expression must be defined and the
expression must be an absolute expression. If the expression is
omitted, a default value of 1 is assumed.
VAX MACRO has 10 block storage directives. The value of
the expression determines the number of data items for which VAX
MACRO reserves storage.
Directive Reserves Storage For
.BLKA addresses (longwords)
.BLKB byte data
.BLKD double-precision floating-point data
(quadwords)
.BLKF single-precision floating-point data
(longwords)
.BLKG G_floating data (quadwords)
.BLKH H_floating data (octawords)
.BLKL longword data
.BLKO octaword data
.BLKQ quadword data
.BLKW word data
4.1 - .BLKA
Reserves storage for addresses (longwords)
.BLKA expression
expression
An expression specifying the amount of storage to be allocated.
4.2 - .BLKB
Reserves storage for byte data
.BLKB expression
expression
An expression specifying the amount of storage to be allocated.
4.3 - .BLKD
Reserves storage for double-precision floating-point
data (quadwords).
.BLKD expression
expression
An expression specifying the amount of storage to be allocated.
4.4 - .BLKF
Reserves storage for single-precision floating-point
data (longwords).
.BLKF expression
expression
An expression specifying the amount of storage to be allocated.
4.5 - .BLKG
Reserves storage for G_floating data (quadwords).
.BLKG expression
expression
An expression specifying the amount of storage to be allocated.
4.6 - .BLKH
Reserves storage for H_floating data (octawords).
.BLKH expression
expression
An expression specifying the amount of storage to be allocated.
4.7 - .BLKL
Reserves storage for longword data.
.BLKL expression
expression
An expression specifying the amount of storage to be allocated.
4.8 - .BLKO
Reserves storage for octaword data.
.BLKO expression
expression
An expression specifying the amount of storage to be allocated.
4.9 - .BLKQ
Reserves storage for quadword data.
.BLKQ expression
expression
An expression specifying the amount of storage to be allocated.
4.10 - .BLKW
Reserves storage for word data.
.BLKW expression
expression
An expression specifying the amount of storage to be allocated.
Generates successive bytes of binary data in the object module.
.BYTE expression-list
expression-list
One or more expressions separated by commas. Each expression
is first evaluated as a longword expression; then the value
of the expression is truncated to one byte. The value of each
expression should be in the range of 0 through 255 for unsigned
data or in the range of -128 through +127 for signed data.
Optionally, each expression can be followed by a repetition
factor delimited by square brackets. An expression followed by a
repetition factor has the format:
expression1[expression2]
expression1
An expression that specifies the value to be stored.
[expression2]
An expression that specifies the number of times the value will
be repeated. The expression must not contain any undefined
symbols and it must be absolute. The square brackets are required.
Controls which symbols are included in the cross-reference listing.
.CROSS [symbol-list] (Default)
.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
directives have an effect only if /CROSS_REFERENCE was specified in
the MACRO command.
Using .NOCROSS with a symbol list disables the
cross-reference listing for the listed symbols only. Using .CROSS
with a symbol list enables or reenables the cross-reference
listing of the listed symbols.
Specifies that the symbols in the list are made known to the
VAX Symbolic Debugger.
.DEBUG symbol-list
symbol-list
A list of legal symbols separated by commas.
During an interactive debugging session, you can use these symbols
to refer to memory locations or to examine the values assigned
to the symbols.
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.
Determines the default displacement length for the relative
and relative deferred addressing modes.
.DEFAULT DISPLACEMENT, keyword
keyword
One of three keywords - BYTE, WORD, or LONG - indicating the
default displacement length.
This has no effect on the default displacement for displacement
and displacement deferred addressing modes. If there is no
.DEFAULT in a source module, the default displacement length for the
relative and relative deferred addressing modes is a longword.
9 - .D FLOATING (.DOUBLE)
|
Evaluates the specified floating-point constants and stores
the results in the object module. Generates 64-bit,
double-precision, floating-point data (1 bit of sign, 8 bits of
exponent, and 55 bits of fraction).
.D_FLOATING literal-list
.DOUBLE literal-list
literal-list
A list of floating-point constants, which cannot contain any unary
or binary operators except unary plus or unary minus.
Double-precision floating-point numbers are always rounded. They
are not affected by .ENABLE TRUNCATION. The floating-point
constants in the literal list must not be preceded by the
floating-point operator (^F).
Disables the specified assembler functions as enabled by .ENABLE.
.DISABLE argument-list
argument-list
One or more of the following: ABSOLUTE, DEBUG, GLOBAL,
LOCAL_BLOCK, SUPPRESSION, TRACEBACK, or TRUNCATION. 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.
Enables the specified assembly function.
.ENABLE argument-list
argument-list
One or more of the following: ABSOLUTE, DEBUG, GLOBAL,
LOCAL_BLOCK, SUPPRESSION, TRACEBACK, or TRUNCATION. 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.
ENABLE and its negative form, DISABLE, control the
following assembler functions:
o Creating local label blocks
o Making all local symbols available to the debugger
and enabling the traceback feature
o Specifying that undefined symbol references are
external references
o Truncating or rounding single-precision floating-point
numbers
o Suppressing the listing of symbols that are defined
but not referenced
o Specifying that all the PC references are absolute,
not relative
Terminates the source program.
.END [symbol]
symbol
The address (called the transfer address) at which program
execution is to begin.
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 transfer address must be in a program section that has the
EXE attribute.
When an executable image consisting of several object modules
is linked, only one object module should be terminated by an
.END directive that specifies a transfer address. All other
object modules should be terminated by .END directives that do not
specify a transfer address.
Terminates the conditional range started by the .IF directive.
.ENDC
Terminates the MACRO definition.
.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.
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).
.ENDR
Defines a symbolic name for an entry point and stores a register
save mask (two bytes) at that location.
.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.
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.
Causes the assembler to display an error message on the terminal
or batch log file and in the listing file.
.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.
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.
.EVEN
Indicates that the specified symbols are external; that is,
the symbols are defined in another object module and cannot be
defined until link time
.EXTERNAL symbol-list
symbol-list
A list of legal symbols, separated by commas.
If the GLOBAL argument is enabled, all unresolved references will
be marked as global and external. If GLOBAL is enabled, you
need not specify .EXTERNAL. If GLOBAL is disabled, you must
explicitly specify .EXTERNAL to declare any symbols that are
defined externally but are referred to in the current module.
20 - .F FLOATING (.FLOAT)
|
Evaluates the specified floating-point constants and stores
the results in the object module. .F_FLOATING generates
32-bit, single-precision, floating-point data (1 bit of sign, 8
bits of exponent, and 23 bits of fractional significance).
.F_FLOATING literal-list
.FLOAT literal-list
literal-list
A list of floating-point constants. The constants cannot contain
any unary or binary operators except unary plus and unary
minus. The floating-point constants in the literal list must not
be preceded by the floating-point unary operator (^F).
Evaluates the specified floating-point constants and stores
the results in the object module. .G_FLOATING generates 64-bit
data (1 bit of sign, 11 bits of exponent, and 52 bits of fraction).
.G_FLOATING literal-list
literal-list
A list of floating-point constants. The constants cannot contain
any unary or binary operators except unary plus or unary minus.
G_floating-point numbers are always rounded. They are not
affected by the .ENABLE TRUNCATION directive.
The floating-point constants in the literal list must not be
preceded by the floating-point operator (^F).
Indicates that specified symbol names are either globally defined
in the current module or externally defined in another module.
.GLOBAL symbol-list
symbol-list
A list of legal symbol names, separated by commas.
Evaluates the specified floating-point constants and stores
the results in the object module. .H_FLOATING generates 128-bit
data (1 bit of sign, 15 bits of exponent, and 112 bits of
fraction).
.H_FLOATING literal-list
literal-list
A list of floating-point constants. The constants cannot contain
any unary or binary operators except unary plus or unary minus.
H_floating-point numbers are always rounded. They are not
affected by the .ENABLE TRUNCATION directive.
The floating-point constants in the literal list must not be
preceded by the floating-point operator (^F).
Provides a means of identifying the object module.
This identification is in addition to the name assigned to the
object module with .TITLE. A character string can be specified in
.IDENT to label the object module. This string is printed in the
header of the listing file and also appears in the object module.
.IDENT string
string
A 1- to 31-character string that identifies the module, such as
a string that specifies a version number.
If a source module contains more than one .IDENT, the last
directive given establishes the character string that forms part
of the object module identification.
A conditional assembly block is a series of source statements that
is assembled only if a certain condition is met. .IF
starts the conditional block and .ENDC ends the conditional block.
.IF condition argument(s)
...
range
...
.ENDC
condition
A specified condition that must be met if the block is to be
included in the assembly. The condition must be separated from
the argument by a comma, space, or tab.
argument(s)
One or more symbolic arguments or expressions of the
specified conditional test. If the argument is an
expression, it cannot contain any undefined symbols and must be an
absolute expression.
range
The block of source code that is conditionally included in
the assembly.
Each .IF must have a corresponding .ENDC. The .IF directive
contains a condition test and one or two arguments. The
condition test specified is applied to the argument(s). If the
test is met, all VAX MACRO statements between .IF and .ENDC are
assembled. If the test is not met, the statements are not
assembled. An exception to this rule occurs when you use
subconditional directives.
VAX MACRO permits a nesting depth of 31 conditional assembly
levels.
Starts a subconditional assembly block to be assembled if
the condition test specified when the conditional assembly
block was entered was false. The subconditional assembly block
that starts with .IF_FALSE continues up to the next
subconditional assembly directive or to the end of the conditional
assembly block.
.IF_FALSE
The alternate form of .IF_FALSE is .IFF.
Starts a subconditional assembly block to be assembled if
the condition test specified when the conditional assembly
block was entered was true. The subconditional assembly block that
starts with .IF_TRUE continues up to the next subconditional
assembly directive or to the end of the conditional assembly block.
.IF_TRUE
The alternate form of .IF_TRUE is .IFT.
28 - .IF TRUE FALSE (.IFTF)
|
Starts a subconditional assembly block to be assembled regardless
of whether the condition test specified when the conditional
assembly block was entered was true or false. The
subconditional assembly block that starts with .IF_TRUE_FALSE
continues up to the next subconditional assembly directive or to
the end of the conditional assembly block.
.IF_TRUE_FALSE
The alternate form of .IF_TRUE_FALSE is .IFTF.
Provides a means of writing a one-line conditional assembly block.
.IIF condition [,]argument(s), statement
condition
One of the legal condition tests defined for conditional
assembly blocks. The condition must be separated from the
arguments by a comma, space, or tab. If the first argument can
be a blank, the condition must be separated from the arguments
with a comma.
argument(s)
An expression or symbolic argument associated with the
immediate conditional assembly block directive.
statement
The statement to be assembled if the condition is satisfied.
The condition to be tested and the conditional assembly block
are expressed completely within the line containing the
directive. No terminating .ENDC statement is required.
Replaces a formal argument with successive actual arguments
specified in an argument list.
.IRP symbol,<argument list>
...
range
...
.ENDR
symbol
A formal argument that is successively replaced with the
specified actual arguments enclosed in angle brackets. If no
formal argument is specified, the assembler displays an error
message.
<argument list>
A list of actual arguments enclosed in angle brackets and used
in expanding the indefinite repeat range. An actual
argument can consist of one or more characters. Multiple
arguments must be separated by a legal separator (comma, space,
or tab). If no actual arguments are specified, no action is taken.
range
The block of source text to be repeated once for each occurrence
of an actual argument in the list. The range can contain
macro definitions and repeat ranges. .MEXIT is legal within the
range.
This replacement process occurs during the expansion of
the indefinite repeat block range.
Similar to .IRP except that .IRPC permits single-character
substitution rather than argument substitution.
.IRPC symbol, <string>
...
range
...
.ENDR
symbol
A formal argument that is successively replaced with the
specified characters enclosed in angle brackets. If no formal
argument is specified, the assembler displays an error message.
<string>
A sequence of characters enclosed in angle brackets and used in
the expansion of the indefinite repeat range. Although the
angle brackets are required only when the string contains
separating characters, their use is recommended for legibility.
range
The block of source text to be repeated once for each occurrence of
a character in the list. The range can contain macro definitions
and repeat ranges.
On each iteration of the indefinite repeat range, the formal
argument is replaced with each successive character in the
specified string. The .ENDR directive specifies the end of the
range.
Adds a name to the macro library list that is searched whenever
a .MCALL or an undefined opcode is encountered.
.LIBRARY macro-library-name
macro-library-name
A delimited string that is the file specification of a macro
library.
The libraries are searched in the reverse order in which they
were specified to the assembler.
If you omit any information from the macro-library-name
argument, default values are assumed.
Allows you to include Linker option records in an object
module produced by VAX MACRO. The qualifiers for the .LINK
directive perform functions similar to the functions performed
by the same qualifiers for the DCL command LINK.
.LINK "file-spec" [/qualifier[=(module-name[,...])],...]
file-spec[,...]
A delimited string that specifies one or more input files. The
input files can be object modules to be linked, or shareable
images to be included in the output image. Input files can also
be libraries containing external references or specific modules
for inclusion in the output image. The Linker will search the
libraries for the external references. If you specify multiple
input files, separate the file specifications with commas (,).
If you do not specify a file type in an input file specification,
the Linker supplies default file types, based on the nature of the
file. All object modules are assumed to have file types of OBJ.
/INCLUDE=(module-name[,...])
Indicates that the associated input file is an object library
or shareable image library, and that only the module names
specified are to be unconditionally included as input to the
Linker. At least one module name must be specified. If you
specify more than one module name, separate the names with
commas and enclose the list in parentheses.
/LIBRARY
Indicates that the associated input file is a library to be
searched for modules to resolve any undefined symbols in the input
files.
/SELECTIVE_SEARCH
Directs the Linker to add to its symbol table only those
global symbols that are defined in the specified file and are
currently unresolved. If /SELECTIVE_SEARCH is not specified,
the Linker includes all symbols from that file in its global
symbol table.
/SHAREABLE
Requests that the Linker include a shareable image file. No
wildcard characters are allowed in the file specification.
Generates successive longwords (four bytes) of data in the
object module.
.LONG expression1[expression2], ...
expression1
An expression that specifies the value to be stored.
[expression2]
An expression that specifies the number of times the value
is repeated. The square brackets are required.
Each expression in the list must have a value that can be
represented in 32 bits.
Begins the definition of a macro.
.MACRO macro-name [formal-argument-list]
...
range
...
.ENDM [macro name]
macro-name
The name of the macro to be defined; this name can be any
legal symbol up to 31 characters long.
formal-argument-list
The symbols, separated by commas, to be replaced by the
actual arguments in the macro call.
range
The source text to be included in the macro expansion.
If the name specified is the same as the name of a previously
defined macro, the previous definition is deleted and replaced
with the new one. The .MACRO directive is followed by the
source text to be included in the macro expansion. The .ENDM
directive specifies the end of the range.
If a macro has the same name as a VAX opcode, the macro is
used instead of the instruction. This feature allows you to
temporarily redefine an opcode.
If a macro has the same name as a VAX opcode and is in a
macro library, you must use the .MCALL directive to define
the macro. Otherwise, because the symbol is already defined (as the
opcode), the assembler will not search the macro libraries.
Reserves a word for a register save mask for a transfer vector.
.MASK symbol[,expression]
symbol
A symbol defined in an .ENTRY directive.
expression
A register save mask.
If .MASK does not contain an expression, the assembler directs
the Linker to copy the register save mask specified in .ENTRY to
the word reserved by .MASK.
If .MASK contains an expression, the assembler directs the Linker
to combine this expression with the register save mask
specified in .ENTRY and store the result in the word reserved
by .MASK. The Linker performs an inclusive OR operation to
combine the mask in the entry point and the value of the
expression. Consequently, a register specified in either .ENTRY
or .MASK will be included in the combined mask.
Specifies the names of the system and/or user-defined macros that
are required to assemble the source program but are not defined
in the source file.
.MCALL macro-name-list
macro-name-list
A list of macros to be defined for this assembly. Separate the
macro names with commas.
You must use .MCALL when a macro has the same name as an opcode.
Deletes the definitions of specified macros.
.MDELETE macro-name-list
macro-name-list
A list of macros whose definitions are to be deleted. Separate
the names with commas.
.MDELETE completely deletes the macro, freeing memory as
necessary. Macro redefinition with .MACRO merely redefines the
macro.
Terminates a macro expansion before the end of the macro.
.MEXIT
Termination is the same as if .ENDM were encountered. .MEXIT is
useful in conditional expansion of macros because it bypasses
the complexities of nested conditional directives and alternate
assembly paths.
Counts all the positional arguments specified in the macro
call, including null arguments (specified by adjacent commas).
.NARG symbol
symbol
A symbol that is assigned a value equal to the number of arguments
in the macro call.
Determines the number of characters in a specified character
string.
.NCHR symbol,<string>
symbol
A symbol that is assigned a value equal to the number of
characters in the specified character string.
<string>
A sequence of printable characters. Delimit the character
string with angle brackets (or a character preceded by a
circumflex) only if the specified character string contains a
legal separator (comma, space, and/or tab) or a semicolon.
It can appear anywhere in a VAX MACRO program and is useful
in calculating the length of macro arguments.
Controls which symbols are included in the cross-reference listing.
.CROSS [symbol-list] (Default)
.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
directives have an effect only if /CROSS_REFERENCE was specified in
the MACRO command.
Using .NOCROSS with a symbol list disables the
cross-reference listing for the listed symbols only. Using .CROSS
with a symbol list enables or reenables the cross-reference
listing of the listed symbols.
Determines the addressing mode of the specified operand.
.NTYPE symbol,operand
symbol
Any legal VAX MACRO symbol. This symbol is assigned a value equal
to the 8- or 16-bit addressing mode of the operand argument
that follows.
operand
Any legal address expression, as you use it with an opcode. If
no argument is specified, 0 is assumed.
The value of the symbol is set to the specified addressing mode.
In most cases, an 8-bit (1-byte) value is returned. Bits 0
through 3 specify the register associated with the mode, and bits 4
through 7 specify the addressing mode. Literal mode is
indicated by a 0 in bits 4 through 7, instead of the values 0
through 3. Mode 1 indicates an immediate mode operand, mode
2 indicates an absolute mode operand, and mode 3 indicates a
general mode operand.
For indexed addressing mode, a 16-bit (2-byte) value is
returned. The high-order byte contains the addressing mode of the
base operand specifier and the low-order byte contains the
addressing mode of the primary operand (the index register).
Generates 128 bits (16 bytes) of binary data.
.OCTA literal
.OCTA symbol
literal
Any constant value. This value can be preceded by ^O, ^B, ^X, or
^D to specify the radix as octal, binary, hexadecimal, or
decimal, respectively; or it can be preceded by ^A to specify
ASCII text. Decimal is the default radix.
symbol
A symbol defined elsewhere in the program. This symbol results in
a sign-extended, 32-bit value being stored in an octaword.
It does not evaluate expressions and that it accepts only one
value.
Ensures that the current value of the location counter is odd
by adding 1 if the current value is even. If the current
value is already odd, no action is taken.
.ODD
Defines an opcode, which is inserted into a user-defined
opcode table.
.OPDEF opcode value,operand-descriptor-list
opcode
An ASCII string specifying the name of the opcode. The string can
be up to 31 characters long and can contain the letters A through
Z, the digits 0 through 9, and the special characters underline,
(_), dollar sign ($), and period (.). The string should not
start with a digit and should not be surrounded by delimiters.
value
An expression that specifies the value of the opcode. The
expression must be absolute and must not contain any undefined
values. The value of the expression must be in the range of 0
through decimal 65,535 (hexadecimal FFFF), but you cannot use the
values 252 through 255 because the architecture specifies these as
the start of a 2-byte opcode. The expression is represented as
follows:
if 0 < expression < 251 expression is a 1-byte opcode.
if expression > 255 expression bits 7:0 are the first
byte of the opcode and expression
bits 15:8 are the second byte of
the opcode.
operand-descriptor-list
A list of operand descriptors that specifies the number of
operands and the type of each. Up to 16 operand descriptors are
allowed in the list.
Generates packed decimal data, two digits per byte.
.PACKED decimal-string[,symbol]
decimal-string
A decimal number from 0 through 31 digits long with an optional
sign. Digits can be in the range of 0 through 9.
symbol
An optional symbol that is assigned a value equivalent to the
number of decimal digits in the string. The sign is not counted as
a digit.
Forces a new page in the listing.
.PAGE
VAX MACRO ignores .PAGE in a macro definition. The paging
operation is performed only during macro expansion.
Causes the assembler to display an informational message.
.PRINT [expression] ;comment
expression
An expression whose value is displayed when .PRINT is
encountered during assembly.
;comment
A comment that is displayed when .PRINT is encountered
during assembly. The comment must be preceded by a semicolon.
If .PRINT is included in a macro library, end the comment with
an additional semicolon. If you omit the semicolon, the comment
will be stripped from the directive and will not be displayed when
the macro is called.
Defines a program section and its attributes and refers to a
program section once it is defined.
.PSECT [program-section-name[,argument-list]]
program-section-name
The name of the program section. This name can be up to
31 characters long and can contain any alphanumeric character
and the special characters underline (_), dollar sign ($), and
period (.). The first character must not be a digit.
argument-list
A list containing the program section attributes and the
program section alignment. Program sections are aligned when you
specify an integer in the range of 0 through 9 or one of the
five keywords; byte, word, long, quad, or page. If you
specify an integer, the program section is linked to begin at the
next virtual address, which is a multiple of 2 raised to the
power of the integer. If you specify a keyword, the program
section is linked to begin at the next virtual address (a
multiple of the specified values.) BYTE is the default.
Program Section Attributes:
Attribute Function
ABS Absolute
CON Concatenate (Default)
EXE Executable (Default)
GBL Global
LCL Local (Default)
LIB Library Segment
NOEXE Not Executable
NOPIC Non-Position-Independent Content (Default)
NORD Nonreadable
NOSHR No Share (Default)
NOVEC Nonvector-Containing (Default)
NOWRT Nonwriteable
OVR Overlay
PIC Position-Independent Content
RD Readable (Default)
REL Relocatable (Default)
SHR Share
USR User Segment
VEC Vector-Containing
WRT Write (Default)
The assembler automatically defines two program sections:
the absolute program section and the unnamed (or blank) program
section.
Any symbol definitions that appear before any instruction, data,
or .PSECT directive are placed in the absolute program section.
Generates 64 bits (eight bytes) of binary data.
.QUAD literal
.QUAD symbol
literal
Any constant value. This value can be preceded by ^O, ^B, ^X, or
^D to specify the radix as octal, binary, hexadecimal, or
decimal, respectively; or it can be preceded by ^A to specify the
ASCII text operator. Decimal is the default radix.
symbol
A symbol defined elsewhere in the program. This symbol results in
a sign-extended, 32-bit value being stored in a quadword.
It does not evaluate expressions and that it accepts only one
value. It does not accept a list.
.REFn
Operand generation directives that you can use in macros to
define new opcodes.
.REF1 byte operand
.REF2 word operand
.REF4 longword operand
.REF8 quadword operand
.REF16 octaword context
The .REFn directives are provided for compatibility with VAX
MACRO V1.0.
Repeats a block of code a specified number of times, in line with
other source code. The .ENDR directive specifies the end of the
range.
.REPEAT expression
...
range
...
.ENDR
expression
An expression whose value controls the number of times the range
is to be assembled within the program. When the expression is less
than or equal to 0, the repeat block is not assembled. The
expression must be absolute and must not contain any undefined
symbols.
range
The source text to be repeated the number of times specified by
the value of the expression. The repeat block can contain
macro definitions, indefinite repeat blocks, or other repeat
blocks.
53 - .RESTORE PSECT (.RESTORE)
|
Retrieves the program section from the top of the program
section context stack, an internal stack in the assembler.
.RESTORE_PSECT
When .RESTORE_PSECT retrieves a program section, it restores
the current location counter to the value it had when the program
section was saved. The local label block is also restored if it
was saved when the program section was saved.
The alternate form of .RESTORE_PSECT is .RESTORE.
Stores the current program section context on the top of the
program section context stack, an internal assembler stack.
.SAVE_PSECT [LOCAL_BLOCK]
LOCAL_BLOCK
An optional keyword that specifies that the current local label is
to be saved with the program section context.
It leaves the current program section context in effect. The
program section context stack can hold 31 entries. Each entry
includes the value of the current location counter and the maximum
value assigned to the location counter in the current program
section.
The alternate form of .SAVE_PSECT is .SAVE.
Specify listing control options in the source text of a program.
.SHOW [argument-list]
.NOSHOW [argument-list]
argument-list
One or more of the optional symbolic arguments; BINARY,
CALLS, CONDITIONALS, DEFINITIONS, and EXPANSIONS. You can use
either the long form or the short form of the arguments. You
can use each argument alone or in combination with other
arguments, but you must separate them by commas, tabs, or spaces.
You can use .SHOW and .NOSHOW with or without an argument list.
Equivalent to .BYTE, except that VAX MACRO indicates that the data
is signed in the object module.
.SIGNED_BYTE expression1[expression2], ...
An expression or list of expressions separated by commas. You
have the option of following each expression with a repetition
factor delimited by square brackets.
expression1
An expression that specifies the value to be stored. The value
must be in the range -128 through +127.
[expression2]
An expression that specifies the number of times the value will
be repeated. The expression must not contain any undefined
symbols and must be an absolute expression. The square brackets
are required.
.SIGNED_WORD
Equivalent to .WORD except that the assembler indicates that the
data is signed in the object module.
.SIGNED_WORD expression1[expression2], ...
An expression or list of expressions separated by commas. You
have the option of following each expression with a repetition
factor delimited by square brackets.
expression1
An expression that specifies the value to be stored. The value
must be in the range -32,768 through +32,767.
[expression2]
An expression that specifies the number of times the value will
be repeated. The expression must not contain any undefined
symbols and must be an absolute expression. The square brackets
are required.
.SUBTITLE_(.SBTTL)
Causes the assembler to print the line of text, represented by
the comment-string, in the table of contents.
.SUBTITLE comment-string
comment-string
An ASCII string from 1 to 40 characters long; excess characters
are truncated.
The assembler also prints the line of text as the subtitle on
the second line of each assembly listing page. This subtitle
text is printed on each page until altered by a subsequent
.SUBTITLE directive in the program.
The alternate form of .SUBTITLE is .SBTTL.
Assigns a name to the object module.
.TITLE module-name comment-string
module-name
An identifier from 1 to 31 characters long.
comment-string
An ASCII string from 1 to 40 characters long; excess characters
are truncated.
The module name specified with .TITLE bears no relationship to
the file specification of the object module, as specified in
the VAX MACRO command line. The object module name appears in
the Linker load map, and is also the module name that the debugger
and librarian recognize. There are three display message
directives, .ERROR, .PRINT, and .WARN. They can be used to
display information indicating that a macro call contains an error
or illegal set of conditions.
Redefines a global symbol for use in a shareable image.
.TRANSFER symbol
symbol
A global symbol that is an entry point in a procedure or routine.
The Linker redefines the symbol as the value of the location
counter at the .TRANSFER directive after a shareable image is
linked.
Causes the assembler to display a warning message on the terminal
or in the batch log file, and in the listing file.
.WARN [expression] ;comment
expression
An expression whose value is displayed when .WARN is
encountered during assembly.
;comment
A comment that is displayed when .WARN is encountered
during assembly. The comment must be preceded by a semicolon.
If .WARN is included in a macro library, end the comment with
an additional semicolon. If you omit the semicolon, the comment
will be stripped from the directive and will not be displayed when
the macro is called.
Specifies symbols that are either defined externally in
another module or defined globally in the current module.
.WEAK symbol-list
symbol-list
A list of legal symbols separated by commas.
When .WEAK specifies a symbol that is not defined in the
current module, the symbol is externally defined. If the Linker
finds the symbol's definition in another module, it uses that
definition. If the Linker does not find an external
definition, the symbol has a value of 0 and the Linker does not
report an error. The Linker does not search a library for the
symbol, but if a module brought in from a library for another
reason contains the symbol definition, the Linker uses it.
When .WEAK specifies a symbol that is defined in the current
module, the symbol is considered to be globally defined.
However, if this module is inserted in an object library, this
symbol is not inserted in the library's symbol table.
Consequently, searching the library at link time to resolve this
symbol does not cause the module to be included.
Generates successive words (two bytes) of data in the object
module.
.WORD expression1[expression2], ...
One or more expressions separated by commas. You have the option
of following each expression by a repetition factor delimited
with square brackets.
expression1
An expression that specifies the value to be stored.
[expression2]
An expression that specifies the number of times the value will
be repeated. The expression must not contain any undefined
symbols and must be an absolute expression. The square brackets
are required.
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.