Directives Reference
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All r ights reserved. 7-15
7.3.2 MAP
The
MAP
directive sets the o rigin of a storag e map to a specified address. The
storage-map location counter,
{VAR}
, is set to the same address.
^
is a synonym for
MAP
.
Syntax
MAP expr{,base-register}
where:
expr
is a numeric or program-relative expression:
If
base-register
is not specified,
expr
evaluates to the address
where the storage map starts. The storage map location counter is
set to this address.
If
expr
is program-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.
base-register
specifies a register. If
base-register
is specified, the address wh ere the
storage map starts is t he sum of
expr
, and the value in
base-register
at
runtime.
Usage
Use the
MAP
directive in combination with the
FIELD
directive to describe a storag e map.
Specify
base-register
to define register-relative labels. The base register becomes
implicit in all labels defined by following
FIELD
directives, until the next
MAP
directive.
The register-relative labels can be used in load and store instructions. See FIELD on
page7-16 for an example.
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.
Examples
MAP 0,r9
MAP 0xff,r9