You copied the Doc URL to your clipboard.
Literals
Assembly language source code can contain numeric, string, Boolean, and single character literals.
Literals can be expressed as:
- Decimal numbers, for example
123
. - Hexadecimal numbers, for example
0x7B
. - Numbers in any base from
2
to9
, for example5_204
is a number in base5
. - Floating point numbers, for example
123.4
. - Boolean values
{TRUE}
or{FALSE}
. - Single character values enclosed by single quotes, for example
'w'
. - Strings enclosed in double quotes, for example
"This is a string"
.
Note
In most cases, a string containing a single character is accepted as a single character value. For exampleADD
r0,r1,#"a"
is accepted, but ADD r0,r1,#"ab"
is
faulted.You can also use variables and names to represent literals.