8.2 Sharing Symbols with Include Files

Summary: Place statements common to all modules in include files.

Include files can contain any valid MASM statement but typically consist of type and symbol declarations. The assembler inserts the contents of the include file into a module at the location of the INCLUDE directive. Include files can simplify project organization by eliminating the need to physically insert common declarations into more than one program or module. Include files are always optional. See Section 8.3 for alternatives to using include files.

The first part of this section explains how to organize symbol definitions and the declarations that make the symbols global (available to all modules). It then shows how to make both variables and procedures public with EXTERNDEF, PROTO, and COMM. The last part of this section tells where to place these directives in the modules and include files.