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:

		IF {ARCHITECTURE} = "4T"

Table 5.2. Built-in variables

{PC} or .

Address of current instruction.

{VAR} or @

Current value of the storage area location counter.

{TRUE}

Logical constant true.

{FALSE}

Logical constant false.

{OPT}

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.

{CONFIG}

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

{ENDIAN}

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

{CODESIZE}

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

{CPU}

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

{ARCHITECTURE}

Has the value of the selected ARM architecture:

  • 3

  • 3M

  • 4

  • 4T

  • 4TxM

{PCSTOREOFFSET}

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
Non-Confidential