SLAU131V October 2004 – February 2020
The .copy, .include, and .mlib directives tell the assembler to use code from external files. The .copy and .include directives tell the assembler to read source statements from another file, and the .mlib directive names a library that contains macro functions. Section 5 contains examples of the .copy, .include, and .mlib directives. The syntax for these directives is:
.copy ["]filename["]
.include ["]filename["] .mlib ["]filename["] |
The filename names a copy/include file that the assembler reads statements from or a macro library that contains macro definitions. If filename begins with a number the double quotes are required. Quotes are recommended so that there is no issue in dealing with path information that is included in the filename specification or path names that include white space. The filename may be a complete pathname, a partial pathname, or a filename with no path information.
The assembler searches for the file in the following locations in the order given:
Because of this search hierarchy, you can augment the assembler's directory search algorithm by using the --include_path option (described in Section 4.5.1) or the MSP430_A_DIR environment variable (described in Section 4.5.2). The MSP430_C_DIR environment variable is discussed in the MSP430 Optimizing C/C++ Compiler User's Guide.