13.4 startup.h--

-----------------

This file contains the source code which is compiled by the compiler

into the startup file, for all supported compilers of types of output

files. This file must be located either in the directory with the compiler,

or in the directory with the library files. It is automatically included in

the project by the compiler and switching it on with 'include' can have

unwanted results.

The program startup block can be used (if you indicate this using a

command-line option or a directive) to parse the command line into

parameters, to store the environment variable, to support the operation of

ATEXIT, to change the size of the memory available for COM files, and many

other preparatory operations. If you compile your file without using any

command-line options, and there is no c--.ini file, and there are also no

directives in your file, then when you compile a COM file there will be a

block included which changes the size of the available memory and the

signature 'SPHINXC--'.

If you are compiling an EXE file (except for a DOS file with tiny

model) and you use the directive 'jumptomain NONE' or the command-line

switch '/j0', then the compiler will not use startup.h for this project. It

also will not use this file when compiling COM files if, besides '/j0', you

do not use in this project command-line parsing /p or /argc, or ATEXIT

(/at), or the rounding variable address (/env), or clear postarea (/cpa),

or the compression stub CTRL-C (/c).

In addition to the program startup block, startup.h-- contains

the following dynamic functions:

void CLEARPOSTAREA( (E)AX ); - clear postarea data

unsigned int PARAMSTR( ECX ); - get address of a command-line argument

unsigned int PARAMCOUNT(); - get the number of the command line argument

When parsing the command line into components for 32-bit programs there

is support for long file names. For 16-bit programs support for parsing the

command line with long file names is included if you include at the

beginning of the program:

#define _USELONGNAME TRUE

or include the option 'd=_USELONGNAME' in c--.ini or on the command line.