forked from dspinellis/unix-history-repo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
dmabs.s
256 lines (238 loc) · 2.72 KB
/
dmabs.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
" dmabs
lac o17
sys creat; punout
spa
sys save
dac fo
lac 017777
tad d1
dac name
jms space
100
loop:
dzm oldsum
lac initcmd
dac comand
lac i 017777
sad d4
jmp stop
tad dm4
dac i 017777
lac name
tad d4
dac name
dump1:
lac comand
xor dactra
dac tracmd
dump2:
sys open; name: 0; 0
spa
jmp opnerr
dac fi
-bootsiz
dac c1
law boot-1
dac 8
1:
lac i 8
jms put
isz c1
jmp 1b
lac bootcmd
lrs 12
jms put1
lac bootcmd
lrs 6
jms put1
lac bootcmd
and o77
xor o300
jms put2
jms space
3
dump3:
-1
tad bufp
dac 8
-64
dac c1
1:
dzm i 8
isz c1
jmp 1b
lac fi
sys read; bufp: buf; 64
sna
jmp done
dac count
-1
tad bufp
dac 8
-64
dac c1
cla
1:
add i 8
isz c1
jmp 1b
sna
jmp dump4
dac newsum
lac comand
jms put
lac count
jms put
lac oldsum
add comand
add count
jms put
lac newsum
dac oldsum
jms space
3
-1
tad bufp
dac 8
-1
tad count
cma
dac c1
1:
lac i 8
jms put
isz c1
jmp 1b
jms space
10
dump4:
lac comand
tad count
dac comand
jmp dump3
done:
lac tracmd
jms put
cla
jms put
lac oldsum
add tracmd
jms put
jms space
20
lac fi
sys close
jmp loop
stop:
cla
jms put
jms space
100
sys exit
space: 0
-1
tad i space
cma
dac c1
isz space
1:
lac o400
jms put2
isz c1
jmp 1b
jmp i space
put: 0
dac 1f
lrs 12
jms put1
lac 1f
lrs 6
jms put1
lac 1f
jms put1
jmp i put
1:0
put1:0
and o77
xor o200
jms put2
jmp i put1
put2: 0
dac 1f
lac fo
sys write; 1f; 1
jmp i put2
1: 0
boot:
org = 017740
2:
jms get1-boot+org
dac cmd-boot+org
jms get1-boot+org
cma
dac cnt-boot+org
jms get2-boot+org
xor sum-boot+org
dzm sum-boot+org
cla cll sza
hlt
isz cnt-boot+org
1:
jms get1-boot+org
cmd: 0
isz cmd-boot+org
isz cnt-boot+org
jmp 1b-boot+org
jmp 2b-boot+org
get1: 0
jms get2-boot+org
dac get2-boot+org
add sum-boot+org
dac sum-boot+org
lac get2-boot+org
jmp i get1-boot+org
get2: 0
iot 0144
1:
iot 0101
jmp 1b-boot+org
iot 0112
jmp i get2-boot+org
sum: 0
cnt = sum+1
bootsiz = .-boot
bootcmd: jmp org
opnerr:
lac name
dac 1f
lac d1
sys write; 1: 0; 4
lac d1
sys write; mes; 2
jmp loop
mes:
040;077012
comand: 0
tracmd: 0
d1: 1
.17777: 017777
o77: 077
o200: 0200
o300: 0300
d4: 4
d64: 64
dm4: -4
o400: 0400
punout: <pp>;<to>;<ut>;040040
o17: 017
fi: 0
fo: 0
count: 0
oldsum: 0
newsum: 0
daccmd: dac
dactra: dac jmp
initcmd: dac 0
c1: 0
buf:
iot = 0700000