forked from dspinellis/unix-history-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
s5.s
273 lines (249 loc) · 3.06 KB
/
s5.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
" s5
dskswap: 0
cll; als 3
dac 9f+t
jms dsktrans; -64; userdata; 9f+t; dskswap
lac 9f+t
tad o20
dac 9f+t
jms dsktrans; -4096; 4096; 9f+t; dskswap
isz dskswap
jmp dskswap i
t = t+1
access: 0
lac i.flags
lmq
lac u.uid
spa
jmp access i
sad i.uid
lrs 2
lacq
and mode
sza
jmp access i
jms error
fassign: 0
-10
dac 9f+t
1:
lac 9f+t
tad d10
jms fget
jms halt " will not happen
lac f.flags
sma
jmp 1f
isz 9f+t
jmp 1b
jmp fassign i
1:
lac mode
xor o400000
dac f.flags
lac ii
dac f.i
lac 9f+t
tad d10
dac u.ac
dzm f.badd
jms fput
isz fassign
jmp fassign i
t = t+1
fget: 0
jms betwen; d0; d9
jmp fget i
cll; mul; 3
lacq
tad ofilesp
dac 9f+t
dac .+2
jms copy; ..; fnode; 3
isz fget
jmp fget i
fput: 0
lac 9f+t
dac .+3
jms copy; fnode; ..; 3
jmp fput i
t = t+1
forall: 0
lac u.base
sad u.limit
jmp 1f
lac u.base
ral
lac u.base i
snl
lrs 9
and o777
jmp forall i
fallr:
lac u.base
add o400000
dac u.base
jmp forall+1
1:
lac u.count
dac u.ac
jmp sysexit
sleep: 0
law ulist-1
dac 8
lac o200000
lmq
1:
lac u.ulistp i
sad 8 i
jmp 1f
isz 8
isz 8
isz 8
cla; lrs 1
jmp 1b
1:
tad o100000
dac u.ulistp i
lac sleep i
dac 9f+t
lac 9f+t i
omq
dac 9f+t i
isz sleep
jmp sleep i
t = t+1
dslot: 0
dzm di
skp
1:
isz di
lac di
jms dget
lac d.i
sza
jmp 1b
jmp dslot i
icreat: 0
dac 9f+t
jms dslot
lac o20
dac ii
1:
isz ii
lac ii
jms iget
lac i.flags
spa
jmp 1b
lac ii
dac d.i
jms copy; name; d.name; 4
isz s.uniq
lac s.uniq
dac d.uniq
dac i.uniq
lac 9f+t
xor o400000
dac i.flags
lac u.uid
dac i.uid
-1
dac i.nlks
dzm i.size
jms copyz; i.dskps; 7
jms iput
jms dput
jmp icreat i
t = t+1
dspput: 0
and o177
sna
jmp i dspput
sad o14
jmp 1f
lmq
sad o12
jms dspnl
lac dsploc i
sad o400000
jmp dspleft
omq
dac dsploc i
isz dsploc
jmp i dspput
1:
jms dspinit
jmp dspput i
dspleft:
lac dsploc
sad edspbuf
jmp 1f
dac 8
lac o400000
dac 8 i
cla; llss 18+7
dac dsploc i
jmp dspput i
dspnl: 0
lac dsplno
sad d33
jmp 1f
isz dsplno
jmp dspnl i
1:
lac o2000
wbl
isz dspput
jmp dspput i
dspinit: 0
lac dspbufp3
dac dsploc
lac o400000
dac dspbuf+3
dzm dsplno
jmp dspinit i
movdsp: 0
iof
cdf
dac dspbufp
-1
dac .dspb
ion
jmp movdsp i
arg: 0
lac u.rq+8 i
isz u.rq+8
jmp arg i
argname: 0
jms arg
dac .+2
jms copy; ..; name; 4
lac u.cdir
jms namei; name
jms error
jmp argname i
seektell: 0
jms arg
dac u.base
jms arg
dac u.limit
jms finac
lac u.limit
sna
jmp seektell i
sad d1
jmp .+3
lac i.size
jmp seektell i
lac f.badd
jmp seektell i
isown: 0
jms argname
jms iget
lac u.uid
sma
sad i.uid
skp
jms error
jmp isown i