 RealView Assembler User's Guide |
|
| Unary operatorsUnary 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.7 lists the unary operators that return strings. Table 3.7. Unary operators that return strings Operator | Usage | Description |
|---|
:CHR:
| :CHR:A
| Returns the character with ASCII code A. | :LOWERCASE: | :LOWERCASE:string | Returns the given string, with all uppercase characters converted to lowercase. | :REVERSE_CC: | :REVERSE_CC:cond_code | Returns the inverse of the condition code in cond_code, or an error if cond_code does not contain a valid condition code. | :STR:
| :STR:A
| Returns an 8-digit hexadecimal string corresponding to a numeric expression, or the string "T" or "F" if used on a logical expression. | :UPPERCASE: | :UPPERCASE:string | Returns the given string, with all lowercase characters converted to uppercase. |
Table 3.8 lists the unary operators that return numeric values. Table 3.8. Unary operators that return numeric or logical values | Operator | Usage | Description |
|---|
?
| ?A
| Number of bytes of executable code generated by line defining symbol A. | + and -
| +A
-A
| Unary plus. Unary minus. + and – can act on numeric and program-relative expressions. | :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. | :CC_ENCODING: | :CC_ENCODING:cond_code | Returns the numeric value of the condition code in cond_code, or an error if cond_code does not contain a valid condition code. | :DEF:
| :DEF:A
| {TRUE} if A is defined, otherwise {FALSE}. | :INDEX:
| :INDEX:A
| If A is a register-relative expression, :INDEX: returns the offset from that base register. :INDEX: is most useful in macros. | :LEN:
| :LEN:A
| Length of string A. | :LNOT:
| :LNOT:A
| Logical complement of A. | :NOT:
| :NOT:A
| Bitwise complement of A (~ is an alias, for example ~A). | :RCONST: | :RCONST:Rn | Number of register, 0-15 corresponding to r0-r15. |
|
|