STARTUP Modules / SOZOBON C 2.00X

The startup modules perform a variety of functions; they create global
variables used by library functions, set the size of the stack, and (for
some startup modules) call the library function _initargs().

If the desired stack size can not be allocated, the startup module will
terminate (although this cannot happen to accessories).

SOZOBON C 2.0X supports the following startup modules:

CRT0     -- This is the normal startup module for .TTP, .TOS, .APP, .GTP,
            and .PRG programs.  The global variable _APP is always TRUE.

ACC_S    -- This startup module is only for accessories!  The _STKSIZ variable
            is set to 4K (though this can be changed if desired).  The global
            variable _APP is set to 0.  If the accessory is started as a
            program, it will terminate with -1 as the error code. 
 
ACCAPP_S -- This startup module can be used for programs or accessories.
            The command line is only initialized for programs.  The _STKSIZ
            variable (for accessories) is set to 4K.  The global variable
            _APP is set to 1 for programs, and 0 for accessories.  This
            startup module contains the teststack() function.
 
MIN_S    -- This startup module is used for programs that do not accept
            command line parameters, but do use standard input/output.
            The global variable _APP is always TRUE.  The ARGV parameter
            passed to main() is empty, and ARGC is set to 0.  The
            environment is normal.  The Pexec() command line can be
            accessed (_cousin+0x80), even without the _initargs()
            function.  SEE:  getcmdln() (minimum.h)

PCRT0    -- This startup module is for programs that use profiling.  It is
            exactly like CRT0.O in all other respects.  The profiling
            information is written to a file when the program exits VIA
            EXIT() or RETURNs from the main() function.  This startup
            module can only be used with SOZOBON C 2.00X.

DCRT0    -- This startup module is for programs that use the debugging
            feature of SOZOBON C 2.00X.  It is exactly like CRT0.O in all
            other respects.  When an error occurs, the C source code line on
            which the error occured will be reported, as well as the filename
            containing that line.

ACCMIN   -- This startup module is only for accessories that do not use
            standard input/output.  The environment is normal, and the
            _STKSIZ variable is set to 4K (which can be changed if
            desired).  The global variable _APP is set to 0.  If the
            accessory is started as a program, the startup module will
            terminate with -1 as the error code.

MINIMUM  -- This startup module is for programs that do not allow command
            line arguments and do not use standard input/output.  The global
            variable _APP is always TRUE.   The ARGV parameter passed to
            main() is empty, and ARGC is set to 0.  The environment is
            normal.  The Pexec() command line can be accessed (_cousin+0x80),
            even without the _initargs() function.  SEE:  getcmdln()
            (minimum.h)

Applications:
 
CC.TTP & C-Desk normally use the CRT0.O startup module.

CC.TTP (with the -X<n> option) uses the DCRT0.O startup module.

CC.TTP (with the -s <file> option) can use ANY startup module.  The same
thing can be achieved in C-Desk with a mouse click.
 
The startup module must always be the first file the linker processes.
CC.TTP & C-Desk automatically ensure that this is the case. 
 
ATTENTION:
The startup modules no longer contain the GEMDOS(), bios(), or xbios()
functions.  Therefore, the XdLibs library must be used.

