Non-Confidential | PDF version | DUI0801J | ||
| ||||
Home > Symbols, Literals, Expressions, and Operators > Syntax of numeric literals |
Numeric literals consist of a sequence of characters, or a single character in quotes, evaluating to an integer.
They can take any of the following forms:
decimal-digits
.
0xhexadecimal-digits
.
&hexadecimal-digits
.
n_base-n-digits
.
'character
'
.
where:
decimal-digits
hexadecimal-digits
n_
base-n-digits
n
-1)character
You must not use any other characters. The sequence of characters must evaluate to an integer.
In A32/T32 code, the range is 0 to 2^{32}-1, except in DCQ
,
DCQU
, DCD
, and DCDU
directives.
In A64 code, the range is 0 to 2^{64}-1, except in DCD
and
DCDU
directives.
DCQ
and DCQU
, the integer range is 0 to
2^{64}-1DCO
and DCOU
directives, the integer range
is 0 to 2^{128}-1a SETA 34906 addr DCD 0xA10E LDR r4,=&1000000F DCD 2_11001010 c3 SETA 8_74007 DCQ 0x0123456789abcdef LDR r1,='A' ; pseudo-instruction loading 65 into r1 ADD r3,r2,#'\'' ; add 39 to contents of r2, result to r3