-
Notifications
You must be signed in to change notification settings - Fork 451
/
init.s
291 lines (277 loc) · 3.09 KB
/
init.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
" init
-1
sys intrp
jms init1
jms init2
1:
sys rmes
sad pid1
jmp 1f
sad pid2
jms init2
jmp 1
1:
jms init1
jmp 1
init1: 0
sys fork
jmp 1f
sys open; ttyin; 0
sys open; ttyout; 1
jmp login
1:
dac pid1
jmp init1 i
init2: 0
sys fork
jmp 1f
sys open; keybd; 0
sys open; displ; 1
jmp login
1:
dac pid2
jmp init2 i
login:
-1
sys intrp
sys open; password; 0
lac d1
sys write; m1; m1s
jms rline
lac ebufp
dac tal
1:
jms gline
law ibuf-1
dac 8
law obuf-1
dac 9
2:
lac 8 i
sac o12
lac o72
sad 9 i
skp
jmp 1b
sad o72
skp
jmp 2b
lac 9 i
sad o72
jmp 1f
-1
tad 9
dac 9
lac d1
sys write; m3; m3s
jms rline
law ibuf-1
dac 8
2:
lac 8 i
sad o12
lac o72
sad 9 i
skp
jmp error
sad o72
skp
jmp 2b
1:
dzm nchar
law dir-1
dac 8
1:
lac 9 i
sad o72
jmp 1f
dac char
lac nchar
sza
jmp 2f
lac char
alss 9
xor o40
dac 8 i
dac nchar
jmp 1b
2:
lac 8
dac nchar
lac nchar i
and o777000
xor char
dac nchar i
dzm nchar
jmp 1b
1:
dzm nchar
1:
lac 9 i
sad o12
jmp 2f
tad om60
lmq
lac nchar
cll; als 3
omq
dac nchar
jmp 1b
2:
lac nchar
sys setuid
sys chdir; dd
sys chdir; dir
lac d2
sys close
sys open; sh; 0
sma
jmp 1f
sys link; system; sh; sh
spa
jmp error
sys open; sh; 0
spa
jmp error
sys unlink; sh
1:
law 017700
dac 9
law boot-1
dac 8
1:
lac 8 i
dac 9 i
sza
jmp 1b
jmp 017701
boot:
lac d2
lmq
sys read; 4096; 07700
lacq
sys close
jmp 4096
0
rline: 0
law ibuf-1
dac 8
1:
cla
sys read; char; 1
lac char
lrss 9
sad o100
jmp rline+1
sad o43
jmp 2f
dac 8 i
sad o12
jmp rline i
jmp 1b
2:
law ibuf-1
sad 8
jmp 1b
-1
tad 8
dac 8
jmp 1b
gline: 0
law obuf-1
dac 8
1:
jms gchar
dac 8 i
sad o12
jmp gline i
jmp 1b
gchar: 0
lac tal
sad ebufp
jmp 1f
ral
lac tal i
snl
lrss 9
and o777
lmq
lac tal
add o400000
dac tal
lacq
sna
jmp gchar+1
jmp gchar i
1:
lac bufp
dac tal
1:
dzm tal i
isz tal
lac tal
sad ebufp
skp
jmp 1b
lac bufp
dac tal
lac d2
sys tead; buf; 64
sna
jmp error
jmp gchar+1
error:
lac d1
sys write; m2; m2s
lac d1
sys smes
sys exit
m1:
012; <lo>;<gi>;<n;<:;<
m1s = .-m1
m2:
<?; 012
m2s = .-m2
m3:
<pa>;<ss>;<wo>;<rd>;<: 040
m3s = .-m3
dd:
<dd>;040040;040040;040040
dir:
040040;040040;040040;040040
ttyin:
<tt>;<yi>;<n 040;040040
ttyout:
<tt>;<yo>;<ut>; 040040
keybd:
<ke>;<yb>;<oa>;<rd>
displ:
<di>;<sp>;<la>;<y 040
sh:
<sh>; 040040;040040;040040
system:
<sy>;<st>;<em>; 040040
password:
<pa>;<ss>;<wo>;<rd>
d1: 1
o43: 043
o100: 0100
o400000; 0400000
d2: 2
o12: 012
om60: -060
d3: 3
ebufp: buf+64
bufp: buf
o777: 0777
o777000: 0777000
o40: 040
o72: 072
ibuf: .=.+100
obuf: .=.+100
tal: .=.+1
buf: .=.+64
char: .=.+1
nchar: .=.+1
pid1: .=.+1
pid2: .=.+1