Everything

INCLUDE


Quote a series of statements from another source module file.

[Syntax]

[Δ]$[Δ]INCLUDE[Δ]([Δ]file-name[Δ])[Δ][;comment]

[Function]

-

The INCLUDE control instruction tells the assembler to insert and expand the contents of a specified file beginning on a specified line in the source program for assembly.

[Use]

-

A relatively large group of statements that may be shared by two or more source modules should be combined into a single file as an INCLUDE file.
If the group of statements must be used in each source module, specify the filename of the required INCLUDE file with the INCLUDE control instruction.
With this control instruction, you can greatly reduce time and labor in describing source modules.

[Description]

-

The INCLUDE control instruction can only be described in ordinary source programs.

-

The search pass of an INCLUDE file can be specified with the option (-I).

-

The assembler searches INCLUDE file read paths in the following sequence:

(a)

Folder specified by the option (-I)

(b)

Standard include file folder

(c)

Folder in which the source file exists

(d)

Folder containing the (original) C source file

(e)

Currently folder

 

-

The INCLUDE file can do nesting (the term "nesting" here refers to the specification of one or more other INCLUDE files in an INCLUDE file).

-

The maximum nesting level for include files is 4,294,967,294 (=0xFFFFFFFE) (theoretical value). The actual number that can be used depends on the amount of memory, however.

-

If the specified INCLUDE file cannot be opened, the assembler outputs the message and stops assembling.

-

If an include file contains a block from start to finish, such as a section definition directive, macro definition directive, or conditional assembly control instruction, then it must be closed with the corresponding code. If it is not so closed, then an error occurs.