-
Notifications
You must be signed in to change notification settings - Fork 451
/
ed2.s
510 lines (488 loc) · 6.25 KB
/
ed2.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
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
"[handwritten page number top right of scan - 14]
" ed2
cs:
jms getsc; tal
sad o40
jmp cs
sad o12
jmp error
dac delim
jms compile
lac tbufp
dac tal1
1:
jms getsc; tal
sad delim
jmp 1f
sad o12
jmp error
jms putsc; tal1
jmp 1b
1:
lac o12
jms putsc; tal1
jms newline
jms setdd
lac addr1
sad zerop
jmp error
1:
dac addr1
lac i addr1
jms execute
jmp 2f
lac addr1
dac dot
law line-1
dac 8
law nlist-1
dac 9
-64
dac c1
3:
lac i 8
dac i 9
isz c1
jmp 3b
-1
tad fchrno
dac linsiz
rcr
szl
xor o400000
tad linep
dac tal1
lac tbufp
dac tal
3:
jms getsc; tal
sad o12
jmp 3f
jms putsc; tal1
isz linsiz
"[handwritten page number top right of scan - 15]
jmp 3b
3:
-1
tad lchrno
rcr
szl
xor o400000
tad nlistp
dac tal
3:
jms getsc; tal
jms putsc; tal1
isz linsiz
sad o12
skp
jmp 3b
jms addline
2:
lac addr1
sad addr2
jmp advanc
tad d1
jmp 1b
fsrch:
dac delim
jms compile
jms srcsav
lac dot
floop:
tad d1
dac addr
lac i addr
sza
jmp 1f
lac zerop
dac addr
jmp 2f
1:
jms execute
jmp 2f
jms srcres
jmp ad1
2:
lac addr
sad dot
jmp error
jmp floop
bsrch:
dac delim
jms compile
jms srcsav
lac dot
sad zerop
lac eofp
bloop:
tad dm1
dac addr
lac i addr
"[handwritten page number top right of scan - 16]
sza
jmp 1f
lac eofp
dac addr
jmp 2f
1:
jms execute
jmp 2f
jms srcres
jmp ad1
2:
lac addr
sad dot
jmp error
jmp bloop
srcsav: 0
lac minflg
sza
jmp error
lac addr
sma
jmp error
law line-1
dac 8
law tbuf-1
dac 9
-64
dac c1
1:
lac i 8
dac i 9
isz c1
jmp 1b
jmp i srcsav
srcres: 0
law tbuf-1
dac 8
law line-1
dac 9
-64
dac c1
1:
lac i 8
dac i 9
isz c1
jmp 1b
jmp i srcres
compile: 0
law compbuf-1
dac 8
dzm prev
dzm compflg
cadvanc:
jms getsc; tal
sad delim
jmp cdone
dac compflg
"[handwritten page number top right of scan - 17]
dzm lastre
sad o12
jmp error
"sad o133
"jmp chrcls
sad o136
jmp beglin
sad o44
jmp endlin
"sad o52
"jmp clsure
dac 1f
jmp comp
1; jms matchar; 1: 0; 0
jmp cadvanc
cdone:
lac compflg
sna
jmp 1f
dac lastre
jms comp
1; jms found; 0
jmp i compile
1: "???
lac lastre
sna
jmp error
jmp i compile
chrcls:
jmp error
beglin: "???
jms comp
1; jms matbol; 0
dzm prev
jmp cadvanc
endlin: "???
jms comp
1; jms mateol; 0
dzm prev
jmp cadvanc
clsure:
lac prev
sna
jmp error
tad d1
dac 1f
jms comp
1; jms matclo; 1: 0; 0
dzm prev
jmp cadvanc
comp: 0 "???
-1
tad comp
dac 9
lac 8
"[handwritten page number top right of scan - 18]
dac prev
1: "???
lac i 9
sna
jmp i 9
dac i 8
jmp 1b
execute: 0
jms gline
lac linep
dac tal1
dzm charno
dzm fchrno
dzm lchrno
lac jmpclist
dac trvect
lac jmpnlist
dac trvect+1
lac jmpxchg
dac i trvect+1
jmp 1f
xchg:
lacq
sad o12
jmp i execute
lac jmpxchg
dac i 8
1: "???
lac trvect
lmq
lac trvect+1
dac trvect
lacq
dac trvect+1
tad dm1
dac 8
jms getsc; tal1
lmq
isz charno
jms compbuf
charno:
0
trvect:
0;0
matchar: 0 "???
-2
tad matchar
dac exret
lac i exret
dac exret
lacq
sad i matchar
skp
jmp 1f
lac matchar
and o17777
tad jms1
dac i 8
"[handwritten page number top right of scan - 19]
lac i exret
dac i 8
1: "???
isz exret
jmp i exret
found: 0
-2
tad found
dac exret
lac i exret
dac exret
lac fchrno
sza
jmp 1f
isz execute
jmp 2f
1: "???
sad i exret
jmp 1f
cma
tad i exret
spa
jmp 2f
jmp 3f
1: "???
lac charno
cma
tad charno
spa
jmp 3f
2: "???
lac i exret
dac fchrno
lac charno
dac lchrno
3: "???
isz exret
jmp i exret
matbol: 0 "???
lac charno
sad d1
jmp 1f
lac matbol
jmp 2f
1: "???
lac matbol
jmp 3f
mateol: 0 "???
lacq
sad o12
jmp 1f
lac mateol
2: "???
tad dm2
dac exret
lac i exret
dac 9
jmp i 9
"[handwritten page number top right of scan - 20]
1: "???
lac mateol
3: "???
tad dm3
dac 9
lac i 9
isz 9
dac i 9
jmp i 9
matclo: 0 "???
-2
tad matclo
dac exret
lac i exret
dac cloret
lac i cloret
dac 1f
dac 2f
lac i matclo
dac exret
jms i exret; 1: 0
isz matclo
jms i matclo; 2: 0
isz cloret
jmp i cloret
"??? the remainder of this scan had an unreadable first character
"??? I did the best I could to recreate the characters appropriately
d1: 1
o133: 0133
dm3: -3
o136: 0136
dm2: -2
o52: 052
o57: 057
o77: 077
o40: 040
o12: 012
d47: 47
d58: 58
dm48: -48
d10: 10
d8: 8
d48: o60: 060
d100000: 100000
o44: 044
o53: 053
o56: 056
o55: 055
o11: 011
o400000: 0400000
o17777: 017777
o144: 0144
dm1: -1
o56012: 056012
o777: 0777
o100: 0100
o43: 043
o777000: 0777000
o75: 075
o167: 0167
o161: 0161
"[handwritten page number top right of scan - 21]
o160: 0160
o143: 0143
o141: 0141
o1777: 01777
d1024: 1024
o776000: 0776000
o162: 0162
o163: 0163
o73: 073
o54: 054
o17: 017
tname:
0145056;0164155;0160040;040040
tbufp: tbuf
linep: line
nlistp: nlist
fbufp: fbuf
dskbfp: dskbuf "[line crossed out - scan markup]
edskbfp: dskbuf+1024 "[line crossed out - scan markup]
lnodp: lnodes
linpm1: line-1
jmpclist: jmp clist
jmpnlist: jmp nlist
jmpxchg: jmp xchg
jms1: jms 1
tal: .=.+1
exret: .=.+1
cloret: .=.+1
delim: .=.+1
prev: .=.+1
compflg: .=.+1
tal1: .=.+1
c1: .=.+1
ital: .=.+1
otal: .=.+1
diskin: .=.+1
glint1: .=.+1
c2: .=.+1
num: .=.+1
zermp: .=.+1
minflg: .=.+1
adrflg: .=.+1
dot: .=.+1
addr: .=.+1
addr1: .=.+1
addr2: .=.+1
eofp: .=.+1
zerop: .=.+1
dskadr: .=.+1
linsiz: .=.+1
tfi: .=.+1
fchrno: .=.+1
lchrno: .=.+1
lastre: .=.+1
bett1: .=.+1
bett2: .=.+1
wrflg: .=.+1
apt1: .=.+1
sfi: .=.+1
"[handwritten page number top right of scan - 22]
sfo: .=.+1
sctal: .=.+1
sctalp: .=.+1
char: .=.+1
fbuf: .=.+4 "not sure if this is fbuf, but
tbuf: .=.+64 "there is a write; tbuf; 64 call
line: .=.+64
nlist: .=.+50
clist: .=.+50
compbuf: .=.+100
dskbuf: .=.+1 "[line crossed out - scan markup]
lnodes: .=.+1000