You copied the Doc URL to your clipboard.

21.52 MAP

The MAP directive sets the origin of a storage map to a specified address.

Syntax

MAP expr{,base-register}

where:

expr

is a numeric or PC-relative expression:

  • If base-register isnot specified, expr evaluatesto the address where the storage map starts. The storage map locationcounter is set to this address.

  • If expr is PC-relative,you must have defined the label before you use it in the map. Themap requires the definition of the label during the first pass of theassembler.

base-register

specifies a register. If base-register isspecified, the address where the storage map starts is the sum of expr,and the value in base-register atruntime.

Usage

Use the MAP directive in combinationwith the FIELD directive to describe a storagemap.

Specify base-register todefine register-relative labels. The base register becomes implicitin all labels defined by following FIELD directives,until the next MAP directive. The register-relative labelscan be used in load and store instructions.

The MAP directive can be used any numberof times to define multiple storage maps.

The storage-map location counter, {VAR}, is set to the same address as that specified by the MAP directive. The {VAR} counter is set to zero before the first MAP directive is used.

^ is a synonym for MAP.

Examples

        MAP     0,r9        MAP     0xff,r9
Was this page helpful? Yes No