Non-Confidential | PDF version | DUI0801J | ||

| ||||

Home > Structure of Assembly Language Modules > 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`

to`9`

, for example`5_204`

is a number in base`5`

. - 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"`

.

```
ADD
r0,r1,#"a"
```

is accepted, but `ADD r0,r1,#"ab"`

is
faulted.You can also use variables and names to represent literals.