•  Back 
  •  Libraries 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help 
  •  Show info about hypertext 
  •  View a new file 
Topic       : Pure C Library Documentation
Author      : John Kormylo
Version     : LIB.HYP 1.0
Subject     : Documentation/Pure C Library
Nodes       : 1309
Index Size  : 32068
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : en
@default    : 
@help       : Help
@options    : +g -i -s +x +z -t4
@width      : 75
View Ref-File[ PCSTART.O ]

... is the stub program which calls function main().
It MUST be the first file listed in the Project File (after the '=').

First, PCSTART computes the size of the program and sets the stack
pointer to the end of the BSS segment (using the space reserved by
PLINK).  It then releases all the RAM beyond the end of the program
back to the heap.  Finally, it parses the command line and environment
parameters for use by main().

Before calling main(), PCSTART calls _fpuinit(void) to initialize the
FPU control register (when available).
After calling main(), it calls _FreeAll(void) to perform cleanup.
Both functions can be found in PCSTDLIB.LIB.

PCSTART also provides the following global variables:

extern BASPAG* _BasPag;      /* base page address                 */
extern int     _app;         /* 1 = application, 0 = accessory    */
extern long    _PgmSize;     /* size of program (including stack) */
extern void*   _StkLim;      /* lower limit on stack              */
extern int     errno;        /* ANSI error code                   */
extern void*   _RedirTab[6]; /* Redirection Address Table         */

extern void (*_AtExitVec) (void);  /* called on exit */
extern void (*_FilSysVec) (void);  /* called on exit */

In addition, it defines global labels __text, __data and __BSS at the
start of the text, data, and BSS segments, respectively.

It also includes entry point exit().

Finally, hidden inside PCSTART is a copyright by Borland.

See also PCXSTART and PCVSTART.