Keil Logo

Simple Relocatable Expressions

Simple relocatable expressions contain symbols that are defined in a relocatable segment. Segment and external symbols are not allowed in simple relocatable expressions.

Simple relocatable expression may be used in four contexts:

  1. As an operand to the ORG directive.
  2. As an operand to a symbol definition directive (i.e. EQU, SET).
  3. As an operand to a data initialization directive (DB or DW).
  4. As an operand to a machine instruction.
Examples for simple relocatable expressions
REL1 + ABS1 * 10
REL1 + (REL2   REL3)    assuming REL2 and REL3 refer to the same segment.
Invalid form of simple relocatable expressions
(REL1 + ABS1) * 10    relocatable value may not be multiplied.
(EXT1   ABS1)         this is a general relocatable expression
REL1 + REL2           you cannot add relocatable symbols.
  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.