forked from dspinellis/unix-history-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
s3.s
347 lines (327 loc) · 3.96 KB
/
s3.s
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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
" s3
searchu: 0
lac searchu i
dac 9f+t+1
-mnproc
dac 9f+t
law ulist-1
dac 8
1:
lac 8 i
dac lu
lac 8 i
dac lu+1
lac 8 i
dac lu+2
lac 8 i
dac lu+3
jms 9f+t+1 i
isz 9f+t
jmp 1b
isz searchu
jmp searchu i
t = t+2
lookfor: 0
jms searchu; 1f
isz lookfor
isz lookfor
jmp lookfor i
1: 0
lac lu
rtl; rtl; and o7
sad lookfor i
skp
jmp 1b i
-3
tad 8
and o17777
isz lookfor
jmp lookfor i
.fork:
jms lookfor; 0 " not-used
skp
jms error
dac 9f+t
isz uniqpid
lac uniqpid
dac u.ac
law sysexit
dac u.swapret
lac o200000
tad u.ulistp i
dac u.ulistp i
jms dskswap; 07000
lac 9f+t
dac u.ulistp
lac o100000
xor u.ulistp i
dac u.ulistp i
lac u.pid
dac u.ac
lac uniqpid
dac u.pid
isz 9f+t
dac 9f+t i
isz u.rq+8
dzm u.intflg
jmp sysexit
t= t+1
badcal:
clon
-1
dac 7
.save:
lac d1
jms iget
cla
jms iwrite; 4096; 4096
jms iwrite; userdata; 64
jms iput
.exit:
lac u.dspbuf
sna
jmp .+3
law dspbuf
jms movdsp
jms awake
lac u.ulistp i
and o77777
dac u.ulistp i
isz u.ulistp
dzm u.ulistp i
jms swap
.rmes:
jms awake
lac o100000
tad u.ulistp i
dac u.ulistp i
law 2
tad u.ulistp
dac 9f+t
-1
dac 9f+t i
jms swap
law 2
tad u.ulistp
dac 9f+t
lac 9f+t i
cma
dac u.ac
dzm 9f+t i
isz 9f+t
lac 9f+t i
dac u.mq
dzm 9f+t i
jmp sysexit
t = t+1
.smes:
lac u.ac
sna spa
jms error
jms searchu; 1f
law 2
tad u.ulistp
dac 9f+t
dzm 9f+t i
jms error
1: 0
lac lu+1
sad u.ac
skp
jmp 1b i
lac lu+2
sad dm1
jmp 1f
lac o100000
tad u.ulistp i
dac u.ulistp i
law 2
tad u.ulistp
dac 9f+t
lac u.ac
dac 9f+t i
jms swap
law 2
tad u.ulistp
dac 9f+t
dzm 9f+t i
jmp .smes
1:
-3
tad 8
dac 9f+t
lac o700000
tad 9f+t i
dac 9f+t i
isz 9f+t
isz 9f+t
lac u.pid
cma
dac 9f+t i
isz 9f+t
lac u.mq
dac 9f+t i
jmp okexit
t = t+1
awake: 0
jms searchu; 1f
jmp awake i
1: 0
lac u.pid
sad lu+2
skp
jmp 1b i
-3
tad 8
dac 9f+t
lac o700000
tad 9f+t i
dac 9f+t i
jmp 1b i
t = t+1
swr:
sww:
jmp .-4 i
.halt; rttyi; rkbdi; rppti; .halt
.halt; wttyo; wdspo; wppto
.halt: jms halt
rttyi:
jms chkint1
lac d1
jms getchar
jmp 1f
and o177
jms betwen; o101; o132
skp
tad o40
alss 9
jmp passone
1:
jms sleep; sfiles+0
jms swap
jmp rttyi
wttyo:
jms chkint1
jms forall
sna
jmp fallr
lmq
lac sfiles+1
spa
jmp 1f
xor o400000
dac sfiles+1
lacq
tls
sad o12
jms putcr
jmp fallr
1:
lacq
dac char
jms putchar
skp
jmp fallr
jms sleep; sfiles+1
jms swap
jmp wttyo
rkbdi:
jms chkint1
lac d3
jms getchar
jmp 3f
lmq
and o155
sad o55
jmp 1f
lacq
and o137
sad o134
skp
jmp 2f
1:
lacq
xor o20
lmq
2:
lacq
dac u.limit
1:
jms chkint1
lac u.limit
jms dspput
jmp 1f
jms sleep; sfiles+6
jms swap
jmp 1b
1:
lac u.limit
alss 9
jmp passone
3:
jms sleep; sfiles+2
jms swap
jmp rkbdi
wdspo:
jms chkint1
jms forall
jms dspput
jmp fallr
jms sleep; sfiles+6
jms swap
jmp wdspo
rppti:
lac d4
jms getchar
jmp .+3
alss 9
jmp passone
lac sfiles+3
sma
rsa
1:
jms sleep; sfiles+3
jms swap
jmp rppti
wppto:
jms forall
sna
jmp fallr
lmq
lac sfiles+4
spa
jmp 1f
xor o400000
dac sfiles+4
lacq
psa
jmp fallr
1:
lacq
dac char
lac d5
jms putchar
skp
jmp fallr
jms sleep; sfiles+4
jms swap
jmp wppto
passone:
sad o4000
jmp okexit
dac u.base i
lac d1
dac u.ac
jmp sysexit
error: 0
-1
dac u.ac
jmp sysexit
chkint1: 0
dzm .insys
jms chkint
skp
jmp .save
-1
dac .insys
jmp chkint1 i