The <nostub.h> Header File

Basic header file for kernel-less programming

This header file will be included automatically by default.h, except if you define the global preprocessor symbol USE_KERNEL, or if you explicitly include the doors.h header file before including any other header file.

First, this header file defines a global symbol named NOSTUB which is used in other header files to indicate nostub mode. Next, it includes default.h to make sure that the basic macros which TIGCC needs are defined.

It then handles nostub-specific directives such as OPTIMIZE_ROM_CALLS (which is useful only for nostub mode) and USE_FLINE_ROM_CALLS (which needs special support in nostub mode). If these symbols are defined, some of the definitions from default.h are overwritten.

It contains code for tigcc.a, to support SAVE_SCREEN and RETURN_VALUE. Finally, it contains some rather complicated macros and asm statements to put data needed for RETURN_VALUE directly into the assembly file.

See also: How to make a nostub program, default.h, doors.h


Return to the main index