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


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.
Related reference
3.1 Syntax of source lines in assembly language
Non-ConfidentialPDF file icon PDF versionARM DUI0379G
Copyright © 2007, 2008, 2011, 2012, 2014, 2015 ARM. All rights reserved.