Go backward to The GLOBAL directive
Go up to Directives
Go forward to The SOURCE and STAB Directives

The ASCII Directive

The ASCII directive is used to allocate and initialize string constants in memory. The form of an ASCII directive is
label ASCII string constant
This directive tells the assembler to store the characters appearing in the string constant in the memory locations immediately following those used to store the code generated by the previous machine instruction (or the character values stored as a result of a previous ASCII directive). Each character in the string is stored in one word of memory. A word containing the value 0 is placed after the last character of the string. The label is associated with the word containing the first character of the string.

The string constants used in ASCII directives are formed by placing double quotes (") before and after any string of printable characters (except for double quotes and backslashes). Within a string, any of the escape sequences allowed in character constants may be used. In addition, the sequence \" may be used to include a double quote in a string.



Prev Up Next