home *** CD-ROM | disk | FTP | other *** search
- {*********************************************************************
- (C) Copyright 1983-1992; MetaWare Incorporated; Santa Cruz, CA 95060.
- *********************************************************************}
- pragma on(Optimize_for_space);
- Export(Here);
- pragma include('system.pf');
- pragma C_include('Implement.pf');
- pragma C_include('Interrupts.pf');
- pragma C_include('Portio.pf');
- package Here;
- pragma Routine_aliasing_convention(Implement.RTE_aliasing);
- procedure ENDD; external;
- pragma Alias(Endd,Implement.RTE || 'end');
- procedure Halt(RC:Integer); External;
- end;
- with Loopholes:[Adr,Retype,Longptr,Sizeof,Address,Pointer_arithmetic];
- package Elsewhere;
- pragma Routine_aliasing_convention(Implement.RTE_aliasing);
- procedure FTERM; external;
- procedure CFTERM; external;
- procedure Restore_interrupts;External;
- procedure Call_onexit_fcns; external;
- end;
-
- -- Imports:
- with Elsewhere,Interrupts,Portio;
- pragma Off(With_warnings);
- with System;
- pragma Pop(With_warnings);
-
- program Implement_term;
- pragma Alias(Implement_term,Implement.RTE || 'term1');
-
- pragma off(Emit_names);
-
- -- NOTE: term.p has been split into term.p and term2.p; only term.p
- -- is documented in the programmer's guide as the date of the split, 4/2/86.
-
- { Non-I/O termination procedures. }
-
- var _Retcode: 0..255;
- value _Retcode := 0;
-
- procedure ENDD;
- begin
- -- This next call is for C only. The Pascal run-time initializer
- -- has a dummy version of this.
- -- Can't call this on a stack-overflow since it might happen again.
- Call_onexit_fcns;
- #ifndef DAISY
- FTERM; CFTERM;
- #ifndef CDOS
- Restore_interrupts;
- #endif
- #endif
- Dos_exit(_Retcode);
- end;
-
- procedure Halt; -- Needed by Pascal RTE.
- pragma data(static);
- var Halt_invoked: Boolean;
- value Halt_invoked := False;
- pragma data;
- begin
- if Halt_invoked then DOS_exit(_Retcode) else Halt_invoked := True;
- _Retcode := RC;
- ENDD;
- end;
-
- { (C) Copyright 1983-1985; unpublished property and trade secret of }
- { MetaWare Incorporated; Santa Cruz, CA 95060; detailed notice above.}
-