| |||
| Home > Directives Reference > Data definition directives > MAP | |||
The MAP directive sets the origin of a storage
map to a specified address. The storage-map location counter, {VAR},
is set to the same address. ^ is a synonym for MAP.
MAPexpr{,base-register}
where:
expris a numeric or PC-relative expression:
If is
not specified, base-register evaluates
to the address where the storage map starts. The storage map location
counter is set to this address.expr
If is
PC-relative, you must have defined the label before you use it in the
map. The map requires the definition of the label during the first
pass of the assembler.expr
base-registerspecifies a register. If is
specified, the address where the storage map starts is the sum of base-register,
and the value in expr at
runtime.base-register
Use the MAP directive in combination with the FIELD directive
to describe a storage map.
Specify to
define register-relative labels. The base register becomes implicit
in all labels defined by following base-registerFIELD directives,
until the next MAP directive. The register-relative labels
can be used in load and store instructions.
The MAP directive can be used any number of times
to define multiple storage maps.
The {VAR} counter is set to zero before
the first MAP directive is used.
How the assembler works in Using the Assembler
Directives that can be omitted in pass 2 of the assembler in Using the Assembler.