| |||
| Home > Assembler Reference > Built-in variables and constants | |||
Table 3.2 lists the built-in variables defined by the ARM assembler.
Table 3.2. Built-in variables
| Holds the name of the selected ARM architecture. |
{AREANAME} | Holds the name of the current AREA. |
{ARMASM_VERSION} | Holds an integer that increases with each version
of armasm. |
|ads$version| | Has the same value as {ARMASM_VERSION}. |
| Is a synonym for |
{COMMANDLINE} | Holds the contents of the command line. |
| Has the value |
| Holds the name of the selected cpu. The
default is |
| Has the value |
{FPIC} | Has the value True if /fpic is
set. The default is False. |
{FPU} | Holds the name of the selected fpu. The default
is SoftVFP. |
{INPUTFILE} | Holds the name of the current source file. |
{INTER} | Has the value True if /inter is
set. The default is False. |
{LINENUM} | Holds an integer indicating the line number in the current source file. |
| Value of the currently-set listing option.
The |
| Address of current instruction. |
| Is the offset between the address of
the |
{ROPI} | Has the value True if /ropi is
set. The default is False. |
{RWPI} | Has the value True if /rwpi is
set. The default is False. |
| Current value of the storage area location counter. |
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"
|ads$version| must be all lowercase. The
other built-in variables can be uppercase, lowercase, or mixed.
You can use the built-in variable {ARMASM_VERSION} to
distinguish between versions of armasm.
The ARM assembler did not have the built-in variable {ARMASM_VERSION} before
ADS. If you have to build versions of your code for legacy development
tools, you can test for the built-in variable |ads$version|.
Use code similar to the following:
IF :DEF: |ads$version|
; code for RVCT or ADS
ELSE
; code for SDT
ENDIF
Table 3.3 lists the built-in Boolean constants defined by the ARM assembler.