Assembler Reference
ARM DUI 0068B
Copyright © 2000, 2001 ARM Limited. All rights reserved.
3-13
3.5.2
Variables
The value of a variable can be changed as assembly proceeds. Variables are of three
types:
•
numeric
•
logical
•
string.
The type of a variable cannot be changed.
The range of possible values of a numeric variable is the same as the range of possible
values of a numeric constant or numeric expression (see
Numeric constants
and
Numeric expressions
on page 3-20).
The possible values of a logical variable are
{TRUE}
or
{FALSE}
(see
Logical expressions
on page 3-23).
The range of possible values of a string variable is the same as the range of values of a
string expression (see
String expressions
on page 3-19).
Use the
GBLA
,
GBLL
,
GBLS
,
LCLA
,
LCLL
, and
LCLS
directives to declare symbols representing
variables, and assign values to them using the
SETA
,
SETL
, and
SETS
directives. See:
•
GBLA, GBLL, and GBLS
on page 7-4
•
LCLA, LCLL, and LCLS
on page 7-6
•
SETA, SETL, and SETS
on page 7-7.
3.5.3
Numeric constants
Numeric constants are 32-bit integers. You can set them using unsigned numbers in the
range 0 to 2
32
– 1, or signed numbers in the range –2
31
to 2
31
– 1. However, the
assembler makes no distinction between –
n
and 2
32
–
n
. Relational operators such as >=
use the unsigned interpretation. This means that 0 > –1 is
{FALSE}
.
Use the
EQU
directive to define constants (see
EQU
on page 7-57). You cannot change
the value of a numeric constant after you define it.
See also
Numeric expressions
on page 3-20 and
Numeric literals
on page 3-21.