Keil Logo


12.53 MAP

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


MAP expr{,base-register}
is a numeric or PC-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 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.
specifies a register. If base-register is specified, the address where the storage map starts is the sum of expr, and the value in base-register at runtime.


Use the MAP directive in combination with the FIELD directive to describe a storage 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.
The MAP directive can be used any number of 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.


        MAP     0,r9
        MAP     0xff,r9
Non-ConfidentialPDF file icon PDF versionARM DUI0379H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.