The STRING directive specifies the memory type used for implicit strings. By default, implicit strings are located in code memory. For example:
void main (void) {
printf ("hello world\n");
}
in this example, the string "hello world" is located in code memory. The STRING directive changes the default location for implicitly located strings. This directive must be used carefully, since existing programs might use memory typed pointers to access strings. | Option | Description |
|---|
| CODE | Implicit strings are located in code space. This is the default setting of the Cx51 Compiler. | | XDATA | Implicit strings are located in const xdata space. | | FAR | Implicit strings are located in const far space. |
|