A string constant consists of a sequence of characters enclosed in double quotes ( ") (ASCII 0x22). To include a double-quote character ("), single-quote character ('), or backslash character (\) within a string, precede the character with a backslash (\) (ASCII 0x5C). A character can be expressed in a string as its ASCII value in octal preceded by a backslash (for example, the letter “J” could be expressed as “\112”). The assembler accepts the following escape sequences in strings:
Escape Sequence |
Character Name |
ASCII Value (hex) |
---|---|---|
\n |
newline |
0A |
\r |
carriage return |
0D |
\b |
backspace |
08 |
\t |
horizontal tab |
09 |
\f |
form feed |
0C |
\v |
vertical tab |
0B |