5.4. Built-in variables

Table 5.2 lists the built-in variables defined by the ARM assembler.

Built-in variables cannot be set using the SETA, SETL, or SETS directives. They can be used in expressions or conditions, for example:


Table 5.2. Built-in variables

{PC} or .

Address of current instruction.

{VAR} or @

Current value of the storage area location counter.


Logical constant true.


Logical constant false.


Value of the currently-set listing option. The OPT directive can be used to save the current listing option, force a change in it, or restore its original value.


Has the value 32 if the assembler is in ARM mode, and the value 16 if it is in Thumb mode.


Has the value big if the assembler is in big-endian mode, and the value little if it is in little-endian mode.


Has the value 16 if compiling Thumb code. Otherwise, 32.


Has the name of the selected cpu, or generic ARM if no cpu has been specified.


Has the value of the selected ARM architecture:

  • 3

  • 3M

  • 4

  • 4T

  • 4TxM


Is the offset between the address of theSTR pc,[...] orSTM Rb,{... pc} instruction and the value of pc stored out. This varies depending on the CPU and architecture specified.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C