Assembler Reference
3-26 Copyright © 2000, 2001 ARM Limited. All rights reserved. ARM DUI 0068B
3.6.10 Unary operators
Unary operators have the highest precedence and are evaluated first. A unary operator
precedes its operand. Adjacent operators are evaluated from right to left.
Table 3-4 lists the unary operators.
Table 3-4 Unary operators
Operator Usage Description
??A
Number of bytes of executable code generated by line defining symbol A.
BASE :BASE:A
If A is a pc-relative or register-relative expression,
BASE
returns the number
of its register component
BASE
is most useful in macros.
INDEX :INDEX:A
If A is a register-relative expression,
INDEX
returns the offset from that base
register.
INDEX
is most useful in macros.
+
and
- +A
-A
Unary plus. Unary minus. + and – can act on numeric and program-relative
expressions.
LEN :LEN:A
Length of string A.
CHR :CHR:A
One-character string, ASCII code A.
STR :STR:A
Hexadecimal string of A.
STR
returns an eight-digit hexadecimal string corresponding to a numeric
expression, or the string
"T"
or
"F"
if used on a logical expression.
NOT :NOT:A
Bitwise complement of A.
LNOT :LNOT:A
Logical complement of A.
DEF :DEF:A
{
TRUE
} if A is defined, otherwise {
FALSE
}.
SB_OFFSET_19_12
:
SB_OFFSET_19_12: label
Bits[19:12] of (
label
– sb). See Example of use of :SB_OFFSET_19_12:
and :SB_OFFSET_11_ 0 on page 3-27
SB_OFFSET_11_0
:
SB_OFFSET_11_0
: label Least-significant 12 bytes of (
label
– sb).