-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathspecs.mcr062
302 lines (219 loc) · 5.55 KB
/
specs.mcr062
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
TITLE SPECS FOR MUDDLE
RELOCA
MAIN==1
.GLOBAL TYPVLC,PBASE,TYPBOT,MAINPR,PTIME,IDPROC,ROOT,TTICHN,TTOCHN,TYPVEC
.GLOBAL %UNAM,%JNAM,NOTTY,GCHAPN,INTHLD,PURBOT,PURTOP,N.CHNS,SPCCHK,CURFCN
.GLOBAL TD.GET,TD.PUT,TD.LNT,NOSHUF
.INSRT MUDDLE >
SYSQ
CONSTANTS
IFN ITS,[
N.CHNS==16.
FATINS==.VALUE
]
IFE ITS,[
N.CHNS==102
]
IMPURE
CRADIX: 10.
%UNAM: 0 ; HOLDS UNAME
%JNAM: 0 ; HOLDS JNAME
IDPROC: 0 ; ENVIRONMENT NUMBER GENERATOR
PTIME: 0 ; UNIQUE NUMBER FOR PROCID AND ENVIRONMENTS
OBLNT": 13. ; LENGTH OF DEFAULT OBLISTS (SMALL)
VECTOP": VECLOC ; TOP OF CURRENT GARBAGE COLLECTED SPACE
VECBOT": VECBASE ; BOTTOM OF GARBAGE COLLECTED SPACE
CODBOT: 0 ; ABSOLUTE BOTTOM OF CODE
CODTOP": PARBASE ; TOP OF IMPURE CODE (INCLUDING "STORAGE")
HITOP: 0 ; TOP OF INTERPRETER PURE CORE
PARNEW": 0
PARBOT": PARBASE
PARTOP": PARLOC
VECNEW": 0 ; LOCATION FOR OFFSET BETWWEN OLD GCSTOP AND NEW GCSTOP
INTFLG: 0 ; INTERRUPT PENDING FLAG
MAINPR: 0 ; HOLDS POINTER TO THE MAIN PROCESS
NOTTY: 0 ; NON-ZERO==> THIS MUDDLE HAS NO TTY
GCHAPN: 0 ; NON-ZERO A GC HAS HAPPENED RECENTLY
INTHLD: 0 ; NON-ZERO INTERRUPTS CANT HAPPEN
PURBOT: HIBOT ; BOTTOM OF DYNAMICALLY ALLOCATED PURE
PURTOP: HIBOT ; TOP OF DYNAMICALLY ALLOCATED PURE
SPCCHK: SETZ ; SPECIAL/UNSPECIAL CHECKING?
NOSHUF: 0 ; FLAG TO BUILD A NON MOVING HI SEG
;PAGE MAP USAGE TABLE FOR MUDDLE
;EACH PAGE IS REPRESENTED BY ONE BIT IN THE TABLE
;IF BIT = 0 THEN PAGE IS FREE OTHERWISE BUSY
;FOR PAGE n USE BIT (n MOD 32.) IN WORD PMAP+n/32.
PMAP": -1 ;SECTION 0 -- BELONGS TO AGC
-1 ;SECTION 1 -- BELONGS TO AGC
-1 ;SECTION 2 -- BELONGS TO AGC
-1 ;SECTION 3 -- BELONGS TO AGC
-1 ;SECTION 4 -- BELONGS TO AGC
-1 ;SECTION 5 -- BELONGS TO AGC (DEPENDS ON HIBOT)
-1 ;SECTION 6 -- START OF PURE CORE (FILLED IN BY INITM)
-1 ;SECTION 7 -- LAST TWO PAGES BELONG TO AGC'S PAGE MAPPER
NINT==72. ; NUMBER OF POSSIBLE ITS INTERRUPTS
NASOCS==159. ; LENGTH OF ASSOCIATION VECTOR
PDLBUF==100 ; EXTRA INSURENCE PDL
ASOLNT==10 ; LENGTH OF ASSOCIATION BLOCKS
.GLOBAL PATCH,TBINIT,LERR,LPROG,PIDSTO,PROCID,PTIME,GCPDL,INTFLG,WTYP1,WTYP2
.GLOBAL PAT,PDLBUF,INTINT,PARNEW,GCPVP,START,SWAP,ICR,SPBASE,TPBASE,GLOBAS,GLOBSP,TPBAS
.GLOBAL TOPLEVEL,INTNUM,INTVEC,INTOBL,ASOVEC,ERROBL,MAINPR,RESFUN,.BLOCK,ASOLNT,NODES
.GLOBAL WRONGT,TTYOPE,OPEN,CLOSE,IOT,ILVAL,MESS,FACTI,REFVEC,MUDOBL,INITIA
.GLOBAL LSTRES,BINDID,DUMNOD,PSTAT,1STEPR,IDPROC,EVATYP,APLTYP,PRNTYP,PURVEC,STOLST
VECTGO
TVBASE": BLOCK TVLNT
GENERAL
TVLNT+2,,0
TVLOC==TVBASE
;INITIAL TYPE TABLE
TYPVLC":
BLOCK 2*NUMPRI+2
GENERAL
2*NUMPRI+2+2,,0
TYPTP==.-2 ; POINT TO TOP OF TYPES
; INITIAL SYMBOL TABEL FOR RSUBRS
SQULOC==.
SQUTBL: BLOCK 2*NSUBRS
TWORD,,0
2*NSUBRS+2,,0
INTVCL: BLOCK 2*NINT
TLIST,,0
2*NINT+2,,0
NODLST: TTP,,0
0
TASOC,,0
BLOCK ASOLNT-3
GENERAL+<SASOC,,0>
ASOLNT+2,,0
NODDUM: BLOCK ASOLNT
GENERAL+<SASOC,,0>
ASOLNT+2,,0
ASOVCL: BLOCK NASOCS
TASOC,,0
NASOCS+2,,0
;THESE ENTRIES MUST NOT MOVE DURING INITILAIZATION
ADDTV TVEC,[-2*NUMPRI-2,,TYPVLC]
TYPVEC==TVOFF-1
ADDTV TVEC,[-2*NUMPRI-2,,TYPVLC]
TYPBOT==TVOFF-1 ; POINT TO CURRENT TOP OF TYPE VECTORS
;ENTRY FOR ROOT,TTICHN,TTOCHN
ADDTV TCHAN,0
TTICHN==TVOFF-1
ADDTV TCHAN,0
TTOCHN==TVOFF-1
ADDTV TOBLS,0
ROOT==TVOFF-1
ADDTV TOBLS,0
INITIA==TVOFF-1
ADDTV TOBLS,0
INTOBL==TVOFF-1
ADDTV TOBLS,0
ERROBL==TVOFF-1
ADDTV TOBLS,0
MUDOBL==TVOFF-1
ADDTV TVEC,0
GRAPHS==TVOFF-1
ADDTV TFIX,0
INTNUM==TVOFF-1
ADDTV TVEC,[-2*NINT,,INTVCL]
INTVEC==TVOFF-1
ADDTV TUVEC,[-NASOCS,,ASOVCL]
ASOVEC==TVOFF-1
ADDTV TLIST,0
CHNL0"==TVOFF-1 ;LIST FOR CURRENTLY OPEN PSUEDO CHANNELS
IFN ITS,[
DEFINE ADDCHN N
ADDTV TCHAN,0
CHNL!N==TVOFF-1
.GLOBAL CHNL!N
TERMIN
REPEAT 15.,ADDCHN \.RPCNT+1
DEFINE ADDIPC N
ADDTV TLIST,0
IPCS!N==TVOFF-1
.GLOBAL IPCS!N
TERMIN
REPEAT 15.,ADDIPC \.RPCNT+1
]
IFE ITS,[
ADDTV TCHAN,0
CHNL1==TVOFF-1
.GLOBAL CHNL1
REPEAT N.CHNS-1,[ADDTV TCHAN,0
]
]
ADDTV TASOC,[-ASOLNT,,NODLST]
NODES==TVOFF-1
ADDTV TASOC,[-ASOLNT,,NODDUM]
DUMNOD==TVOFF-1
ADDTV TVEC,0
EVATYP==TVOFF-1
ADDTV TVEC,0
APLTYP==TVOFF-1
ADDTV TVEC,0
PRNTYP==TVOFF-1
; SLOTS ASSOCIATED WITH TEMPLATE DATA STRUCTURES
ADDTV TUVEC,0
TD.GET==TVOFF-1
ADDTV TUVEC,0
TD.PUT==TVOFF-1
ADDTV TUVEC,0
TD.LNT==TVOFF-1
ADDTV TUVEC,0
TD.PTY==TVOFF-1
;GLOBAL SPECIAL PDL
GSP: BLOCK GSPLNT
GENERAL
GSPLNT+2,,0
ADDTV TVEC,[-GSPLNT,,GSP]
GLOBASE==TVOFF-1
GLOB==.-2
ADDTV TVEC,GLOB
GLOBSP==TVOFF-1 ;ENTRY FOR CURRENT POINTER TO GLOBAL SP
; POINTER VECTOR TO PURE SHARED RSUBRS
PURV: BLOCK 3*20. ; ENOUGH FOR 20 SUCH (INITIALLY)
0
3*20.+2,,0
ADDTV TUVEC,[-3*20.,,PURV]
PURVEC==TVOFF-1
ADDTV TLIST,0
STOLST==TVOFF-1
;PROCESS VECTOR FOR GARBAGE COLLECTOR PROCESS
GCPVP: BLOCK PVLNT*2
GENERAL
PVLNT*2+2,,0
VECRET
PURE
;INITIAL PROCESS VECTOR
PVBASE": BLOCK PVLNT*2
GENERAL
PVLNT*2+2,,0
PVLOC==PVBASE
;ENTRY FOR PROCESS I.D.
ADDPV TFIX,1,PROCID
;THE FOLLOWING IRP MAKES SPACE FO9 SAVED ACS
ZZZ==.
IRP A,,[0,A,B,C,D,E,PVP,TVP,AB,TB,TP,SP,M,R,P]B,,[0
0,0,0,0,0,TPVP,TTVP,TAB,TTB,TTP,TSP,TCODE,TRSUBR,TPDL]
LOC PVLOC+2*A
A!STO==.-PVBASE
B,,0
0
TERMIN
PVLOC==PVLOC+16.*2
LOC ZZZ
ADDPV TTB,0,TBINIT
ADDPV TTP,0,TPBASE
ADDPV TSP,0,SPBASE
ADDPV TPDL,0,PBASE
ADDPV 0,0,RESFUN
ADDPV TLIST,0,.BLOCK
ADDPV TLIST,0,MESS
ADDPV TACT,0,FACTI
ADDPV TPVP,0,LSTRES
ADDPV TFIX,0,BINDID
ADDPV TFIX,1,PSTAT
ADDPV TPVP,0,1STEPR
ADDPV TSP,0,CURFCN
IMPURE
END