summaryrefslogtreecommitdiff
path: root/system/at/unknown/src/AT Generator
blob: c78bdb950441c704be252a789b23c2e5f2d6d3dd (plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
(*************************************************************************)
(*** Generiert Fr IBM-AT einen neuen SYSUR-Zweig.                     ***)
(*** Danach wird die eingebaute Hardwareuhr fr die Systemzeit benutzt ***)
(*** und andere Partitionen knnen mit neuem 'shutup' gebootet werden. ***)
(***                                                                   ***)
(*** Autor : W. Sauerwein                             Stand : 15.07.86 ***)
(*************************************************************************)

LET ack = 0,
    nak = 1;
 
cl eop (1, 4);
erzeuge collector;
erzeuge archive manager;
erzeuge operator;
erzeuge configurator;
loesche collector;
forget ("AT Generator", quiet);
break.

loesche collector :
   end (/"colly");
   put ("Collector gelscht.");
   line (2).

erzeuge collector :
   put line ("Generating 'Collector'...");
   begin ("colly", PROC generate collector, t);
   warte auf meldung;
   IF answer = nak THEN end (/"colly");
                        errorstop (meldung)
   FI.
   TASK VAR t.

erzeuge archive manager :
   put line ("Generating 'ARCHIVE'...");
   end (/"ARCHIVE");
   begin ("ARCHIVE", PROC archive manager, t).

erzeuge operator :
   put line ("Generating 'OPERATOR'...");
   end (/"OPERATOR");
   begin ("OPERATOR", PROC monitor, t).
 
erzeuge configurator :
   put line ("Generating 'configurator'...");
   end (/"configurator");
   begin ("configurator", PROC generate configurator, t); 
   warte auf meldung;
   IF answer = nak THEN errorstop (meldung) FI.
 
warte auf meldung : 
   DATASPACE VAR ds; INT VAR answer; 
   wait (ds, answer, t);
   BOUND TEXT VAR m := ds;
   TEXT VAR meldung := m;
   forget (ds).
 
PROC generate collector :

   disable stop;
   fetch all (/"configurator");
   DATASPACE VAR ds := nilspace;
   BOUND TEXT VAR m := ds; m := "";
   send (father, mess, ds);
   forget (ds);
   free global manager.
 
mess : IF is error THEN m := error message;
                        nak
                   ELSE ack FI.

END PROC generate collector;

PROC generate configurator :

   disable stop;
   fetch all (/"colly");
   DATASPACE VAR ds := nilspace; 
   BOUND TEXT VAR m := ds; m := "";
   send (father, mess, ds);
   forget (ds);
   enable stop;
   new configuration;
   setup;
   global manager (PROC ( DATASPACE VAR, INT CONST, INT CONST, TASK CONST) 
                   configuration manager with time).

mess : IF is error THEN m := error message;
                        nak
                   ELSE ack FI.

END PROC generate configurator;

TEXT PROC inverse (TEXT CONST t):
  ""15"" + t + " " + ""14""
END PROC inverse;

PROC put center (TEXT CONST t):
   put center (t, 80)
END PROC put center;

PROC put center (INT CONST zeile, TEXT CONST t):
   put center (zeile, t, 80)
END PROC put center;

PROC put center (TEXT CONST t, INT CONST gesamtbreite):
   INT VAR cy;
   get cursor (cy, cy);
   put center (cy, t, gesamtbreite)
END PROC put center;

PROC put center (INT CONST zeile, TEXT CONST t, INT CONST gesamtbreite):
   cursor ((gesamtbreite - length (t)) DIV 2, zeile);
   put (t).
END PROC put center;

PROC cl eol: 
  out (""5"") 
END PROC cl eol;

PROC cl eop: 
  out (""4"") 
END PROC cl eop; 
 
PROC cl eol (INT CONST cx, cy): 
   cursor (cx, cy); 
   cl eol 
END PROC cl eol; 
 
PROC cl eop (INT CONST cx, cy): 
   cursor (cx, cy); 
   cl eop 
END PROC cl eop;