4.4.2.1 Characters

A single character may be written as a single quote immediately followed by that character, or as a single quote immediately followed by that character and another single quote. As an example, either 'a or 'a'.

The assembler accepts escape characters to represent special control characters. As an example, '\n' represents a new-line character. All accepted escape characters are listed in the table below.

Table 4-2. Escape Characters
Escape CharacterDescriptionHex Value
\aBell (alert) character07
\bBackspace character08
\fForm-feed character0C
\nNew-line character0A
\rCarriage return character0D
\tHorizontal tab character09
\vVertical tab character0B
\\Backslash5C
\?Question mark character3F
\"Double quote character22
\digit digit digitOctal character code. The numeric code is 3 octal digits.
\x hex-digitsHex character code. All trailing hex digits are combined. Either upper or lower case x works.

The value of a character constant in a numeric expression is the machine’s byte-wide code for that character. The assembler assumes your character code is ASCII.