-
Notifications
You must be signed in to change notification settings - Fork 3
/
is.pas
62 lines (52 loc) · 1.24 KB
/
is.pas
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
program ironseed;
//{$M 2600,0,0}
//{S-,D-,L-}
{***************************
Outermost Shell for IronSeed
Channel 7
Destiny: Virtual
Copyright 1994
***************************}
uses dos;
const
p: array[0..4] of string[6]=
('/make','/play','/show','/done ','seed ');
s: array[0..2] of string[21]=
('Executable not found.','Insufficient memory.','General failure.');
var
code: integer;
str1: string[64];
procedure getdoserror;
var j: integer;
begin
case doserror of
2,18,3: j:=0;
8: j:=1;
else j:=2;
end;
writeln('DOS Error: ',s[j]);
if j=0 then writeln('Current directory does not contain the proper IS files.');
end;
begin
str1:=paramstr(1)+' '+paramstr(2)+' '+paramstr(3)+' '+paramstr(4);
code:=5;
repeat
case code of
1: exec('crewgen',p[0]+p[4]+str1);
2: exec('main',p[1]+p[4]+str1);
3: exec('intro',p[2]+p[4]+p[3]+str1);
4:;
5: exec('intro',p[2]+p[4]+str1);
49..56: exec('main',p[1]+p[4]+' '+chr(code)+' '+str1);
else
begin
str(code, str1);
writeln('Fatal Run Error! ' + str1);
code:=4;
exit;
end;
end;
code:=dosexitcode;
until (code=4) or (doserror<>0) or (code=0);
if doserror<>0 then getdoserror;
end.