Including files

You can include source code from external file using INCLUDE preprocessor directive. You can also directly content of a binary file into output file using INCLUDEBIN compiler command.

These abilities have something in common. You have to give them the name of the file to include. This name can be full absolute path, like:

INCLUDE "D:\MyFolder\MyProject\MyLib.ninc"

Or it can be relative path (especially only name of the file), eg:

INCLUDE "MyBinary.dat"
INCLUDEBIN "SubFolder\MyLib.ninc"

If given file name isn't absolute, NoASM Compiler looks for the file in:

  1. Directory where the main compiled nasm source file is
  2. Directories mentioned in Directories.xnl configuration file