SPRU513Z August 2001 – October 2023 SM320F28335-EP
Define Macro Library
.mlib"filename"
The .mlib directive provides the assembler with the filename of a macro library. A macro library is a collection of files that contain macro definitions. The macro definition files are bound into a single file (called a library or archive) by the archiver.
Each file in a macro library contains one macro definition that corresponds to the name of the file. The filename of a macro library member must be the same as the macro name, and its extension must be .asm. The filename must follow host operating system conventions; it can be enclosed in double quotes. You can specify a full pathname (for example, c:\320tools\macs.lib). If you do not specify a full pathname, the assembler searches for the file in the following locations in the order given:
See Section 4.5 for more information about the --include_path option.
A .mlib directive causes the assembler to open the specified library and create a table of the library's contents. The assembler stores names of library members in the opcode table as library entries. This redefines any existing opcodes or macros with the same name. If one of these macros is called, the assembler extracts the library entry and loads it into the macro table. The assembler expands the library entry as with other macros, but it does not place the source code in the listing. Only macros from the library are extracted, and they are extracted only once. See Chapter 6 for details.
The code creates a m