5.18 INCLUDE

Include another file.

The INCLUDE directive tells the Assembler to start reading from a specified file. The Assembler then assembles the specified file until end of file (EOF) or an EXIT directive is encountered. An included file may contain INCLUDE directives itself. The difference between the two forms is that the first one search the current directory first, the second one does not.

Syntax
.INCLUDE "filename"
.INCLUDE <filename>
Example
; iodefs.asm: 
.EQU sreg = 0x3f ; Status register 
.EQU sphigh = 0x3e ; Stack pointer high 
.EQU splow = 0x3d ; Stack pointer low

; incdemo.asm 
.INCLUDE iodefs.asm ; Include I/O definitions 
in r0,sreg ; Read status register