Commit | Line | Data |
---|---|---|
7af5ad59 PH |
1 | /TC08 DECTAPE FORMATTER, V4 |
2 | / | |
3 | / | |
4 | / | |
5 | / | |
6 | / | |
7 | / | |
8 | // | |
9 | / | |
10 | / | |
11 | / | |
12 | / | |
13 | /COPYRIGHT (C) 1975 | |
14 | /DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. | |
15 | / | |
16 | / | |
17 | / | |
18 | /THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A | |
19 | /SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE INCLU- | |
20 | /SION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR ANT OTHER | |
21 | /COPIES THEREOF, MAY NOT BR PROVIDED OR OTHERWISE MADE AVAILABLE | |
22 | /TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO | |
23 | /AGREES TO THESE LICENSE TERMS. TITLE TO AND OWNERSHIP OF THE | |
24 | /SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC. | |
25 | / | |
26 | / | |
27 | /THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT | |
28 | /NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL | |
29 | /EQUIPMRNT COROPATION. | |
30 | / | |
31 | /DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS | |
32 | /SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. | |
33 | / | |
34 | / | |
35 | / | |
36 | / | |
37 | / | |
38 | / | |
39 | \f/COPYRIGHT 1970 DIGITAL EQUIPMENT CORP. | |
40 | /MAYNARD, MASS. | |
41 | /REVISED APRIL 1970 | |
42 | ||
43 | / TOG-8 TO MARK AND CHECK PDP-8 DECTAPE | |
44 | /THIS PROGRAM WRITES TIMING AND MARK TRACKS ON | |
45 | /DECTAPE MOUNTED ON THE TCO1-TU55 TAPE CONTROL UNIT. | |
46 | ||
47 | ||
48 | ||
49 | ||
50 | ||
51 | X1=10 | |
52 | X2=11 | |
53 | ||
54 | /SYMBOL TABLE AUGMENTATION | |
55 | ||
56 | DTRA=6761 | |
57 | DTCA=6762 | |
58 | DTXA=6764 | |
59 | DTSF=6771 | |
60 | DTRB=6772 | |
61 | DTLB=6774 | |
62 | DTCX=6766 | |
63 | ||
64 | /SET 0 FOR THE LOGIN FEATURE | |
65 | ||
66 | *0 | |
67 | 0 | |
68 | JMP I .+1 | |
69 | CONC /CONTROL "C" AND LOGIN | |
70 | ||
71 | /WORKING LOCATIONS | |
72 | ||
73 | *20 | |
74 | ||
75 | W1, 0000 | |
76 | W2, 0000 | |
77 | W3, 0000 | |
78 | W4, 0000 | |
79 | W5, 0000 | |
80 | W6, 0000 | |
81 | BLOCKS, 0000 | |
82 | BLOCKA, 0000 | |
83 | DTA, 0000 | |
84 | ERX, 0000 | |
85 | PHASE, 0000 | |
86 | TOTAL, 0000 | |
87 | VAR1, 0000 | |
88 | VAR2, 0000 | |
89 | \f/CONSTANTS | |
90 | ||
91 | C1, 0001 | |
92 | C2, 0002 | |
93 | C3, 0003 | |
94 | C4, 0004 | |
95 | C0017, 0017 | |
96 | C0070, 0070 | |
97 | C0077, 0077 | |
98 | C0007, 0007 | |
99 | C0030, 0030 | |
100 | C0400, 0400 | |
101 | C0700, 0700 | |
102 | C203, 0203 | |
103 | C201, 0201 | |
104 | C210, 0210 | |
105 | C260, 0260 | |
106 | C261, 0261 | |
107 | C267, 0267 | |
108 | C270, 0270 | |
109 | C271, 0271 | |
110 | C277, 0277 | |
111 | C1000, 1000 | |
112 | C1620, 1620 | |
113 | C7000, 7000 | |
114 | C7700, 7700 | |
115 | C7714, 7714 | |
116 | C7761, 7761 | |
117 | C7772, 7772 | |
118 | C7775, 7775 | |
119 | CRCOD, 0215 | |
120 | LETK, 0313 | |
121 | LFCOD, 0212 | |
122 | M2, -2 | |
123 | M3, -3 | |
124 | M4, -4 | |
125 | M6, -6 | |
126 | M7, -7 | |
127 | M14, -14 | |
128 | M144, -144 | |
129 | M300, -300 | |
130 | SPCOD, 0240 | |
131 | \f/INTERPAGE LINKS | |
132 | ||
133 | ADW2, W2-1 | |
134 | ADW3, W3-1 | |
135 | BADD, BUFFER-1 | |
136 | BFR, BUFFER | |
137 | CA, 7755 | |
138 | COMPAR, COMPRE | |
139 | FCON, 0000 | |
140 | IT, INIT1 | |
141 | FORMA, FORM-1 | |
142 | FORMB, FORM | |
143 | QU1, Q1 | |
144 | QU2, Q2 | |
145 | QU3, Q3 | |
146 | QU4, Q4 | |
147 | MESS, MES | |
148 | STX, START | |
149 | TURN, TRN | |
150 | TYOCT, TYCT | |
151 | TYPE, MESAGE | |
152 | TYPIN, TYPN | |
153 | WAIT, STALL | |
154 | WC, 7754 | |
155 | DBUFPT, 0 /POINTER TO CURRENT POSITION IN DTA LIST | |
156 | ||
157 | ||
158 | \f | |
159 | ||
160 | ||
161 | /TYPE THE CHARACTER IN THE AC ON THE KEYBOARD PRINTER | |
162 | ||
163 | RSEND, 0000 | |
164 | TLS /LOAD AND PRINT, CLEAR FLAG | |
165 | TSF /WAIT FOR CONFIRMATION | |
166 | JMP .-1 /ENDLESSLY | |
167 | TCF /CLEAR THE FLAG ANYWAY | |
168 | JMP I RSEND | |
169 | ||
170 | ||
171 | /PRINT A "?" ON THE KEYBOARD TYPER | |
172 | ||
173 | QU, .+1 | |
174 | IOF /KILL LOG AND CONTROL C FCTN | |
175 | CLA CLL /C(AC)+C(L)=0 | |
176 | TAD C277 /"?" | |
177 | JMS RSEND /TYPE THE CHARACTER | |
178 | JMP I .+1 /RESTART | |
179 | INIT | |
180 | ||
181 | /DECTAPE CONTROL WORDS | |
182 | ||
183 | DT0030, 0030 | |
184 | DT0060, 0060 | |
185 | DT0070, 0070 | |
186 | DT0100, 0100 | |
187 | DT0130, 0130 | |
188 | DT0140, 0140 | |
189 | DT0200, 0200 | |
190 | DT0210, 0210 | |
191 | DT0360, 0360 | |
192 | DT0510, 0510 | |
193 | DT0600, 0600 | |
194 | DT0610, 0610 | |
195 | ||
196 | /SOME SPECIAL LINKS | |
197 | ||
198 | ADBA, 2475 | |
199 | ADWA, 2476 | |
200 | ADWAB, 2477 | |
201 | ||
202 | /CONSTANTS FOR FORMULA TRANSLATION SECTION | |
203 | ||
204 | BINCON, .+1 | |
205 | 0001 | |
206 | 0012 | |
207 | 0144 | |
208 | 1750 | |
209 | \f *200 /PAGE 1 | |
210 | /TYPE CANNED MESSAGES..... | |
211 | /THANKS TO DIGITAL 8-18-U | |
212 | ||
213 | MESAGE, 0 | |
214 | IOF /KILL LOG AND CONTROL FUNCTION | |
215 | CLA CMA /SET C(AC)=-1 | |
216 | TAD MESAGE /ADD LOCATION | |
217 | DCA 10 /AUTO INDEX REGISTER | |
218 | TAD I 10 /FETCH FIRST WORD | |
219 | DCA MSRGHT /SAVE IT | |
220 | TAD MSRGHT | |
221 | RTR | |
222 | RTR /ROTATE 6 BITS TO THE RIGHT | |
223 | RTR | |
224 | JMS TYPECH /TYPE IT | |
225 | TAD MSRGHT /GET DATA AGAIN | |
226 | JMS TYPECH /TYPE RIGHT HALF | |
227 | JMP MESAGE+5 /CONTINUE | |
228 | MSRGHT, 0 /TEMPORARY STORAGE | |
229 | TYPECH, 0 /TYPE CHARACTER IN C(AC)6-11 | |
230 | AND C0077 | |
231 | SNA /IS IT END OF MESSAGE? | |
232 | JMP I 10 /YES: EXIT | |
233 | TAD M40 /SUBTRACT 40 | |
234 | SMA /<40? | |
235 | JMP .+3 /NO | |
236 | TAD C340 /YES: ADD 300 | |
237 | JMP MTP /TO CODES <40 | |
238 | TAD M3 /SUBTRACT 3 | |
239 | SZA /IS IT ZERO? | |
240 | JMP .+3 /NO | |
241 | TAD C212 /YES: CODE 43 IS | |
242 | JMP MTP /LINE-FEED (212) | |
243 | TAD M2 /SUBTRACT 2 | |
244 | SZA /IS IT ZERO? | |
245 | JMP .+3 /NO | |
246 | TAD C215 /YES: CODE 45 IS | |
247 | JMP MTP /CARRIAGE RETURN (215) | |
248 | TAD C245 /ADD 200 TO OTHERS >40 | |
249 | MTP, TLS /TRANSMIT CHARACTER | |
250 | TSF /WAIT FOR THE FLAG | |
251 | JMP .-1 /NOT SET YET | |
252 | CLA /SET: CLEAR C(AC) | |
253 | JMP I TYPECH /RETURN | |
254 | ||
255 | /CONSTANTS | |
256 | ||
257 | M40, -40 | |
258 | C340, 340 | |
259 | C212, 212 | |
260 | C215, 215 | |
261 | C245, 245 | |
262 | \f/ROUTINE WAITS UNTILL A COMPLETE MESSAGE HAS BEEN ENTERED | |
263 | /SIGNIFIED BY A CR. | |
264 | ||
265 | TYPN, 0 | |
266 | IOF /KILL THE LOG AND CONTROL C FUNCTION | |
267 | KCC /CLEAR AC, KEYBOARD FLAG | |
268 | TAD BADD /GET BUFFER ADDRESS | |
269 | DCA W1 /STORE FOR THE CHARACTER STRING | |
270 | ||
271 | /READ AND RESPOND WITH THE CHARACTER | |
272 | ||
273 | NTYRTN, ISZ W1 /NORMAL RETURN. INCREMENT BUFFER | |
274 | KSF /WAIT FOR KEYBOARD | |
275 | JMP .-1 /FLAG TO RAISE | |
276 | KRB /GOT FLAG, RESET IT, GET CHARACTER | |
277 | JMS RSEND /SEND CHARACTER BACK | |
278 | AND (177 /TAKE CARE OF PARITY | |
279 | TAD (200 | |
280 | DCA I W1 /LOAD CHARACTER INTO BUFFER AREA | |
281 | TAD I W1 /CHECK FOR CTRL C | |
282 | CIA | |
283 | TAD C203 | |
284 | SZA CLA | |
285 | JMP CHKSP /NO- CHECK FOR SPACE | |
286 | 6007 /CTRL C -CLEAR ALL FLAGS | |
287 | NOP /FOR OLD MACHINES | |
288 | CLA /JUST IN CASE | |
289 | DTLB /CLEAR STATUS REGISTER B | |
290 | JMP I (7605 | |
291 | ||
292 | /IF CHARACTER IS A SPACE, IGNORE IT | |
293 | ||
294 | CHKSP, TAD I W1 /CHARACTER INTO THE AC | |
295 | CIA /SUBTRACT FROM SPACE CODE (240) | |
296 | TAD SPCOD /COMPLETE COMPARISON | |
297 | SNA CLA /WAS IT A SPACE? | |
298 | JMP NTYRTN+1 /YES: DO NOT INCREMENT BUFFER | |
299 | ||
300 | /IF CHARACTER IS A CR, EXIT FROM ROUTINE | |
301 | ||
302 | TAD I W1 /CHARACTER TO AC | |
303 | CIA /SET AC TO SUBTRACT CR (215) | |
304 | TAD CRCOD /COMPLETE COMPARISON | |
305 | SZA CLA /WAS IT CR? | |
306 | JMP NTYRTN /NO: INCREMENT BUFFER + WAIT | |
307 | ||
308 | /CARRIAGE RETURN FOUND, EXIT FROM ROUTINE | |
309 | ||
310 | TAD LFCOD /GIVE KEYBOARD LINE FEED | |
311 | JMS RSEND /EXECUTE LINE FEED | |
312 | CLA CLL /EXIT WITH C(ACC) + AND C(L)=0 | |
313 | ION /RESET LOG AND CONTROL C FUNCTION | |
314 | JMP I TYPN /RETURN TO CALL | |
315 | \f/COMPARE A STRING OF CHARACTERS IN "BUFFER" | |
316 | /TO A CHARACTER STRING AFTER A JMS IN ASCII | |
317 | ||
318 | COMPRE, 0 | |
319 | CLA CMA /C(AC)=7777 | |
320 | TAD COMPRE /SUBTRACT 1 FOR INDEX REG 1 | |
321 | DCA 10 /AUTO INDEX 1 SET TO CHA STRING | |
322 | TAD BADD /AUTO INDEX 2 SET TO BUFFER-1 | |
323 | DCA 11 /LOAD X2 | |
324 | ||
325 | /COMPARE CHARACTERS TILL ONE DOESN'T COMPARE OR TILL | |
326 | /A 0 IS FOUND IN X1. IF OK, RETURN TO TWO PLUS THE | |
327 | /ZERO, IF BAD ONE PLUS | |
328 | ||
329 | TAD I X1 /CHARACTER FROM PROGRAM | |
330 | CIA /TO SUBTRACT FROM | |
331 | TAD I X2 /CHARACTER IN BUFFER | |
332 | SZA CLA /COMPARE? | |
333 | JMP CERR /NO:RESYNC FOR NON COMPARE EXIT | |
334 | TAD I X1 /YES: CHECK FOR GOOD EXIT | |
335 | SZA /IF 0, EXIT GOOD | |
336 | JMP .-6 /NO: TEST NEXT CHAACTER | |
337 | ISZ X1 /+1 TO X1(TOTAL 2 FROM THE 0) | |
338 | JMP I X1 /+1 TO X1, EXIT | |
339 | ||
340 | /ERROR FOUND. RESYNC AND EXIT NO COMPARE | |
341 | ||
342 | CERR, TAD I X1 /CHARACTER FROM PROGRAM | |
343 | SZA CLA /IS THIS EXIT KEY? (0000) | |
344 | JMP .-2 /NO: GET NEXT | |
345 | JMP I X1 /YES: EXIT, NOT COMPARE | |
346 | \f\f *400 | |
347 | /VARIOUS ERROR MESSAGES | |
348 | /"NOT DECIMAL" | |
349 | ||
350 | Q1, JMS I TYPE | |
351 | 1617 /NO | |
352 | 2440 /T | |
353 | 0405 /DE | |
354 | 0311 /CI | |
355 | 1501 /MA | |
356 | 1400 /L | |
357 | JMP QUX | |
358 | ||
359 | /"TO MANY WORDS" | |
360 | ||
361 | Q2, JMS I TYPE | |
362 | 2417 /TO | |
363 | 1740 /O | |
364 | 1501 /MA | |
365 | 1631 /NY | |
366 | 4027 / W | |
367 | 1722 /OR | |
368 | 0423 /DS | |
369 | 0000 /00 | |
370 | JMP QUX | |
371 | ||
372 | /"TO MANY BLOCKS" | |
373 | ||
374 | Q3, JMS I TYPE | |
375 | 2417 /TO | |
376 | 1740 /O | |
377 | 1501 /MA | |
378 | 1631 /NY | |
379 | 4002 / B | |
380 | 1417 /LO | |
381 | 0313 /CK | |
382 | 2300 /S0 | |
383 | JMP QUX | |
384 | ||
385 | /"NOT DIVISIBLE BY 3" | |
386 | Q4, JMS I TYPE | |
387 | 1617 /NO | |
388 | 2440 /T | |
389 | 0411 /DI | |
390 | 2611 /VI | |
391 | 2311 /SI | |
392 | 0214 /BL | |
393 | 0540 /E | |
394 | 0231 /BY | |
395 | 4063 / 3 | |
396 | 0000 /00 | |
397 | QUX, JMS I TYPE | |
398 | 4345 /CR+LF | |
399 | 0000 /END | |
400 | JMP I .+1 | |
401 | INIT | |
402 | \f/THE CODING BELOW CREATES THE BLOCK NUMBER | |
403 | /CONVERSION PRIOR TO THE TAPE WRITE. | |
404 | ||
405 | MES, 0 | |
406 | DCA W4 /BLOCK NUMBER GIVEN IN AC | |
407 | TAD W4 /RESTORE TO AC AGAIN | |
408 | CMA /COMPLEMENTED | |
409 | RTL | |
410 | RAL /LEFT 3 | |
411 | DCA W5 /TEMP SAVE | |
412 | TAD W5 /TO AC AGAIN | |
413 | AND C7000 /ISOLATE HIGH CHA | |
414 | DCA V2 /FORWARD BLOCK NUMBER | |
415 | TAD W5 /SHIFTED VALUE | |
416 | AND C0070 /ISOLATE 6,7,8 | |
417 | DCA V1 /FORWARD BLOCK NUMBER | |
418 | TAD W4 /ORIGIONAL SET | |
419 | CMA /UPSIDE DOWN | |
420 | RTR | |
421 | RAR /RIGHT 3 | |
422 | DCA W5 /TEMP SAVE | |
423 | TAD W5 /TO AC AGAIN | |
424 | AND C0700 /ISOLATE 3,4,5 | |
425 | TAD V2 /COMBINE FORWARD BLOCK NUMBER | |
426 | TAD C0077 | |
427 | DCA V2 /1/2 COMPLETE | |
428 | TAD W5 /SHIFTED VALUE | |
429 | AND C0007 /ISOLATE 9, 10,11 | |
430 | TAD V1 /COMBINE WITH BN | |
431 | DCA V1 /FORWARD BLOCK NUMBER COMPLETE | |
432 | ||
433 | /CONVERT REVERSE BLOCK NUMBER | |
434 | ||
435 | CMA /-1 TO GIVEN BLOCK # | |
436 | TAD W4 /ORIGIONAL BLOCK # | |
437 | DCA W5 /TEMP SAVE | |
438 | TAD W5 /TO AC AGAIN | |
439 | RTR | |
440 | RTR /6 RIGHT | |
441 | RTR | |
442 | AND C0077 /ISOLATE LOW | |
443 | DCA V3 /HIGH REVERSE | |
444 | TAD W5 /COMPLEMENT ORIGIONAL -1 | |
445 | RTL | |
446 | RTL /6 LEFT | |
447 | RTL | |
448 | AND C7700 /ISOLATE HIGH | |
449 | DCA V4 /REVERSE COMPLETED | |
450 | JMP I MES | |
451 | \f/FORM USED TO WRITE 12 DATA WORDS FOR BLOCK NUMBERING | |
452 | ||
453 | FORM, 0000 | |
454 | 0000 | |
455 | 0000 | |
456 | 0000 | |
457 | V1, 0000 | |
458 | V2, 0000 | |
459 | 7777 | |
460 | 7700 | |
461 | 0000 | |
462 | V3, 0000 | |
463 | V4, 0000 | |
464 | 0000 | |
465 | \f//THIS ROUTINE ALLOWS KEYBOARD INTERRUPTION | |
466 | /FOR LOGGING ON THE KEYBOARD, OR FOR A MAJOR | |
467 | /CLEAR IN THE PROGRAM. BY HITTING "CONTROL C" | |
468 | /A SYSTEM RESTART WILL OCCUR. | |
469 | ||
470 | CONC, TSF /IS THE PRINTER FLAG ON? | |
471 | JMP .+5 /NO, CHECK READER | |
472 | TCF /YES: RESET IT | |
473 | KSF /IS THE READER FLAG ON? | |
474 | JMP RTNS /NO: RETURN TO SEQUENCE | |
475 | JMP .+3 | |
476 | KSF | |
477 | HLT | |
478 | ||
479 | /OK. CHECK FOR EITHER LOG OR CONTROL C. | |
480 | ||
481 | DCA MES /SAVE C(AC) | |
482 | RAL /SAVE THE LINK | |
483 | DCA RSYC+6 /FOR LOGGING | |
484 | KRB /GET CHARACTER FROM KEYBOARD | |
485 | TLS /RETURN CHARACTER | |
486 | CIA /TO SEE IF | |
487 | TAD C203 /"CONTROL C" | |
488 | SNA CLA /IS IT? | |
489 | JMP RSYC /YES: RESYNC THE PROGRAM | |
490 | TAD RSYC+6 /RESTORE THE LINK | |
491 | RAR /FOR EXIT. | |
492 | TAD MES /THE AC TOO | |
493 | RTNS, ION /INTERRUPT ON | |
494 | JMP I 0 /RETURN | |
495 | \f | |
496 | *600 | |
497 | /RESYNC THE SYSTEM TO START | |
498 | ||
499 | RSYC, TSF /WAIT FOR FLAG | |
500 | JMP .-1 /ON LAST SENDOFF | |
501 | JMS I TYPE | |
502 | 2205 /RE | |
503 | 2331 /SY | |
504 | 1603 /NC | |
505 | 0000 /END | |
506 | TAD DTA /TO KILL EXISTING TAPE MOTION | |
507 | DTCX /NOW | |
508 | JMP I STX /RETURN TO START | |
509 | \f/WAIT FOR THE DECTAPE FLAG TO RISE | |
510 | ||
511 | STALL, 0 | |
512 | CLA | |
513 | DTRB /READ TCU "B" REGISTER | |
514 | SPA /ERROR? | |
515 | JMP ERROR /YES, DECIDE WHAT TO DO | |
516 | RAR /DECTAPE FLAG TO LINK | |
517 | SNL CLA /FLAG? | |
518 | JMP .-5 /NO: CONTINUE WATCH | |
519 | RERR, DTXA /RESET THE DECTAPE FLAG | |
520 | DCA ERX /CLEAR THE END TAPE FLAG | |
521 | JMP I STALL /GOT FLAG, EXIT | |
522 | ||
523 | /DRIVE TAPE INTO THE END ZONE, AND TURN IT | |
524 | /AROUND. | |
525 | /IF C(AC)=0400, TAPE INTO REVERSE END ZONE | |
526 | /IF C(AC)=0000, TAPE INTO FORWARD END ZONE | |
527 | ||
528 | TRN, 0 | |
529 | ISZ ERX /END ZONE IS LEGAL | |
530 | DCA W4 /SAVE DIRECTION | |
531 | TAD DT0200 /MOVE FUNCTION,GO | |
532 | TAD W4 /DIRECTION TO MOVE | |
533 | TAD DTA /DRIVE TO MOVE | |
534 | DTCX /CLEAR AND RESET "A" | |
535 | JMS I WAIT /FOR END ZONE FLAG | |
536 | TAD DT0610 /SEARCH, GO | |
537 | TAD W4 /DIRECTION TO SEARCH | |
538 | AND C0777 /DELETE OVERFLOW BIT | |
539 | TAD DTA /SET THE DECTAPE | |
540 | DTCX /RESET STATUS "A" | |
541 | DCA ERX /END ZONE NOT LEGAL NOW | |
542 | JMP I TRN /RETURN TO SEQUENCE | |
543 | C0777, 0777 | |
544 | ||
545 | \f/AN ERROR FLAG HAS BEEN SET. IN SOME CASES | |
546 | /END ZONE IS LEGAL, OTHERWISE, A RESTART ATTEMPT | |
547 | /MAY BE INITIATED. | |
548 | ||
549 | /DETERMINE WHICH FLAG SET THE DECTAPE FLAG | |
550 | ||
551 | ERROR, DCA W5 /SAVE "B" REGISTER | |
552 | TAD DTA /GOING TO KILL | |
553 | DTCX /TAPE MOTION | |
554 | TAD W5 /RESTORE "B" REGISTER | |
555 | RTL /POSITION BITS 1+2 | |
556 | SPA /END OF TAPE FLAG? | |
557 | JMP ZEOT /YES: GO TO ROUTINE | |
558 | SZL /MARK TRACK ERROR? | |
559 | JMP ZMKTK /YES: GO TO ROUTINE | |
560 | RTL /POSITION BITS 2+3 | |
561 | SPA /PARITY ERROR? | |
562 | JMP ZPAR /YES: GO TO PARITY ERROR ROUTINE | |
563 | SZL CLA /SELECT ERROR? | |
564 | JMP ZSEL /YES: GO TO ROUTINE | |
565 | JMP ZTIM /MUST BE TIMING ERROR | |
566 | ||
567 | /END OF TAPE FLAG FOUND, SEE IF IT'S LEGAL | |
568 | ||
569 | ZEOT, CLA CLL /CLEAR REMAINS | |
570 | TAD ERX /SWITCH | |
571 | SZA CLA /ERROR? | |
572 | JMP RERR /OK, IT'S LEGAL | |
573 | ||
574 | /NOT LEGAL END ZONE FLAG | |
575 | ||
576 | JMS I TYPE | |
577 | 0516 /EN | |
578 | 0440 /D | |
579 | 2401 /TA | |
580 | 2005 /PE | |
581 | 4000 / 0 | |
582 | JMP ZCOM | |
583 | ||
584 | /MARK TRACK ERROR | |
585 | ||
586 | ZMKTK, JMS I TYPE | |
587 | 1501 /MA | |
588 | 2213 /RK | |
589 | 4024 / T | |
590 | 2201 /RA | |
591 | 0313 /CK | |
592 | 4000 / 0 | |
593 | JMP ZCOM | |
594 | \f/PARITY ERROR | |
595 | ||
596 | ZPAR, JMS I TYPE | |
597 | 2001 /PA | |
598 | 2211 /RI | |
599 | 2431 /TY | |
600 | 4000 / 0 | |
601 | JMP ZCOM | |
602 | ||
603 | /SELECT ERROR | |
604 | ||
605 | ZSEL, JMS I TYPE | |
606 | 2305 /SE | |
607 | 1405 /LE | |
608 | 0324 /CT | |
609 | 4000 / 0 | |
610 | JMP ZCOM | |
611 | ||
612 | /TIMING ERROR | |
613 | ||
614 | ZTIM, JMS I TYPE | |
615 | 2411 /TI | |
616 | 1511 /MI | |
617 | 1607 /NG | |
618 | 4000 / 0 | |
619 | ||
620 | /TYPE "ERROR PHASE X" | |
621 | ||
622 | ZCOM, TAD PHASE /WHAT PHASE OF OPERATION | |
623 | TAD PFORM /WAS THE MACHINE IN | |
624 | DCA TFORM /WHEN ERROR OCCURED | |
625 | JMS I TYPE | |
626 | 0522 /ER | |
627 | 2217 /RO | |
628 | 2240 /R | |
629 | 2010 /PH | |
630 | 0123 /AS | |
631 | 0540 /E | |
632 | TFORM, 4060 / X | |
633 | 4345 /CR+LF | |
634 | 0000 /END | |
635 | JMS I TYPIN | |
636 | ||
637 | /HE CAN RESTART IF HE TYPES "RETRY" | |
638 | ||
639 | JMS I COMPAR | |
640 | 0322 /R | |
641 | 0305 /E | |
642 | 0324 /T | |
643 | 0322 /R | |
644 | 0331 /Y | |
645 | 0000 /0 | |
646 | JMP I IT /GUESS HE DOESN'T WISH TO TRY AGAIN | |
647 | \f/ATTEMPT RESTART. NOTE, "ATTEMPT" | |
648 | ||
649 | TAD PHASE /RESTART ACCORDING TO | |
650 | TAD ZFORM /WHICH PHASE WAS HE IN | |
651 | DCA .+3 | |
652 | JMP I .+2 | |
653 | ZFORM, .+2 | |
654 | 0000 | |
655 | JMP I .+5 /PHASE 0 | |
656 | JMP I .+5 /PHASE 1 | |
657 | JMP I .+5 /PHASE 2 | |
658 | JMP I .+5 /PHASE 3 | |
659 | JMP I .+5 /PHASE 4 | |
660 | START | |
661 | PSER | |
662 | DOBLK | |
663 | DBN | |
664 | NOP | |
665 | PFORM, 4060 | |
666 | \f | |
667 | ||
668 | ||
669 | /HERE STARTS THIS PROGRAM. IT WILL ASK THE | |
670 | /OPERATOR FOR DRIVE NUMBERS, THEN ASK HIM FOR | |
671 | /A DIRECTION ON WHAT TO DO WITH THE DRIVES. | |
672 | ||
673 | /THE SEQUENCE FOR MARKING A TAPE WOULD APPEAR AS: | |
674 | ||
675 | ||
676 | /DTA? (3 OR 1 2 3 OR 2 4 7) | |
677 | /DIRECT? (MARK 1215) | |
678 | /2277 WORDS, 0256 BLOCKS.OK? YES OR NO | |
679 | /(YES) | |
680 | ||
681 | ||
682 | /THAT DATA IN PARENTHESIS IS TYPED BY THE OPERATOR | |
683 | /(HE DOESN'T TYPE THE PARENTHESIS) | |
684 | /IF HE HAD ANSWERED NO, "DIRECT?" WOULD BE TYPED OUT. | |
685 | /IF THE DRIVE WAS WRONG, HE WOULD TYPE RESTART. | |
686 | /IF HE HAD TYPED "MARK" IN RESPONSE TO "DIRECT?" THE | |
687 | /TAPE WOULD BE MARKED WITH THE STANDARD PDP-8 CONFIGURATION. | |
688 | /IF HE HAD TYPED "MARK 384" THE TAPE WOULD | |
689 | /BE MARKED WITH THE STANDARD PDP-10 CONFIGURATION | |
690 | /NOTE: THE WORD AND BLOCK NUMBERS ARE TYPED IN OCTAL | |
691 | /IF A MISTAKE OCCURS ON THE OPERATORS PART (WITH REFERANCE | |
692 | /TO BLOCK + WORD SIZE) HE WILL BE TOLD ABOUT IT | |
693 | ||
694 | ||
695 | ||
696 | ||
697 | ||
698 | \f *1000 | |
699 | ||
700 | /MAKE A CALL FOR THE DECTAPE NUMBERS TO BE | |
701 | /WORKED. | |
702 | ||
703 | ||
704 | START0, JMS I TYPE /PRINT TITLE | |
705 | 4543 | |
706 | 4300 | |
707 | JMS I TYPE | |
708 | TEXT /DTFRMT V4A/ | |
709 | ||
710 | ||
711 | START, JMS I TYPE /SET UP TYPER | |
712 | 4543 /CR+LF | |
713 | 4300 /LF+END | |
714 | TYQU, JMS I TYPE /"DTA?" | |
715 | 0424 /DT | |
716 | 0177 /A? | |
717 | 4000 / END | |
718 | ||
719 | /WAIT FOR A REPLY | |
720 | ||
721 | JMS I TYPIN /GET NUMBERS | |
722 | TAD BADD /INITIALIZE POINTER (BFR) | |
723 | IAC /(BADD=BUFFER-1, SO BUMP THE AC) | |
724 | DCA BFR /TO START OF INPUT BUFFER | |
725 | DCA DCTR /INITIALIZE DTA COUNTER TO 0 | |
726 | DCA CRFLAG /CLEAR FLAG SO CR NOT ACCEPTIBLE | |
727 | CRCHK, TAD CRCOD /GET CODE FOR CAR. RETN | |
728 | CIA /NEGATE IT | |
729 | TAD I BFR /SEE IF NEXT CHAR. IN | |
730 | SNA /BUFFER IS CAR. RETN. | |
731 | JMP OKCR /YES: SEE IF C.R. LEGAL HERE | |
732 | DCA CRFLAG /NO: SO C.R. IS LEGAL NOW | |
733 | VALCHK, TAD C261 /SEE IF # IS LESS THAN | |
734 | CIA /ASCII 1 (261) | |
735 | TAD I BFR /SUBTRACT BUFFER DATA | |
736 | SPA CLA /IS IT LESS THAN ASII 0? | |
737 | JMP TYQU /YES: TELL OUTSIDE WORLD | |
738 | TAD C270 /NO: SEE IF GREATER THAN | |
739 | CMA /ASC II 8 (270) | |
740 | TAD I BFR /SUBTRACT BUFFER DATA | |
741 | SMA CLA /GREATER THAN ASCII 7? | |
742 | JMP TYQU /YES: TELL OUTSIDE WORLD | |
743 | TAD I BFR /NO: ACCEPT BUFFER | |
744 | RTR | |
745 | RTR /4 BITS RIGHT | |
746 | AND C7000 /ISOLATE DTA | |
747 | JMS REPEAT /GO CHECK FOR REPEATED DTA AND STORE # | |
748 | ISZ BFR /INCREMENT INPUT BUF. PTR. | |
749 | JMP CRCHK /GO LOOK AT NEXT CHAR. | |
750 | ||
751 | /THIS SECTION CHECKS TO SEE IF THERE HAS BEEN ANY | |
752 | /VALID INPUT ONCE A CARRIAGE RETURN IS SEEN | |
753 | OKCR, CLA /CLEAR AC | |
754 | TAD CRFLAG /LOAD CR FLAG; 0 MEANS NO GOOD | |
755 | SNA CLA | |
756 | JMP START /0: NO VALID INPUT; RESTART | |
757 | TAD DCTR /NOT 0: SO HAVE VALID INPUT | |
758 | TAD DBUFAD /CALCULATE END OF DTA LIST +1 | |
759 | DCA DBUFPT /STORE IT IN BUFFER POINTER, THEN | |
760 | CMA /COMPLEMENT THE AC AND | |
761 | DCA I DBUFPT /TERMINATE DTA LIST WITH 7777 | |
762 | INIT1, CLA /CLEAR AC IF COME THRU LOC IT | |
763 | TAD DBUFAD /AND RESET LIST POINTER | |
764 | DCA DBUFPT /TO START OF LIST | |
765 | JMS I GETDTA /GO GET A DTA NUMBER | |
766 | ||
767 | /INFORM THE OPERATOR THAT THE PROGRAM IS SET TO START | |
768 | /TYPE "DIRECT" AND WAIT FOR THE REPLY | |
769 | ||
770 | INIT, JMS I TYPE /MESSAGE OUT | |
771 | 0411 /DI | |
772 | 2205 /RE | |
773 | 0324 /CT | |
774 | 7740 /? | |
775 | 0000 /END | |
776 | JMS I TYPIN /WAIT FOR A REPLY | |
777 | JMS I COMPAR /DID HE TYPE "MARK"? | |
778 | 0315 /M | |
779 | 0301 /A | |
780 | 0322 /R | |
781 | 0313 /K | |
782 | 0000 /END | |
783 | JMP .+3 | |
784 | JMP I .+1 | |
785 | MARK /TO MARK A TAPE | |
786 | \f/SEE IF HE TYPED "RDR" (READ AND TYPE FIRST 12 | |
787 | /BLOCK NUMBERS IN REVERSE). | |
788 | ||
789 | JMS I COMPAR | |
790 | 0322 /R | |
791 | 0304 /D | |
792 | 0322 /R | |
793 | 0000 /0 | |
794 | JMP .+3 | |
795 | JMP I .+1 | |
796 | RDR /TYPE BLOCKS | |
797 | ||
798 | /SEE IF HE TYPED "RDF" (READ AND TYPE FIRST 12 | |
799 | /BLOCK NUMBERS FORWARD). | |
800 | ||
801 | JMS I COMPAR | |
802 | 0322 /R | |
803 | 0304 /D | |
804 | 0306 /F | |
805 | 0000 /0 | |
806 | JMP .+3 | |
807 | JMP I .+1 | |
808 | RDFA /TYPE BLOCKS | |
809 | ||
810 | /SEE IF HE TYPED "SAME" (MEANING MARK A TAPE | |
811 | /USING THE SAME CONSTANTS AS BEFORE). | |
812 | ||
813 | JMS I COMPAR | |
814 | 0323 /S | |
815 | 0301 /A | |
816 | 0315 /M | |
817 | 0305 /E | |
818 | 0000 /0 | |
819 | JMP .+3 | |
820 | JMP I .+1 | |
821 | RSTSM /TO MARK AS BEFORE | |
822 | ||
823 | /SEE IF HE TYPED "RESTART" | |
824 | ||
825 | JMS I COMPAR | |
826 | 0322 /R | |
827 | 0305 /E | |
828 | 0323 /S | |
829 | 0324 /T | |
830 | 0301 /A | |
831 | 0322 /R | |
832 | 0324 /T | |
833 | 0000 /0 | |
834 | JMS QU /MUST BE NONSENSE | |
835 | JMP START /START ALL OVER | |
836 | GETDTA, NUDTA /POINTER TO ROUTINE TO SWITCH UNITS | |
837 | CRFLAG, 0 /=0, CR NO GOOD; NOT 0, CR IS OK | |
838 | \f/ | |
839 | \f *1200 | |
840 | /MARK WAS TYPED IN, IF W1-1 IS NOT A "K",ASSUME THAT | |
841 | /A NUMBER WAS TYPED IN, AND VERIFY THIS. IF W1-1 IS | |
842 | /A "K", ASSUME STANDARD FORMAT.(W1=LAST ENTRY INTO THE BUFFER) | |
843 | ||
844 | MARK, TAD BINCON /ADDRESS OF FIRST BINARY | |
845 | DCA W5 /CONSTANT FOR DEC TO BIN | |
846 | DCA TOTAL /WILL BE BINARY EQUIVILANT | |
847 | ||
848 | /SAVE C(X1) FOR DECREMENT THROUGH BUFFER | |
849 | ||
850 | DNC, CLA CMA /DECREMENT BUFFER ADDRESS | |
851 | TAD W1 /ADDRESS BY 1 | |
852 | DCA W1 /W1=SWEEP ADDRESS | |
853 | ||
854 | /LOOK FOR END OF PROCESSING BY LOOKING FOR A "K" IN BUFFER | |
855 | ||
856 | TAD LETK /LETTER ASCII "K" | |
857 | CIA /SUBTRACT FROM CHARACTER | |
858 | TAD I W1 /IN BUFFER | |
859 | SNA CLA /EQUAL? | |
860 | JMP DIV3 /YES: SEE IF DIVISIBLE BY 3 | |
861 | ||
862 | /VERIFY THIS CHARACTER AS BEING OF DECIMAL ORIGIN | |
863 | ||
864 | TAD C260 /ASCII FOR 0 | |
865 | CIA /TO SEE IF CHARACTER | |
866 | TAD I W1 /IS LESS THAN 260 | |
867 | SPA CLA /IS IT? | |
868 | JMP I QU1 /YES: NOT DECIMAL CHARACTER | |
869 | TAD C271 /ASCII FOR 9 | |
870 | CMA /TO SEE IF GREATER THAN | |
871 | TAD I W1 /9 | |
872 | SMA CLA /IS IT? | |
873 | JMP I QU1 /NOT A DECIMAL CHARACTER | |
874 | \f/CHARACTER IS DECIMAL. NOW CONVERT IT TO BINARY | |
875 | /REMEMBER POSITION OF CHARACTER IN BUFFER MAY BE | |
876 | /10,100,1000. | |
877 | ||
878 | TAD I W1 /ISOLATE THE NUMBER | |
879 | AND C0017 /FOR PROPER CONVERSION | |
880 | SNA /IF 0, NO BINARY CONVERSION NEEDED | |
881 | JMP IBS /YES: 0: INCREMENT BINARY CONVERSION | |
882 | ||
883 | /NOT 0, SET UP CONVERSION LOOP | |
884 | ||
885 | CLL CIA /NUMBER OF ADDITIONS | |
886 | DCA W4 /TO NEGATIVE FOR ISZ | |
887 | TAD I W5 /BINARY POSITION TO C(ACC) | |
888 | TAD TOTAL /ADD TO PRESENT TOTAL | |
889 | SZL /CHECK ON TO MANY WORDS | |
890 | JMP I QU2 /TO MANY WORDS CALLED FOR | |
891 | DCA TOTAL /KEEP RUNNING SUM | |
892 | ISZ W4 /LAST ADDITION? | |
893 | JMP .-6 /NO: ADD AGAIN | |
894 | ||
895 | /FINAL ADDITION FOR THIS POSITION COMPLETED | |
896 | ||
897 | IBS, ISZ W5 /NEXT POSITION | |
898 | JMP DNC /DO NEXT CHARACTER | |
899 | ||
900 | /LAST CHARACTER COMPLETED. SEE IF DIVISIBLE BY 3 | |
901 | /IF NOT A NORMAL INPUT | |
902 | ||
903 | DIV3, TAD TOTAL /GET TOTAL WORDS | |
904 | SNA /IF TOTAL 0, NORMAL INPUT | |
905 | TAD C201 /129 OCT. THIS TEST REDUNDANT | |
906 | TAD C0017 /ADD CONSTANT 15 TO TOTAL | |
907 | DCA TOTAL /FOR FUTURE CONSIDERATIONS | |
908 | DCA VAR1 /# OF WORDS/3 FOR MARK TRACK WRITING | |
909 | TAD TOTAL /RESTORE IN THE ACC | |
910 | CLL /TO DIVIDE BY 3, LINK KEEPS OVERFLOW | |
911 | TAD M3 /SUBTRACT 3 | |
912 | ISZ VAR1 /ON EACH DIVISION, KEEP RUNNING SUM | |
913 | SZA /IF AC = 0,NO REMAINDER | |
914 | SNL /WHEN LINC GOES TO 0, DIVISION ENDED | |
915 | SKP /NOW SEE IF IT DIVIDED EVENLY | |
916 | JMP .-6 /SUBTRACT 3 MORE | |
917 | SZA CLA /IF 0,OK. OTHERWISE ERROR | |
918 | JMP I QU4 /NOT DIVISIBLE BY 3 | |
919 | ||
920 | /CORRECT "VAR1" ( THE NUMBER OF WORDS/3) FOR THE +15 | |
921 | /ADDED JUST ABOVE AND AN INHERANT +2 DUE TO MARK TRACK | |
922 | /CONFIGURATION TO BE WRITTEN. | |
923 | ||
924 | TAD M7 /SUBTRACT 7 FROM PHONY SETUP | |
925 | TAD VAR1 /GIVING THE NUMBER OF TIMES | |
926 | CIA /TO BE USED LATER IN A ISZ | |
927 | DCA VAR1 /DATA MARK WILL BE WRITTEN | |
928 | \f | |
929 | /COMPUTE A VALUE FOR TOTAL NUMBER OF BLOCKS | |
930 | /RECORD SIZE + 15 INTO 636160 OCT. | |
931 | ||
932 | TAD C7714 /EXTENDED 64 VALUE. SETS AC#2 | |
933 | DCA W1 /SET FOR 640000 | |
934 | JMS I FORM10 /PATCH TO CHECK FOR STD.10 FORMAT | |
935 | TAD C1620 /VERNIER ADJUSTMENT FOR FORMULA | |
936 | CLL /ACC#2 CARRY FUNCTION | |
937 | TAD TOTAL /WORD COUNT | |
938 | ISZ BLOCKS /+1 TO BLOCK COUNT | |
939 | SKP | |
940 | JMP I QU3 /TO MANY BLOCKS CALLED FOR | |
941 | SNL /CARRY INTO ACC#2? | |
942 | JMP .-5 /NO: CONTINUE COUNT | |
943 | ISZ W1 /YES: FULLY DIVIDED? | |
944 | JMP .-10 /NO: CONTINUE PROCESS | |
945 | CLA CLL /C(ACC)+ C(L)=0 | |
946 | F10RTN, TAD BLOCKS /FOR MARK TRACK (COME HERE FR F10PAT IF 10 FRMT) | |
947 | CMA /WRITING | |
948 | DCA VAR2 /SEE MARK WRITE | |
949 | ||
950 | /VALUES FOR BLOCK AND RECORD SIZE HAVE BEEN | |
951 | /COMPUTED. TELL OUTSIDE WORLD AND GET THE OK. | |
952 | ||
953 | TAD TOTAL /SUBTRACT 15 FROM TOTAL | |
954 | TAD C7761 /WORDS FOOLING OPERATOR | |
955 | DCA TOTAL /CORRECTED FOR TAPE WRITING | |
956 | TAD TOTAL /FOR OCTAL TYPEOUT | |
957 | JMS I TYOCT /TYPE OCTAL WORDS | |
958 | JMS I TYPE /TYPE MESSAGE | |
959 | 4027 / W | |
960 | 1722 /OR | |
961 | 0423 /DS | |
962 | 5400 /, END | |
963 | TAD BLOCKS /TYPE OUT BLOCK #S | |
964 | IAC /TO FOOL THE OPERATOR | |
965 | JMS I TYOCT /IN OCTAL | |
966 | JMS I TYPE /TYPE MESSAGES | |
967 | 4002 / B | |
968 | 1417 /LO | |
969 | 0313 /CK | |
970 | 2356 /S. | |
971 | 1713 /OK | |
972 | 7733 /?( | |
973 | 3105 /YE | |
974 | 2340 /S | |
975 | 1722 /OR | |
976 | 4016 / N | |
977 | 1735 /O) | |
978 | 4543 /CR+LF | |
979 | 0000 /END | |
980 | JMS I TYPIN /WAIT FOR REPLY | |
981 | \f/SEE IF A YES OR NO ANSWER WAS GIVEN | |
982 | ||
983 | JMS I COMPAR | |
984 | 0331 /Y | |
985 | 0305 /E | |
986 | 0323 /S | |
987 | 0000 /END | |
988 | JMP I IT | |
989 | ||
990 | /SEE IF THE DRIVE IS OK | |
991 | ||
992 | RSTSM, TAD DT0060 /GIVE WRTM, NO GO | |
993 | TAD DTA /AND DTA # | |
994 | DTCX /ORDER EXECUTE | |
995 | DCA W1 /STALL FUNCTION | |
996 | CDTRD, DTRB /READ STATUS "B" | |
997 | SMA CLA /ERROR? | |
998 | JMP CIZ /NO: TIME OUT STALL | |
999 | JMS I TYPE /YES: INCORRECT SETUP | |
1000 | 2305 /SE | |
1001 | 2425 /TU | |
1002 | 2077 /P | |
1003 | 0000 /END | |
1004 | JMP I .+1 | |
1005 | START | |
1006 | ||
1007 | /STALL FOR A WHILE FOR THE INTERRUPT | |
1008 | ||
1009 | CIZ, ISZ W1 /ONE ROUND'S WORTH | |
1010 | JMP CDTRD /OF ISZ | |
1011 | JMP I .+1 | |
1012 | STMK /OK, GO DO THE MARK TRACK | |
1013 | FORM10, F10PAT | |
1014 | ||
1015 | \f *1400 | |
1016 | /SET THE TAPE INTO MOTION. ALL VARIABLES ARE | |
1017 | /SET. FROM THIS POINT ON, CONTROL IS EXECUTED | |
1018 | /VIA THE WCO INTERRUPT | |
1019 | ||
1020 | /CLEAR OUT STATUS "A" AND RELOAD IT WITH CONTINUOUS | |
1021 | /WRITE TIMING AND MARK TRACK COMMAND | |
1022 | ||
1023 | STMK, TAD DT0360 /FWD, CONT, T+M,GO,INT | |
1024 | TAD DTA /ADD IN THE DTA | |
1025 | DTCX /CLEAR FLAGS START MOTION | |
1026 | DCA PHASE /FOR ERROR ROUTINE | |
1027 | TAD VAR2 /TO MAKE A RESTART FOR THE "SAME" | |
1028 | DCA W6 /OPTION POSSIBLE | |
1029 | ||
1030 | /WRITE END ZONE. WRITE ABOUT 10' OF THIS | |
1031 | /CONFIGURATION. 4044 | |
1032 | / 0440 ON TAPE AS | |
1033 | / 4404 (5555) OCTAL. | |
1034 | ||
1035 | DCA W1 /CLEAR COUNTER, 7777= ABOUT 10' | |
1036 | CEZ, TAD REZ /LOAD ADDRESS OF DATA | |
1037 | DCA I CA /TO BE WRITTEN INTO THE CA | |
1038 | TAD M3 /LOAD # WORDS TO BE WRITTEN INTO | |
1039 | DCA I WC /WC LOCATION | |
1040 | ||
1041 | /WAIT FOR INTERRUPT, TEST FOR END OF | |
1042 | /END ZONE WRITING. | |
1043 | ||
1044 | JMS I WAIT /FOR INTERRUPT | |
1045 | ISZ W1 /END OF FOOTAGE? | |
1046 | JMP CEZ /NOT END FOOTAGE, CONTINUE | |
1047 | /OK, WRITE INTERBLOCK SYNC | |
1048 | ||
1049 | /WRITE INTERBLOCK SYNC. SINCE THIS CONFIGURATION | |
1050 | /ACT AS A NOP TO THE TCU, AT THE BEGINING OF | |
1051 | /TAPE, MORE LENGTH OF THIS IS NEEDED FOR TURN AROUND | |
1052 | /TIME TO GUARANTEE BLOCK 0000 TO THE LIBRARY SYSTEM | |
1053 | /THEREFORE AT THE BEGINING OF TAPE ONLY, WRITE SEVERAL | |
1054 | /INTERBLOCK ZONES | |
1055 | ||
1056 | TAD M144 /NUMBER OF TIMES TO | |
1057 | DCA W1 /WRITE INTERBLOCK SYNC | |
1058 | JMS INBLSY /WRITE 1 INTERBLOCK SYNC | |
1059 | ISZ W1 /CONFIGURATION, TEST END | |
1060 | JMP .-2 /NOT TOTAL FOOTAGE. WRITE AGAIN | |
1061 | JMP WDZ /COMPLETED, GO ON | |
1062 | \f/AT NORMAL RETURN, WRITE ONLY ONE INTERBLOCK SYNC | |
1063 | /CONFIGURATION. APPEARS AS 0404 | |
1064 | / 0404 ON TAPE AS | |
1065 | / 0404 2525 OCTAL | |
1066 | ||
1067 | INBLSY, 0 | |
1068 | TAD IBZ /COUNTER AND WORD | |
1069 | DCA I CA /COUNT WITH KEYS | |
1070 | TAD M3 /FOR CONTROL | |
1071 | DCA I WC | |
1072 | TAD VAR1 /RESET THE WORDS | |
1073 | DCA W5 /PER BLOCK COUNTER | |
1074 | ||
1075 | /WAIT FOR INTERRUPT, RETURN TO SEQUENCE | |
1076 | ||
1077 | JMS I WAIT /FOR INTERRUPT | |
1078 | JMP I INBLSY | |
1079 | ||
1080 | ||
1081 | /WRITE FORWARD BLOCK MARK AND REVERSE GUARD | |
1082 | /THREE WORDS 0404 | |
1083 | / 4004 ON TAPE AS | |
1084 | / 4040 2632 OCTAL | |
1085 | ||
1086 | WDZ, TAD FBM /ADDRESS OF PATTERN | |
1087 | DCA I CA /TO CURRENT ADDRESS | |
1088 | TAD M3 /NUMBER OF WORDS | |
1089 | DCA I WC /TO WORD COUNTER | |
1090 | JMS I WAIT /DROP THROUGH AFTER WRITE | |
1091 | ||
1092 | ||
1093 | /WRITE LOCK MARK, REVERSE CKSUM, REVERSE FINAL,REV PREFINAL | |
1094 | /SIX WORDS 1. 0040 4. 0040 | |
1095 | / 2. 0000 5. 0000 ON TAPE OCTAL | |
1096 | / 3. 4000 6. 4000 10101010 | |
1097 | ||
1098 | TAD WLMRF /ADDRESS OF PATTERN | |
1099 | DCA I CA /TO CURRENT ADDRESS | |
1100 | TAD M6 /NUMBER OF WORDS | |
1101 | DCA I WC /TO WORD COUNTER | |
1102 | JMS I WAIT /DROP THROUGH AFTER WRITE | |
1103 | ||
1104 | ||
1105 | / WRITE THE DATA TRACK. SINCE THE LENGTH OF EACH | |
1106 | /RECORD IS A VARIABLE, "VAR1" KEEPS TRACK OF THE | |
1107 | /NUMBER OF TIMES THIS CONFIGURATION WILL BE WRITTEN | |
1108 | /"VAR1" WAS DECIDED FROM ABOVE IN THE FORMULA | |
1109 | /TRANSLATION SECTION | |
1110 | /THREE WORDS 4440 | |
1111 | / 0044 ON TAPE AS | |
1112 | / 4000 7070 OCTAL | |
1113 | DTRK, TAD DZ /LOAD ADDRESS OF THE DATA | |
1114 | DCA I CA /CONFIGURATION INTO CA | |
1115 | TAD M3 /LOAD # WORDS | |
1116 | DCA I WC /INTO WORD COUNT | |
1117 | \f/WRITE ONE SET TEST "VAR1" FOR LAST SET | |
1118 | ||
1119 | JMS I WAIT /ONE CONFIGURATION | |
1120 | ISZ W5 /LAST? | |
1121 | JMP DTRK /NOW WRITE DATA MARK TRACK AGAIN | |
1122 | ||
1123 | / MARK TRACK CODE FOR DATA IS COMPLETE. NOW WRITE | |
1124 | /PREFINAL, FINAL, CHECKSUM AND REVERSE CHECKSUM. | |
1125 | /SIX WORDS 1 4440 4 4440 | |
1126 | / 2 4444 5 4444 ON TAPE AS | |
1127 | / 3 4044 6 4044 73737373 OCTAL | |
1128 | ||
1129 | TAD FEZ /LOAD ADDRESS OF | |
1130 | DCA I CA /DATA CONFIGURATION INTO CA | |
1131 | TAD M6 /LOAD # WORDS | |
1132 | DCA I WC /INTO WORD COUNT | |
1133 | JMS I WAIT /TILL COMPLETED WRITE | |
1134 | ||
1135 | ||
1136 | ||
1137 | /WRITE GUARD, REVERSE BLOCK | |
1138 | /THREE WORDS 4040 | |
1139 | / 0440 ON TAPE AS | |
1140 | / 0404 5145 OCTAL | |
1141 | ||
1142 | TAD GRZ /DATA ADDRESS TO | |
1143 | DCA I CA /THE CA | |
1144 | TAD M3 /NUMBER OF WORDS | |
1145 | DCA I WC /TO WORD COUNT | |
1146 | JMS I WAIT /TILL COMPLETE | |
1147 | ||
1148 | ||
1149 | ||
1150 | /THIS COMPLETE SET OF DATA TRANSFERES | |
1151 | /COMPLETES ONE BLOCK ON TAPE. SINCE THE | |
1152 | /NUMBER OF BLOCKS IS VARIABLE, "VAR2" IS | |
1153 | /USED TO RECYCLE. "VAR2" WAS SET UP ABOVE IN | |
1154 | /THE FORMULA TRANSLATION SECTION | |
1155 | ||
1156 | JMS INBLSY /WRITE INTERBLOCK SYNC | |
1157 | ISZ W6 /TOTAL NUMBER OF BLOCKS | |
1158 | JMP WDZ /WRITTEN? NO: | |
1159 | ||
1160 | ||
1161 | \f/ALL DATA BLOCKS HAVE BEEN WRITTEN. | |
1162 | /NOW PROVIDE A BUFFER ZONE OF INTERBLOCK SYNC AT THE END | |
1163 | /OF TAPE AS AT THE START OF TAPE | |
1164 | ||
1165 | TAD M144 /ABOUT TWO BLOCKS(STANDARD) WORTH | |
1166 | DCA W1 /ABOUT 100 TIMES | |
1167 | JMS INBLSY /WRITE ONE PATTERN | |
1168 | ISZ W1 /AT END YET? | |
1169 | JMP .-2 /NO CONTINUE WRITING INTERBLOCK SYNC | |
1170 | ||
1171 | /COMPLETED BLOCK WRITING | |
1172 | /WRITE ANOTHER 10' OF END ZONE (FORWARD) | |
1173 | /BEFORE LOADING BLOCK NUMBERS. | |
1174 | /THREE WORDS 0400 | |
1175 | / 4004 ON TAPE AS | |
1176 | / 0040 2222 OCTAL | |
1177 | ||
1178 | DCA W1 /ISZ=10 FEET | |
1179 | WEZF, TAD EZM /LOAD ADDRESS OF DATA | |
1180 | DCA I CA /INTO CA | |
1181 | TAD M3 /NUMBER OF WORDS | |
1182 | DCA I WC /WORD COUNT | |
1183 | ||
1184 | /WRITE 1 SET, CHECK END OF 10'. | |
1185 | ||
1186 | JMS I WAIT /TILL COMPLETE | |
1187 | ISZ W1 /END OF FOOTAGE? | |
1188 | JMP WEZF /NO, CONTINUE WITH END ZONE | |
1189 | JMP I .+1 /GO AND START BLOCK NUMBER | |
1190 | MWTM /SEQUENCING | |
1191 | \f/THESE ARE THE DATA CONFIGURATIONS FOR THE MARK TRACK | |
1192 | ||
1193 | ||
1194 | /REVERSE END ZONE | |
1195 | ||
1196 | REZ, . | |
1197 | 4044 /ON TAPE AS 5555 (OCT) | |
1198 | 0440 | |
1199 | 4404 | |
1200 | ||
1201 | /INTERBLOCK SYNC | |
1202 | ||
1203 | IBZ, . | |
1204 | 0404 /ON TAPE AS 2525 (OCT) | |
1205 | 0404 | |
1206 | 0404 | |
1207 | ||
1208 | /FORWARD BLOCK MARK AND REVERSE GUARD | |
1209 | ||
1210 | FBM, . | |
1211 | 0404 /ON TAPE AS 2632 (OCT) | |
1212 | 4004 | |
1213 | 4040 | |
1214 | ||
1215 | /LOCK MARK, REVERSE CHECKSUM, REVERSE FINAL | |
1216 | /AND REVERSE PREFINAL | |
1217 | ||
1218 | WLMRF, . | |
1219 | 0040 /ON TAPE AS 10101010 (OCT) | |
1220 | 0000 | |
1221 | 4000 | |
1222 | 0040 | |
1223 | 0000 | |
1224 | 4000 | |
1225 | ||
1226 | /DATA MARK | |
1227 | ||
1228 | DZ, . | |
1229 | 4440 /ON TAPE AS 7070 (OCT) | |
1230 | 0044 | |
1231 | 4000 | |
1232 | ||
1233 | /PREFINAL, FINAL, FWD CHECKSUM, AND REVERSE LOCK | |
1234 | ||
1235 | FEZ, . | |
1236 | 4440 /ON TAPE AS 73737373 (OCT) | |
1237 | 4444 | |
1238 | 4044 | |
1239 | 4440 | |
1240 | 4444 | |
1241 | 4044 | |
1242 | \f/FORWARD GUARD AND REVERSE BLOCK NUMBER | |
1243 | ||
1244 | GRZ, . | |
1245 | 4040 /ON TAPE AS 5145 (OCT) | |
1246 | 0440 | |
1247 | 0404 | |
1248 | ||
1249 | /FORWARD END ZONE | |
1250 | ||
1251 | EZM, . | |
1252 | 0400 /ON TAPE AS 2222 (OCT) | |
1253 | 4004 | |
1254 | 0040 | |
1255 | /SUBROUTINE TO SEE IF USER TYPED MARK 384 | |
1256 | /TO SPECIFY STANDARD PDP-10 FORMAT | |
1257 | F10PAT, 0 | |
1258 | DCA BLOCKS /CLEAR LOC. BLOCKS IN CASE NOT 10-FORMAT | |
1259 | TAD TOTAL /AND GET NUMBER TYPED BY USER | |
1260 | TAD M617 /WAS IT 384? | |
1261 | SZA CLA | |
1262 | JMP I F10PAT /NO-RETURN | |
1263 | DCA W1 /YES-CLEAR W1 FOR WAIT LOOP | |
1264 | TAD C1101 /AND ADJUST BLOCK TOTAL FOR | |
1265 | DCA BLOCKS /1102(OCTAL) BLOCKS. | |
1266 | JMP I .+1 | |
1267 | F10BAK, F10RTN | |
1268 | M617, -617 | |
1269 | C1101, 1101 | |
1270 | \f | |
1271 | *1600 | |
1272 | /THE MARK TRACK HAS BEEN WRITTEN, AND TAPE IS | |
1273 | /MOVING FORWARD IN THE FORWARD END ZONE. STOP | |
1274 | /THE TAPE AND SEE IF THERE ARE ANY TAPES LEFT TO | |
1275 | /MARK--IF SO GO DO THEM, ELSE TELL OPERATOR TO THROW THE | |
1276 | /"NORMAL/WRTM/RDTM" SWITCH TO "NORMAL" | |
1277 | /HE WILL THEN CONTINUE AFTER THIS ACTION | |
1278 | ||
1279 | /KILL WRITE, STOP TAPE | |
1280 | ||
1281 | MWTM, TAD DT0070 /STOP TAPE WITH SELECT ERROR | |
1282 | TAD DTA /LOAD DTA INTO ORDER | |
1283 | DTCX /EXECUTE THE ABOVE | |
1284 | JMS NUDTA /ANY MORE DTAS TO MARK? | |
1285 | JMP I DOMARK /YES: GO MARK THEM | |
1286 | ||
1287 | /MESSAGE TO OPERATOR | |
1288 | ||
1289 | JMS I TYPE /NO: BACK TO FIRST DTA AND CONTINUE | |
1290 | 2305 /SE | |
1291 | 2440 /T | |
1292 | 2327 /SW | |
1293 | 1124 /IT | |
1294 | 0310 /CH | |
1295 | 4024 / T | |
1296 | 1740 /O | |
1297 | 1617 /NO | |
1298 | 2215 /RM | |
1299 | 0114 /AL | |
1300 | 0000 /END | |
1301 | JMS I TYPIN /WAIT FOR CR | |
1302 | ||
1303 | /REVERSE TAPE FOR A FEW SECONDS TO GUARANTEE | |
1304 | /BLOCK MARK SECT WILL BE UNDER THE HEAD | |
1305 | ||
1306 | PSER, TAD DT0600 /REVERSE, MOVE, GO | |
1307 | TAD DTA /ADD DTA TO ORDER | |
1308 | DTCX /CLEAR TCU,GET MOVING IN REVERSE | |
1309 | ||
1310 | /STALL A FEW SECONDS | |
1311 | ||
1312 | TAD M300 /AROUND 2 SECONDS | |
1313 | DCA W2 /MAJOR STALL | |
1314 | MSTALL, ISZ W1 /MINOR STALL | |
1315 | JMP .-1 /LOOP MINOR | |
1316 | DTSF | |
1317 | SKP | |
1318 | JMP PSER | |
1319 | ISZ W2 /MAJOR STALL | |
1320 | JMP MSTALL /LOOP MAJOR | |
1321 | \f/TAPE OUT ON MARK TRACK NOW, TURN AND GET IT | |
1322 | /MOVING FORWARD. AT THIS POINT, THE LAST REVERSE | |
1323 | /BLOCK NUMBER WILL BE WRITTEN UNTILL END ZONE IS | |
1324 | /REACHED. THEREFORE, WHEN THE BOUNCE OUT OF THE END | |
1325 | /ZONE TAKES PLACE, THE SYSTEM WILL BE ABLE TO SYNC ON | |
1326 | /THE REVERSE BLOCK NUMBER TO WRITE THE REST OF | |
1327 | /THE BLOCK NUMBERS AND KNOWN GOOD DATA IN REVERSE. | |
1328 | /THIS PROCESS WILL ELIMINATE A NEEDLESS REWIND AND | |
1329 | /KEEP THE ENTIRE PROCESS TO TWO COMPLETE PASSES | |
1330 | ||
1331 | /WRITE LAST REVERSE BLOCK NUMBER GOING FORWARD | |
1332 | ||
1333 | TAD RZ | |
1334 | DCA I CA | |
1335 | TAD DT0210 /FORWARD, SEARCH, GO | |
1336 | TAD DTA /ADD IN THE DTA | |
1337 | DTCX /CLEAR STATUS "A" AND RELOAD IT | |
1338 | TAD C1 /PHASE 1 ERROR | |
1339 | DCA PHASE /FOR ERROR ROUTINE | |
1340 | ||
1341 | /WAIT HERE FOR DECTAPE FLAG. CHECK ALSO FOR ERRORS | |
1342 | /SET BLOCK NUMBER (REVERSE) INTO FORM | |
1343 | ||
1344 | TAD BLOCKS /INTO AC WITH LAST BLOCK NUMBER | |
1345 | JMS I MESS /CONVERT BLOCK NUMBER FOR TAPE | |
1346 | ||
1347 | /INTERRUPTED? ERROR? | |
1348 | ||
1349 | DTRB /READ STATUS "B" | |
1350 | RAR /DECTAPE FLAG TO LINK | |
1351 | SNL CLA /FLAG SET? | |
1352 | JMP .-3 /NO: CONTINUE WAIT | |
1353 | ||
1354 | /BLOCK FOUND. SWITCH TO READ DATA WITH WC ONE LESS THAN | |
1355 | /NUMBER OF WORDS TO BE READ. READ TILL WC=0 | |
1356 | ||
1357 | TAD DT0130 /TO SET STATUS "A" INTO | |
1358 | RCYBR, DTXA /THE READ DATA MODE | |
1359 | CLA CMA /SUBTRACT 1 FROM TOTAL | |
1360 | TAD TOTAL /GIVING TOTAL-1 (HO HO) | |
1361 | CMA /INVERT FOR ISZ | |
1362 | DCA I WC /SET WC | |
1363 | TAD C4 /NOP | |
1364 | DCA I CA /JIMMIED TO DO NOTHING | |
1365 | DTRB /READ "B" REGISTER | |
1366 | AND C1000 /ISOLATE END ZONE BIT | |
1367 | SZA CLA /END ZONE? | |
1368 | JMP I GDBLK /YES: GO AND WRITE THE BLOCK NUMBERS | |
1369 | TAD I WC /WAIT TILL WORD COUNT ZERO | |
1370 | SZA CLA /EQUAL TO ZERO? | |
1371 | JMP .-10 /NO: LOOP AGAIN | |
1372 | \f/END OF BLOCK FOUND. WRITE JUNK AND REVERSE BLOCK NUMBER | |
1373 | ||
1374 | TAD M14 /12 WORDS TO BE WRITTEN | |
1375 | DCA I WC /TO WORD COUNT REG. | |
1376 | TAD FORMB /FORM TO CA | |
1377 | DCA I CA /OF NUMBERING FORM | |
1378 | TAD DT0070 /SWITCH TO WRITE ALL | |
1379 | DTXA /MODE. | |
1380 | ||
1381 | /LOOK FOR THE DECTAPE FLAG INDICATING ANOTHER RECYCLE | |
1382 | ||
1383 | DTRB /NO: GET "B" AGAIN | |
1384 | RAR /FLAG TO LINK | |
1385 | SNL CLA /FLAG SET? | |
1386 | JMP .-3 /NO: BE PATIENT. HAST NOT. | |
1387 | TAD DT0070 /TO SWITCH TO READ DATA | |
1388 | JMP RCYBR | |
1389 | GDBLK, DOBLK | |
1390 | DOMARK, STMK /POINTER TO START OF MARK ROUTINE | |
1391 | ||
1392 | /SUBROUTINE TO GET NEXT DTA UNIT # FROM INPUT LIST OR | |
1393 | /RECYCLE TO FIRST UNIT IF ALL HAVE BEEN PROCESSED UP TO | |
1394 | /THIS POINT--CALL SEQUENCE | |
1395 | / JMS NUDTA /CALL THE ROUTINE | |
1396 | / (RETN1) /RETURNS HERE IF MORE DTAS TO PROCESS | |
1397 | / (RETN2) /RETURNS HERE IF END OF LIST | |
1398 | /END OF LIST MEANS RESET TO FIRST AND RETURN TO (RETN2) | |
1399 | /RETURN IS WITH DTA SET TO NEW VALUE AND AC=0 | |
1400 | ||
1401 | NUDTA, 0 | |
1402 | TAD I LSTPT /GET CURRENT VALUE OF DTA LIST PTR | |
1403 | DCA TBUFPT /STORE IT AS TEM. BUF. PTR. | |
1404 | TAD I TBUFPT /GET A DTA # FROM THE LIST | |
1405 | AND C0007 /ISOLATE LOW ORDER DIGIT | |
1406 | SZA CLA /IS IT 7777? | |
1407 | JMP LSTEND /YES: END OF LIST | |
1408 | TAD I TBUFPT /NO: GET IT BACK | |
1409 | DCA DTA /AND STORE AS NEW DTA # | |
1410 | ISZ I LSTPT /INCREMENT LIST POINTER | |
1411 | JMP I NUDTA /RETURN | |
1412 | /COMES HERE AT END OF LIST TO RESET PTRS AND RETN TO CALL+2 | |
1413 | LSTEND, ISZ NUDTA /INCREMENT RETURN POINTER | |
1414 | TAD I STRTPT /GET ADR. OF START OF LIST | |
1415 | DCA I LSTPT /STORE TO RE-INITIALIZE LIST PTR. | |
1416 | JMP NUDTA+1 /GO GET FIRST DTA # AND RETURN | |
1417 | ||
1418 | STRTPT, DBUFAD /POINTER TO START OF DTA LIST | |
1419 | TBUFPT, 0 /TEM. STORAGE FOR BUF. PTR. | |
1420 | LSTPT, DBUFPT /POINTER TO CURRENT VALUE OF DTA LIST PTR | |
1421 | DTABUF, 0 /START OF DTA # LIST - MAX. 9 WORDS | |
1422 | RZ, .+1 | |
1423 | 0 | |
1424 | /SUBROUTINE TO CHECK FOR REPEATED DTA NUMBERS | |
1425 | /DTA # TO COMPARE TO LIST IS IN AC ON ENTRY--THIS | |
1426 | /ROUTINE STORES THE DTA # IF IT IS NEW AND IGNORES IT | |
1427 | /IF IT IS NOT-CALL BY JMS REPEAT WITH DTA # IN AC | |
1428 | REPEAT, 0 | |
1429 | DCA DNUM /TEM STORAGE FOR NEW DTA # | |
1430 | TAD DBUFAD /INITIALIZE POINTER (DBUFPT) | |
1431 | DCA DBUFPT /TO START OF DTA LIST | |
1432 | TAD DCTR /LOAD NUM. OF DTAS STORED | |
1433 | CMA /COMPLEMENT IT | |
1434 | DCA COMCTR /STORE IN COMPARE COUNTER | |
1435 | COMCHK, ISZ COMCTR /DONE WITH ALL COMPARES? | |
1436 | JMP DOCOMP /NO: GO DO COMPARE | |
1437 | TAD DNUM /YES: STORE NEW DTA# | |
1438 | DCA I DBUFPT /AT END OF LIST | |
1439 | ISZ DCTR /INCR. # OF DTAS STORED | |
1440 | JMP I REPEAT /RETURN | |
1441 | ||
1442 | /THIS SECTION DOES THE ACTUAL COMPARISON BETWEEN | |
1443 | /THE DTA# PASSED TO THE ROUTINE AND A NUMBER ON THE LIST | |
1444 | ||
1445 | DOCOMP, TAD I DBUFPT /GET NEXT DTA NUMBER FROM LIST | |
1446 | CIA /NEGATE IT | |
1447 | TAD DNUM /ADD IN DTA NUMBER PASSED | |
1448 | SNA CLA /ARE THEY THE SAME? | |
1449 | JMP I REPEAT /YES: RETURN | |
1450 | ISZ DBUFPT /NO: INCREMENT LIST POINTER | |
1451 | JMP COMCHK /SEE IF DONE ALL COMPARES | |
1452 | / | |
1453 | / | |
1454 | COMCTR, 0 /COUNTER FOR # OF LIST COMPARISONS TO BE DONE | |
1455 | DCTR, 0 /COUNTER FOR # OF DTAS IN LIST | |
1456 | DBUFAD, DTABUF /START OF DTA NUM. LIST | |
1457 | DNUM, 0 /TEM STORAGE FOR DTA # | |
1458 | / | |
1459 | \f *2000 | |
1460 | /GO INTO SEARCH IN REVERSE MODE LOOKING FOR | |
1461 | /THE LAST BLOCK NUMBER. WHEN FOUND, SYNC THE SYSTEM | |
1462 | /AND WRITE ALL DATA AND BLOCK NUMBERS | |
1463 | ||
1464 | DOBLK, JMS I TURN /INTO REVERSE AND SEARCH MODE | |
1465 | TAD BLOCKS /TO SET UP | |
1466 | DCA BLOCKA /FOR BLOCK DECREMENTING | |
1467 | TAD C2 /PHASE 2 ERROR | |
1468 | DCA PHASE /FOR ERROR ROUTINE | |
1469 | ||
1470 | /LOOK FOR INTERRUPT INDICATING BLOCK NUMBER | |
1471 | ||
1472 | JMS I WAIT /FOR DECTAPE FLAG | |
1473 | ||
1474 | /SWITCH TO WRITE ALL. SYSTEM NOW IN SYNC | |
1475 | ||
1476 | TAD DT0140 /SWITCH TO WRITE ALL | |
1477 | DTXA /EXECUTE ORDER | |
1478 | NEXTBN, TAD ADF3 /ADDRESS OF FIRST 3 WORDS INCLUDING | |
1479 | DCA I CA /THE FORWARD CHECKSUM TO BE WRITTEN | |
1480 | TAD M3 /NUMBER OF WORDS TO BE WRITTEN | |
1481 | DCA I WC /TO WORD COUNT | |
1482 | JMS CEZN /CHECK FOR END ZONE | |
1483 | TAD I WC /CHECK FOR WC=0 | |
1484 | SZA CLA /=0? | |
1485 | JMP .-3 /NOPE: TRY AGAIN | |
1486 | DTXA /YUP: CLEAR THE FLAG | |
1487 | ||
1488 | /WRITE DATA TRACK. REMEMBER CORRECT DATA IS BEING WRITTEN | |
1489 | ||
1490 | TAD TOTAL /ONE FROM TOTAL NUMBER | |
1491 | CIA /OF WORDS FOR COUNTING | |
1492 | DCA I WC /DATA WORDS WRITTEN | |
1493 | TAD AD7777 /ADDRESS OF SEVENS | |
1494 | DCA I CA /DATA TO BE WRITTEN | |
1495 | ||
1496 | /MONITOR WORD COUNT FOR A ZERO READING | |
1497 | /SOME OF THIS TIME IS USED TO SET THE NEXT | |
1498 | /BLOCK NUMBER INTO THE FORM. | |
1499 | ||
1500 | TAD BLOCKA /CURRENT BLOCK NUMBER | |
1501 | JMS I MESS /CONVERT INTO FORM | |
1502 | CLA CMA /TO DECREMENT | |
1503 | TAD BLOCKA /THE BLOCK COUNT | |
1504 | DCA BLOCKA /DOWN TO ZERO | |
1505 | JMP CEZB /BYPASS FOLLOWING ROUTINE | |
1506 | ||
1507 | /CHECK FOR END ZONE | |
1508 | CEZN, 0 | |
1509 | DTRB /READ STATUS "B" | |
1510 | AND C1000 /ISOLATE END ZONE | |
1511 | SNA CLA /HAVE IT? | |
1512 | JMP I CEZN /NOT EZ, RETURN | |
1513 | JMP I GDBN /COMPLETED | |
1514 | \f/CHECK HERE ALSO TO SEE IF END ZONE, INDICATING | |
1515 | /THAT THE LAST BLOCK HAS BEEN WRITTEN | |
1516 | ||
1517 | CEZB, JMS CEZN /END ZONE? | |
1518 | ||
1519 | /LOOK FOR WORD COUNT AS BEING EQUAL TO ZERO | |
1520 | ||
1521 | TAD I WC /WC TO C(AC) | |
1522 | SNA CLA /END OF DATA WRITE? | |
1523 | JMP WBN /YES: GO TO WRITE BLOCK NUMBER | |
1524 | TAD AD7777 /RESET CURRENT ADDRESS COUNT | |
1525 | DCA I CA /DON'T LET THE CA ADVANCE TO | |
1526 | JMP CEZB /MUCH | |
1527 | ||
1528 | /DATA HAS BEEN WRITTEN. NOW WRITE REVERSE | |
1529 | /BLOCK NUMBER, FORWARD BLOCK NUMBER, AND REVERSE | |
1530 | /CHECKSUM. (12 WORDS) | |
1531 | ||
1532 | WBN, DTXA /CLEAR OUT DECTAPE FLAG | |
1533 | TAD M14 /WILL WRITE 12 WORDS | |
1534 | DCA I WC /FOR THIS BIT | |
1535 | TAD FORMA /FROM A FORM CONTAINING | |
1536 | DCA I CA /BLOCK NUMBERS | |
1537 | ||
1538 | /WAIT FOR END | |
1539 | ||
1540 | JMS CEZN /END ZONE? | |
1541 | TAD I WC /NO: SEE IF DONE THE WRITE | |
1542 | SZA CLA /DONE YET ? | |
1543 | JMP .-3 /NO: PATIENCE IS A VIRTUE???? | |
1544 | DTXA /RESET THE CURRENT FLAG | |
1545 | JMP NEXTBN /YES: GO RECYCLE COMPLETLY | |
1546 | GDBN, DBN | |
1547 | ||
1548 | / FIRST 3 WORDS TO BE WRITTEN | |
1549 | ||
1550 | ADF3, . | |
1551 | 0000 | |
1552 | 0000 | |
1553 | 0077 | |
1554 | ||
1555 | /DATA TO BE WRITTEN ON TAPE (REVERSE) | |
1556 | ||
1557 | AD7777, . | |
1558 | 7777 | |
1559 | 7777 | |
1560 | 7777 | |
1561 | 7777 | |
1562 | /CHECK IF ALL DTAS ARE DONE BEFORE RESTARTING | |
1563 | ||
1564 | SETDTA, JMS I GDTA /ALL DTAS DONE? | |
1565 | JMP I CONTNU /NO: BACK TO WRITE BLOCK #S ON NEXT | |
1566 | JMP I IT /YES: GO ASK "DIRECT?" | |
1567 | GDTA, NUDTA /POINTER TO SUBR FOR GETTING NEXT UNIT # | |
1568 | CONTNU, PSER /POINTER TO START OF BLOCK # WRITE ROUTINE | |
1569 | \f | |
1570 | ||
1571 | /TYPE ONE FOUR CHARACTER OCTAL WORD GIVEN TO THE | |
1572 | /ROUTINE VIA C(ACC). C(ACC)=0 ON EXIT | |
1573 | ||
1574 | TYCT, 0 | |
1575 | DCA TW1 /STORE WORD GIVEN | |
1576 | TAD TW1 /TO C(ACC) AGAIN | |
1577 | RTR | |
1578 | RTR /6 BITS GIGHT | |
1579 | RTR | |
1580 | DCA TYCT1+2 /SAVE ROTATED VALUE, 1ST TWO | |
1581 | TAD TYCT1+2 /TO C(ACC) AGAIN | |
1582 | AND C0007 /ISOLATE SECOND CHARACTER | |
1583 | TAD C6060 /CONVERT TO ASCII | |
1584 | DCA TYCT1+1 /STORE AS FIRST PARTIAL 2 | |
1585 | TAD TYCT1+2 /ROTATED VALUE STORED ABOVE | |
1586 | RTL | |
1587 | RAL /3 BITS LEFT | |
1588 | AND C0700 /ISOLATE FIRST CHARACTER | |
1589 | TAD TYCT1+1 /CONVERT 1ST TO ASCII | |
1590 | DCA TYCT1+1 /1ST AND 2ND CHARACTERS READY | |
1591 | TAD TW1 /ORIGIONAL WORD | |
1592 | AND C0007 /ISOLATE 4TH CHARACTER | |
1593 | TAD C6060 /CONVERT 4 TH TO ASCII | |
1594 | DCA TYCT1+2 /STORE 4TH FOR A MOMENT | |
1595 | TAD TW1 /ORIGIONAL WORD | |
1596 | RTL | |
1597 | RAL /POSITION IT 3RD CHARACTER | |
1598 | AND C0700 /ISOLATE 3RD CHARACTER | |
1599 | TAD TYCT1+2 /CONVERT TO ASCII | |
1600 | DCA TYCT1+2 /CONVERSION COMPLETE | |
1601 | TYCT1, JMS I TYPE /TYPE THE FOUR CHARACTERS | |
1602 | 0 /FIRST 2 | |
1603 | 0 /SECOND 2 | |
1604 | 0 /KILL KEY | |
1605 | JMP I TYCT /EXIT FROM ROUTINE | |
1606 | ||
1607 | /SOME CONSTANTS FOR THE ROUTINE | |
1608 | ||
1609 | TW1, 0000 | |
1610 | C6060, 6060 | |
1611 | \f *2200 | |
1612 | /VERIFY THE TAPE AS BEING WRITTEN CORRECTLY | |
1613 | /WITH DATA AND BLOCK NUMBERS. THE INFORMATION WRITTEN | |
1614 | /WAS WRITTEN IN SUCH A WAY AS TO BE CORRECT | |
1615 | /UPON READING IT BACK | |
1616 | ||
1617 | ||
1618 | /TURN TAPE AND HAVE IT GOING FORWARD | |
1619 | ||
1620 | DBN, TAD ISZV /RESET INCREMENT | |
1621 | DCA VISZ /BLOCK NUMBERS FORWARD | |
1622 | DCA FCON /WILL BE ZEROS FORWARD | |
1623 | DCA W1 /FIRST BLOCK NUMBER FORWARD | |
1624 | TAD C0400 /TURN TO GO FORWARD | |
1625 | DBNAUX, JMS I TURN | |
1626 | TAD C3 /ERROR IN PHASE 3 | |
1627 | DCA PHASE /FOR ERROR ROUTINE | |
1628 | ||
1629 | /SET SOME OF THE CONTROL REGS | |
1630 | ||
1631 | DAB, DCA I WC /WORD COUNT DON'T CARE | |
1632 | TAD ADBA /SOME WHERE UP ABOVE | |
1633 | DCA I CA /TO GET BLOCK NUMBERS | |
1634 | ||
1635 | /WAIT FOR INTERRUPT | |
1636 | ||
1637 | JMS I WAIT /INTERRUPT | |
1638 | TAD W1 /FIRST OR NEXT BLOCK NUMBER | |
1639 | CIA /TO COMPARE | |
1640 | TAD I ADBA /GET THE BLOCK NUMBER | |
1641 | SZA CLA /COMPARE OK? | |
1642 | JMP BLKERZ /BLOCK ERROR FOUND | |
1643 | ||
1644 | /BLOCK COMPARES, NOW CHECK DATA | |
1645 | ||
1646 | TAD DT0030 /TO SWITCH INTO READ | |
1647 | DTXA /DATA MODE | |
1648 | DCA I WC /DON'T CARE ABOUT THE WC | |
1649 | CTST, TAD ADWA /FOR COMPARING | |
1650 | DCA I CA /FROM TAPE | |
1651 | ||
1652 | /EVERY TIME THE WORD COUNT MOVES | |
1653 | /A DATA TRANSFERE HAS BEEN COMPLETED. | |
1654 | /MAKE SURE THAT THE INFORMATION IS OK | |
1655 | ||
1656 | TAD I WC /GET WORD COUNT | |
1657 | SNA CLA /STILL AT ZERO? | |
1658 | JMP CEFR /YES: SEE IF AT END | |
1659 | TAD FCON /NO: SEE IF DATA | |
1660 | CIA /IS SAME AS WRITTEN | |
1661 | TAD I ADWAB /RECEIVED DATA | |
1662 | SZA CLA /SAME? | |
1663 | JMP DTAR /DATA ERROR FOUND | |
1664 | DCA I WC /YES: RESET WORD COUNT | |
1665 | \f/CHECK FOR DECTAPE FLAG INDICATING END OF | |
1666 | /BLOCK OR ERROR | |
1667 | ||
1668 | CEFR, DTRB /READ "B" REGISTER | |
1669 | SPA /ERROR? | |
1670 | JMP PARIR /PARITY ERROR, I GUESS | |
1671 | ||
1672 | /NO ERROR, END OF BLOCK? | |
1673 | ||
1674 | RAR /FLAG TO THE LINK | |
1675 | SNL CLA /END? | |
1676 | JMP CTST /NO: CONTINUE CHECKING | |
1677 | TAD DT0030 /CLEAR DECTAPE FLAG | |
1678 | DTXA /AND RETURN TO SEARCH | |
1679 | ||
1680 | /END OF BLOCK. SEE IF END OF TAPE | |
1681 | ||
1682 | TAD W1 /BLOCK NUMBER JUST TESTED | |
1683 | VISZ, ISZ W1 /+1 OR -1 TO BLOCK COUNT | |
1684 | SKP | |
1685 | HLT /ABSOLUTE PANIC | |
1686 | CIA /TO BE COMPARED WITH | |
1687 | TAD BLOCKS /TOTAL BLOCKS | |
1688 | SZA CLA /LAST? | |
1689 | JMP DAB /NO, DO ANOTHER BLOCK | |
1690 | ||
1691 | ||
1692 | /HERE PUT IN THE REVERSE CHECK | |
1693 | ||
1694 | DDSF, DTSF /WAIT FOR ANY FLAG TO APPEAR | |
1695 | JMP .-1 /NOT YET | |
1696 | CLA CLL /RID AC OF GARBAGE | |
1697 | DTRB /READ THE "B" REGISTER | |
1698 | AND C1000 /BETTER BE END ZONE | |
1699 | SNA CLA /IS IT? | |
1700 | JMP LNE /LAST INTERRUPT NOT END ZONE | |
1701 | DTCX /YUP: A OK | |
1702 | \f/BLOCK NUMBERS AND DATA HAVE BEEN CHECKED FORWARD | |
1703 | /AND ARE OK. USING THE ABOVE ROUTINE FOR CHECKING | |
1704 | /RESET A FEW THINGS AND CHECK IN REVERSE | |
1705 | ||
1706 | /WAS COMPLETION FOUND FORWARD? IF SO GO CHECK | |
1707 | /IN REVERSE; IF NOT GO SEE IF ALL TAPES HAVE BEEN CHECKED. | |
1708 | ||
1709 | ||
1710 | TAD FCON /IF 0'S, IT WAS FWD | |
1711 | SZA CLA /FWD? | |
1712 | JMP I FINCHK /N0: REVERSE-SEE IF ALL DTAS DONE | |
1713 | ||
1714 | /RESET THE ABOVE ROUTINE TO READ IN REVERSE | |
1715 | ||
1716 | CMA /DATA WILL BE AS WRITTEN | |
1717 | DCA FCON /I.E., 7777'S | |
1718 | TAD SJMP /INSTEAD OF INCREMENTING | |
1719 | DCA VISZ /WE WILL DECREMENT BLOCK NUMBERS | |
1720 | TAD BLOCKS /STARTING WITH THE HIGHEST | |
1721 | DCA W1 /AND WILL WORK TO ZERO | |
1722 | JMP DBNAUX /ALL SET, TRAVEL ONWARD | |
1723 | ||
1724 | /RETURN HERE AFTER EACH BLOCK FOR CHECKING WHEN LAST BLOCK | |
1725 | /HAS BEN PROCESSED???????????? | |
1726 | ||
1727 | SJMP, JMP .+1 | |
1728 | SNA /IF AC = 0, WE ARE DONE | |
1729 | JMP DDSF /AND NEXT FLAG SHOULD BE END ZONE | |
1730 | CIA /OTHERWISE, SUBTRACT ONE FROM | |
1731 | CMA /BLOCKS GIVING BLOCKS-1......? | |
1732 | DCA W1 /NOT DONE | |
1733 | JMP DAB /GO DO ANOTHER BLOCK | |
1734 | ||
1735 | ISZV, ISZ W1 /VARIABLE TAG | |
1736 | FINCHK, SETDTA | |
1737 | \f/BLOCK ERROR FOUND | |
1738 | ||
1739 | BLKERZ, TAD DTA /TO RESET TAPE | |
1740 | DTCX /MOTION | |
1741 | TAD I ADBA /GET BAD BLOCK NUMBER | |
1742 | JMS I TYOCT /AND TYPE IT OUT | |
1743 | JMS TYSB /TYPE "SHOULD BE" | |
1744 | TAD W1 /GOOD BLOCK NUMBER | |
1745 | JMS I TYOCT /TYPE IT OUT | |
1746 | JMS I TYPE | |
1747 | 4002 / B | |
1748 | 1413 /LK | |
1749 | 4005 / E | |
1750 | 2243 /R CR | |
1751 | 4500 /LF+END | |
1752 | DBERZ, JMP I .+1 | |
1753 | ZCOM | |
1754 | ||
1755 | /COMMON ROUTINE | |
1756 | ||
1757 | TYSB, 0 | |
1758 | JMS I TYPE | |
1759 | 4023 / S | |
1760 | 1017 /HO | |
1761 | 2514 /UL | |
1762 | 0440 /D | |
1763 | 0205 /BE | |
1764 | 4000 / 0 | |
1765 | JMP I TYSB | |
1766 | ||
1767 | /DATA ERROR | |
1768 | ||
1769 | DTAR, TAD DTA /TO STOP TAPE | |
1770 | DTCX /MOTION | |
1771 | TAD I ADWA /GET THE BAD WORD | |
1772 | JMS I TYOCT | |
1773 | JMS TYSB /TYPE "SHOULD BE" | |
1774 | TAD FCON /GOOD WORD | |
1775 | JMS I TYOCT /TYPE IT OUT | |
1776 | JMS I TYPE | |
1777 | 4004 /D | |
1778 | 0124 /AT | |
1779 | 0140 /A | |
1780 | 0522 /ER | |
1781 | 4543 /CR+LF | |
1782 | 0000 /END | |
1783 | JMP DBERZ | |
1784 | \f/PARITY ERROR FOUND | |
1785 | ||
1786 | PARIR, JMP I .+1 | |
1787 | ERROR /MAIN ERROR ROUTINE | |
1788 | ||
1789 | /LAST INTERRUPT WAS NOT END ZONE | |
1790 | ||
1791 | LNE, JMS I TYPE | |
1792 | 1401 /LA | |
1793 | 2324 /ST | |
1794 | 4011 / I | |
1795 | 1624 /NT | |
1796 | 4016 / N | |
1797 | 1724 /OT | |
1798 | 4005 / E | |
1799 | 1724 /OT | |
1800 | 4345 /LF+CR | |
1801 | 0000 /END | |
1802 | JMP DBERZ | |
1803 | \f *2400 | |
1804 | / TYPE OUT THE DTA UNIT NUMBER AND THE FIRST 12 BLOCK | |
1805 | /NUMBERS IN EITHER DIRECTION. IF RDR, IN REVERSE | |
1806 | /IF RDF, TYPE THEM OUT GOING IN THE FORWARD | |
1807 | /DIRECTION FROM THE BEGINING OF TAPE | |
1808 | ||
1809 | RDFA, TAD C0400 /DIRECTION FOR TURNING | |
1810 | DCA SAVEIT /STORE DIRECTION FOR NEXT DTA UNIT | |
1811 | TAD SAVEIT /GET DIRECTION FOR TURNING | |
1812 | JMS I TURN /AROUND | |
1813 | TAD M14 /READ 12 BLOCK | |
1814 | DCA W3 /COUNTER | |
1815 | TAD BADD /ADDRESS OF BUFFER | |
1816 | DCA X2 /TO AUTO INDEX 2 | |
1817 | TAD ADW3 /ADDRESS OF W2 | |
1818 | DCA I CA /FOR DATA XFER | |
1819 | JMS I WAIT /FOR BLOCK INTERRUPT | |
1820 | TAD W2 /BLOCK NUMBER | |
1821 | DCA I X2 /STORE BLOCK NUMBER | |
1822 | ISZ W3 /TOTAL = 12? | |
1823 | JMP .-4 /NO: GRAB NEXT | |
1824 | TAD DTA /KILL TAPE MOTION | |
1825 | DTCX /HERE | |
1826 | ||
1827 | /TYPE OUT BLOCK NUMBERS AND DTA UNIT # | |
1828 | ||
1829 | JMS I TYPE /TYPE "DTA" | |
1830 | 0424 /DT | |
1831 | 0140 /A | |
1832 | 0000 /END | |
1833 | TAD DTA /GET UNIT # | |
1834 | JMS I TYOCT /AND TYPE IT OUT | |
1835 | JMS I TYPE | |
1836 | 4345 /CR&LF | |
1837 | 0000 /END | |
1838 | TAD M14 /WILL TYPE ALL | |
1839 | DCA W1 /TWELVE WORDS | |
1840 | TAD BADD /ADDRESS OF BLOCK | |
1841 | DCA X2 /NUMBERS TO INDEX 2 | |
1842 | TAD I X2 /FIRST OR NEXT BLOCK | |
1843 | JMS I TYOCT /TYPE IT OUT | |
1844 | JMS I TYPE /CR AND LINE FEED | |
1845 | 4345 /CR+LF | |
1846 | 0000 | |
1847 | ISZ W1 /COMPLETE? | |
1848 | JMP .-6 /NO | |
1849 | JMS I NEWDTA /YES: ANY MORE DTAS? | |
1850 | JMP RDFA+2 /YES: GO GET BLOCK #S | |
1851 | JMP I IT /NO: GO ASK FOR "DIRECT?" | |
1852 | RDR, JMP RDFA+1 /OTHER DIRECTION | |
1853 | ||
1854 | SAVEIT, 0 /TEM. STORAGE FOR DIRECTION | |
1855 | NEWDTA, NUDTA /POINTER TO SUBR. TO GET A NEW DTA UNIT # | |
1856 | \f | |
1857 | /INPUT BUFFER FOR THE TELETYPE. | |
1858 | /NOTE ,,,,,,,THIS MUST BE AT THE END OF THE PROGRAM | |
1859 | ||
1860 | BUFFER, 0000 | |
1861 | ||
1862 | $ | |
1863 | \f |