next up previous contents index
Next: Functions and Procedures Up: The system unit Previous: The system unit

Types, Constants and Variables

Types

The following integer types are defined in the System unit:

And the following pointer types:

For the SetJmp and LongJmp calls, the following jump bufer type is defined (for the I386 processor):

Constants

The following constants for file-handling are defined in the system unit:

Further, the following non processor specific general-purpose constants are also defined:

Remark: Processor specific global constants are named Testxxxx where xxxx represents the processor number (such as Test8086, Test68000), and are used to determine on what generation of processor the program is running on.

Variables

The following variables are defined and initialized in the system unit:

The variables ExitProc, exitcode are used in the Free Pascal exit scheme. It works similarly to the on in Turbo Pascal:

When a program halts (be it through the call of the Halt function or Exit or through a run-time error), the exit mechanism checks the value of ExitProc. If this one is non-Nil, it is set to Nil, and the procedure is called. If the exit procedure exits, the value of ExitProc is checked again. If it is non-Nil then the above steps are repeated.

So if you want to install your exit procedure, you should save the old value of ExitProc (may be non-Nil, since other units could have set it before you did). In your exit procedure you then restore the value of ExitProc, such that if it was non-Nil the exit-procedure can be called.

The ErrorAddr and ExitCode can be used to check for error-conditions. If ErrorAddr is non-Nil, a run-time error has occurred. If so, ExitCode contains the error code. If ErrorAddr is Nil, then ExitCode contains the argument to Halt or 0 if the program terminated normally.

ExitCode is always passed to the operating system as the exit-code of your process.

Under GO32, the following constants are also defined :

These constants allow easy access to the bios/screen segment via mem/absolute.


next up previous contents index
Next: Functions and Procedures Up: The system unit Previous: The system unit

Michael Van Canneyt
Fri Sep 25 09:15:40 MEST 1998