-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIEXIT.PAS
More file actions
63 lines (45 loc) · 1.13 KB
/
IEXIT.PAS
File metadata and controls
63 lines (45 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
unit IEXIT;
(* Information
ßßßßßßßßßßß
Program Title : NASM-IDE exit procedure.
External name : IEXIT.TPU
Version : 1.7
Start date : 31/03/1997
Last update : 18/05/2002
Author : Rob Anderton.
Description : Exit procedure (in case of runtime error).
*)
interface
{******}
var OldExit : pointer;
{******}
procedure ExitIDE; far;
{******}
implementation
{******}
uses APP, ICONST, ICRT;
{******}
procedure ExitIDE;
begin
ExitProc:= OldExit;
if (ExitCode <> 0) and (ErrorAddr <> nil) then
begin
if (Application <> nil) then Application^.Done;
writeln;
writeln('NASM-IDE version ' + IDEVersion + '.');
write(#4' Critical error code ');
writeln(ExitCode);
writeln(#4' If the error occurs frequently please email rob@inglenook.co.uk');
writeln(#4' Please quote the critical error code.');
writeln;
writeln('Press any key to exit...');
ICRT.ReadKey;
ExitCode:= 0;
ErrorAddr:= nil;
end;
end;
{******}
begin
OldExit:= ExitProc;
ExitProc:= @ExitIDE;
end.