ARM VERSION 1.2 Computer Hardware User Manual


 
Assembler Reference
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All rights reserved. 3-21
3.6.4 Numeric literals
Numeric literals can take any of the following forms:
decimal-digits
0xhexadecimal-digits
&hexadecimal-digits
n_base-n-digits
'character'
where
decimal-digits
is a sequence of characters using only the digits 0 to 9.
hexadecimal-digits
is a sequence of characters using only the digits 0 to 9 and the
letters A to F or a to f.
n_
is a single digit between 2 and 9 inclusive, followed by an
underscore character.
base-n-digits
is a sequence of characters using only the digits 0 to (
n
1)
character
is any single character except a single quote. Use \' if you require
a single quote. In this case the value of the numeric literal is the
numeric code of the character.
You must not use any other characters. The sequence of characters must evaluate to an
integer in the range 0 to 2
32
1 (except in
DCQ
and
DCQU
directives, where the range is 0
to 2
64
1).
Examples
a 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