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

Note

In most cases, a string containing a single character is accepted as a single character value. For example ADD r0,r1,#"a" is accepted, but ADD r0,r1,#"ab" is faulted.

You can also use variables and names to represent literals.

Was this page helpful? Yes No