4 built-in variables, Built-in variables -10 – ARM VERSION 1.2 User Manual

Page 88

Advertising
background image

Assembler Reference

3-10

Copyright © 2000, 2001 ARM Limited. All rights reserved.

ARM DUI 0068B

3.4

Built-in variables

Table 3-1 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 3-1 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 assembling ARM code, or

16

if it is assembling Thumb code.

{ENDIAN}

Has the value

big

if the assembler is in big-endian mode, or

little

if it is in little-endian mode.

{CODESIZE}

Is a synonym for

{CONFIG}

.

{CPU}

Holds the name of the selected cpu. The default is

ARM7TDMI

. If an architecture was specified in

the command line

-cpu

option,

{CPU}

holds the value "

Generic ARM

".

{FPU}

Holds the name of the selected fpu. The default is

SoftVFP

.

{ARCHITECTURE}

Holds the name of the selected ARM architecture.

{PCSTOREOFFSET}

Is the offset between the address of the

STR pc,[...]

or

STM Rb,{..., pc}

instruction and the

value of pc stored out. This varies depending on the CPU or architecture specified.

{ARMASM_VERSION}

Holds an integer that increases with each version. See also Determining the armasm version at
assembly time
on page 3-11

|ads$version|

Has the same value as

{ARMASM_VERSION}

.

{INTER}

Has the value True if

/inter

is set. The default is False.

{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.

{SWST}

Has the value True if

/swst

is set. The default is False.

{NOSWST}

Has the value True if

/noswst

is set. The default is False.

Advertising