This repository has been archived by the owner on May 31, 2022. It is now read-only.
forked from PDP-6/JOSS-II
-
Notifications
You must be signed in to change notification settings - Fork 0
/
su.mac
5416 lines (4626 loc) · 115 KB
/
su.mac
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
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
TITLE JOSS SUPERVISOR 8/1/67 COPYRIGHT 1966 THE RAND CORP.
;PG 1.
; JOSS SUPERVISORY UNIT
; G. E. BRYAN
; THIS CODE PROVIDES FOR THE JOSS SYSTEM THOSE FUNCTIONS
; THAT ARE GENERALLY DESCRIBED BY THE TERMS EXECUTIVE, MONITOR,
; OR SYSTEM SUPERVISOR. IN PARTICULAR, THESE ROUTINES PRO-
; FOR HANDLING OF I/O INTERRUPTS (FROM DRUM, TAPE, CONSOLE
; TTY, AND CENTRAL PROCESSOR), RECOVERY FROM MACHINE
; ERROR, SCHEDULING OF PROCESSOR TIME AND CORE SPACE, MONITOR-
; ING OF USER AND SYSTEM PERFORMANCE, AND THE LOG-ON AND LOG-
; OFF PROCESSES.
; ASSEMBLED 8/1/67 FROM TAPE 56 (A SEQUENCED COPY OF 31)
; BINARIES ARE ON TAPE 24, CALLED SU.
PATCH: BLOCK 20
;PG. 2 - SUPERVISOR ASSEMBLY PARAMETERS
SUBTTL SUPERVISOR ASSEMBLY PARAMETERS
; SYSTEM PARAMETERS
N.PP1=20; LENGTH OF THE PUSH-POP LINKAGE LIST
N.S=^D40; ASSEMBLED NUMBER OF STATIONS
S.M=2; NUMBER OF 32 BIT GROUPS FOR SIGNAL TABLES
; (FP (N.S/32)=0:N.S/32;IP (N.S/32)+1)
N.SG=N.S; LENGTH OF THE SIGNAL TABLE
BUFSIZ=^D18; BUFFER SIZE
N.COR=^D16; # OF CORE BLOCKS AVAILABLE TO USERS
BBLOCK=^D16; BEGINNING USER BLOCK
DELTA=4
K2=N.S+DELTA; NUMBER OF BUFFERS ASSEMBLED
K1=^D60; THE NUMBER OF TICKS PER SECOND.
K3=^D15; DISPLAY INITIALS IF FP(MIN/K3)=0
SA=112
; ASSEMBLY PARAMETERS FOR THE PI CHANNELS
CDC=1; 1 - DATA CONTROL
CDRM=2; 2 - I/O PROCESSOR AND DRUM CHANNEL
CI630=3; 3 - 630 INPUT
CO630=4; 4 - 630 OUTPUT
CDAT=6; INTERRUPT CHANNEL FOR TAPE
CCTY=6; 6 - CONSOLE TELETYPE
CAPR=7; 7 - PROCESSOR INTERRUPTS
CHDC=100; THESE ARE CORRESPONDING DEFINITIONS FOR PI CONOS
CHDRM=40;
CH630=30
CHDAT=0
CHCTY=2
CHAPR=1
MTC=220; DEVICE CODES FOR MAG TAPE REGISTERS
MT1=224
MT2=230
DR=400
DP=010
DMT=20; DATA CONTROL DEVICE NUMBER FOR MAG TAPE
;PG.3 - SUPERVISOR ASSEMBLY PARAMETERS
, REGISTER ASSIGNMENTS
A=0
B=1
C=2
D=3
E=4
F=5
G=6
H=7
I=10
J=11
K=12; USED BY DISTRIBUTOR
L=13; USED BY DISTRIBUTOR
M=14; USED BY DISTRIBUTOR
N=15; USED BY DISTRIBUTOR
S=16; USED FOR STATION INDEX
PP=17; PUSH-POP REGISTER
;PG. 4 - ASSIGNMENTS FOR PSEUDO DATA SWITCHES
SUBTTL ASSIGNMENTS FOR PSEUDO DATA SWITCHES
, PSEUDO DATA SWITCHES (IN SWITCH)
, RIGHT HALF
SDS=200000; SHUTDOWN SWITCH
BEEPS=400000; BEEP SWITCH
OFFS=100000; BLAST OFF SWITCH
DCLOB=40000; DISC NOT AVAILABLE
HALTS=20000; HALT ON ERROR SWITCH
OLSW=100; HALT ON ERROR SWITCH
PRMES=40; ADMINISTRATIVE MESSAGE HAS PRIORITY
DSTAT=20; DISPLAY STATISTICAL DISTRIBUTIONS
DOAF=10; DISPLAY ONS AND OFFS
TPQ=4; DISABLE MAG TAPE OUTPUT
DUI=2; DISPLAY USERS INITIALS
DAM=1; DISPLAY ADMINISTRATIVE MESSAGE
; LEFT HALF
; RIGHT 6 BITS ARE STAT LINE NUMBER FOR DISPLAY
;PG. 5 - MACRO AND OPERATION DEFINITIONS
SUBTTL MACRO AND OPERATION SWITCHES
DEFINE FSW (N)
<MOVE A,SWITCH
>
DEFINE XMT (M,A); TRANSMIT M CHARACTERS FROM A
<OPDEF X[M'B12]
X A>
DEFINE ZBLOK (N)
<REPEAT N,
<Z
XLIST>
LIST>
DEFINE QCT(Q,C); MACRO TO COUNT QUEUES
<
HRRZ B,Q
TSX QCTR
MOVEM A,C>
OPDEF INS[10B8]
OPDEF CHS[20B8]
OPDEF SEND[30B8]
OPDEF HALT[40B8]
OPDEF TALLY[AOS 0]
OPDEF NOP[JFCL]
OPDEF DONE[POPJ PP,0]
OPDEF TSX[PUSHJ PP,0]
OPDEF CALL[PUSHJ PP,0]
;PG. 6 - INTERNS AND EXTERNS
SUBTTL INTERNS AND EXTERNS
EXTERN C20,C27,C28,T80,T80.99
EXTERN FILE,KEY,PROG
EXTERN DBUF
EXTERN DISC.D,ACTION,RESULT
EXTERN C30,C31,DISC.C,DISC.S
EXTERN SHUT
EXTERN INTENT,INTBEG,SEQ,RISIG,INITIALS,JOBNO
EXTERN PAGNO,ONTIME,COMTIM
EXTERN USIZE
EXTERN SPARE1,SPARE2,CONSOL
EXTERN SPARE3,SPARE4
EXTERN DDT,D.TIME,DUMP,DATIME,RJD,WJD
EXTERN INTENT; LOC. IN USER AREA TO START THE PROG.
EXTERN SWITCH,FAKE
EXTERN C32
INTERN DATE,HR,MIN,TIME
INTERN CTD,CTDR,CTDB
INTERN CT24,CT17,CT23,CT37
INTERN CT14,CT19,CT18
INTERN CT15,CT22
INTERN CT27A,CT27B,CT46,CT47
INTERN CT22A,CT18A,CT18B,TERASE,S.S,N.CB
INTERN YEAR,MONTH,DAY,SEC,CT22A
INTERN S.OK
INTERN N.SON,APRR,PROP
INTERN CT11,CT13,CT16,CT28,CT31
INTERN DRMR,S.QUE,CMESS,ADATE,OCTW
INTERN T8,KILL
INTERN S.BUF,COMEBACK,N.S,SIGTBL,SG.L,SG.M,SG.LIM
INTERN USERS,MONENT,T7.9
INTERN CORE,SECONDS,CTYR
INTERN HMES,PPW,TYPE6,SOUT,SIGPR
INTERN SSIG,RSIG,TSIG
INTERN T9,T10,T11,T11.1,T11.2,T11.3,T11.4,T11.5
INTERN T11.6,T11.7,T11.8,T11.9
;PG. 7 - SUPERVISOR STORAGE
SUBTTL SUPERVISOR STORAGE
; SYSTEM STORAGE
PPSAV: Z; MONITOR PUSH-POP REGISTER SAVE
CUI: Z; CURRENT USER # IN RIGHT HALF
TYPE6: XWD ^D9,6; CONTROL WORD FOR INITIALIZATION RECORD
DATE: ASCII $1/17/67 $
ATIM: ASCII $23:57$
YEAR: DEC 0
MONTH: DEC 1
DAY: DEC 17
HR: DEC 23
MIN: DEC 57
SEC: Z; SECONDS IN THIS MINUTE
TICK: Z; TICKS IN THIS SECOND
CL9: Z; REG C - PROCESSOR INTERRUPT ROUTINE
CL10: Z; REG D
CL11: Z; INDIRECT ADDRESS CHAIN COUNT
CL12: Z; LOCATION COUNTER
CL13: Z; COUNT OF INTERRUPTS AT SAME LOCATION
TIME: Z; CURRENT TIME IN TICKS. (16 2/3MS=1/60 SEC)
T.CU: Z; TIME USED BY CURRENT USER THIS SHOT.
SECONDS:Z; TICKS--CONTINUOUS COUNT FOR TIMER COMPUTATION
SIGTBL: REPEAT N.SG,; DISTRIBUTION-MONITOR SIGNAL LIST
<Z
XLIST>
;Z
;XLIST
SG.L: Z; CURRENT NUMBER OF ENTRIES IN SIGTBL
SG.M: DEC N.SG; MAX # ENTRIES IN SIGTBL
SG.LIM: DEC 5; SIGTBL ENTRIES BEFORE COMEBACK (EXCEPT CR)
PPW: XWD -N.PP1,PP1-1
PP1: REPEAT N.PP1,; PUSH-POP LINKAGE LIST
<Z
XLIST>
;Z
;XLIST
; STATE QUEUE ENTRY WORDS
S.Q: REPEAT N.S-1,
<XWD 0,.+1
XLIST>
;XWD 0,+.1
;XLIST
Z; LAST QUEUE ENTRY WORD
; PG. 8 - SUPERVISOR STORAGE
, STATION STATUS CELLS
S.S: REPEAT N.S,
<BYTE (6)OF.S,0,0,1,0,0
XLIST>
S.STA: POINT 6,S.S(S),5; CURRENT STATE (5 BITS)
S.TM: POINT 6,S.S(S),^D11; TIME IN SHOT (4 BITS)
S.COR: POINT 6,S.S(S),^D17; CORE LOCATION (5 BITS)
S.BLOCK:POINT 6,S.S(S),^D23; NUMBER OF BLOCKS (2 BITS)
S.OFR: POINT 1,S.S(S),^D24; OFF SIGNAL RECEIVED
S.INR: POINT 1,S.S(S),^D25; IN SIGNAL RECEIVED
S.DU: POINT 1,S.S(S),^D26; USING DISC
S.GK: POINT 1,S.S(S),^D27; SET WHEN USER IS GRONKED
S.SIG: POINT 1,S.S(S),^D28; SET WHEN WAITING FOR SIGNALS
, CORE MAP
CORE: ZBLOK N.COR; THE CORE MAP
N.CB: DEC 4; MAX # OF CORE BLOCKS PER USER
N.C: DEC N.COR; # OF ACTIVE CORE BLOCKS (HIGHEST # NOT TO USE)
S.IU: POINT 1,CORE(B),0; USE BIT FOR BLOCK
S.ID: POINT 1,CORE(B),0; IN USE BY DRUM
S.UD: POINT 2,CORE(B),1; BOTH ACTIVITY IN BITS
S.UR: POINT 6,CORE(B),^D8; USER NUMBER FOR THE BLOCK
, SYSTEM PARAMETERS
N.DRM: Z; NUMBER OF USERS ON DRUM
DBASE: OCT 20; BASE TRACK FOR USER BLOCKS
N.UC: DEC 1; START COMPUTING IF ONLY THIS MANY BUFFERS
N.CK: DEC 2; QUIT COMPUTING IF THIS MANY BUFFERS FILLED
N.SON: DEC 40; MAX # OF USERS BEFORE QUEUE MESSAGE
S.OK: OCT 47; IGNORE SIGNALS FROM HIGHER STATIONS
T.MAX: DEC 12; MAXIMUM SHOT TIME ... 200 MS.
;PG. 9 - ASSIGNMENTS FOR I/O BUFFERS
SUBTTL ASSIGNMENTS FOR I/O BUFFERS
DT.BUF:Z; HEADER FOR DIS AND TAPE I/O
CO.BUF: Z; HEADER FOR CONSOLE TTY OUTPUT
S.BUF: ZBLOK N.S; BUFFER HEADERS: RIGHT = FIRST; LEFT=LAST
N.BUF: DEC K2; NUMBER OF AVAILABLE BUFFERS.
L.BUF: XWD LASTB,BUF; HEAD OF AVAILABLE BUFFER LIST
, THE I/O BUFFERS
BUF: REPEAT K2-1,
<XWD 0,.+1+BUFSIZ
BLOCK BUFSIZ
XLIST>
LASTB: XWD 0,0
BLOCK BUFSIZ; THE LAST BUFFER
;PG. 10 - MONITOR SWITCHES
SUBTTL MONITOR SWITCHES
DMBY: Z; SET WHEN DRUM IS BUSY
DKBY: Z; SET WHEN DISC IS BUSY
COMEBACK:Z; SET TO REQUEST INTERPRETER RETURN TO MONITOR
MISC: Z; SWITCH USED BY XMTR, DCOMP, TRST, ADIS, RUL
CSS: Z; SWITCH FOR CHS TO TOP OF LIST
CKF: DEC: 0; SET TO DO CHECKSUMS OF THE DRUM
; PG.11 - STATE QUEUE HEADERS
SUBTTL STATE QUEUE HEADERS
DEFINE STAC (A)
<IRP (A)<A'.S=A-S.QUE>>
, DEFINITIONS FOR THE STATE INDEXES.
END.S=37; END SIGNAL FOR PARTIAL ORDERING QUEUES
, THE ORDER OF TABLE REPRESENTS SWAP PRIORITIES
S.QUE=.
TOF: Z; WAITING FOR TERMINAL "OFF" PROCESSING
ON: Z; WAITING FOR "ON" PROCESSOR
RC: Z; CARRIAGE RETURN
RI: Z; REQUEST IN (INTERRUPT BUTTON)
RIB: Z; REQUEST IN--NEEDS A BUFFER
UC: Z; UNCHOKE
QC: Z; QUEUE FOR MORE CORE
COM: Z; COMPUTE
CU: Z; CURRENT USER
DCT: Z; WAITING FOR DISC CONTINUE
DIP: Z; DISC ACTION IN PROGRESS
CK: Z; CHOKED ON OUTPUT
DQ: Z; QUEUE FOR ACCESS TO THE DISC
GR: Z; GREEN (CONSOLE INPUTTING)
DSU: Z; DRAINING BUFFERS FOR SWITCH TO USER
ABG: Z; AWAITING A BUFFER FOR GREEN
QP: Z; PAUSE QUEUE
QDM: Z; QUEUE FOR TRANSFER TO DRUM
QM: Z; QUEUE FOR JOSS INITIAL SERVICE
OF: XWD S.Q+N.S-1,S.Q; STATION OFF
STAC <TOF,ON,RC,RI,RIB,UC,QC,COM,CU>
STAC <DCT,DIP,CK,DQ,GR,DSU,ABG,QP,QDM,QM,OF>
, ALSO STATE RELATED TABLES AT T1,T10,SI1,S10,BOF10.
, S10,S11,S12
; PG.12 - STATE ACTION FOR INTERPRETER ENTRY
SUBTTL STATE ACTION FOR INTERPRETER ENTRY
, ACTION BIT DEFINITIONS
CORBIT=20; CORE BIT
DKBIT=10; DISC BIT
RCBIT=1; CARRIER RETURN BIT
INBIT=2; INTERRUPT BIT
BUFBIT=4; BUFFER REQUEST BIT
ONBIT=40; ON STATE BIT
, ACTION TABLE - TYPE AND ENTRY
T10.:
XWD 0,EJ; TOF
XWD ONBIT,BJ; ON
XWD RCBIT,INTENT; RC
XWD INBIT,INTENT; RI
XWD BUFBIT+INBIT,INTENT; RIB
XWD BUFBIT,INTENT; UC
XWD CORBIT,INTENT; QC
XWD 0,INTENT; COM
; PG. 13 - LOG-ON SCANNER STORAGE
SUBTTL LOG-ON SCANNER STORAGE
SCP1: POINT 7,0; INPUT BYTE BUFFER
SCP2: POINT 4,CART(B); CODE TABLE BYTE POINTER
SCP3: POINT 7,0; OUTPUT BYTE POINTER
SCP4: POINT 6,SCP2,5; POINTER TO POSITION PART
SC9: NOP 0,0(B); POINTER TO EXECUTE TABLE
;PG.14 - COUNTERS FOR ACCOUNTING, STATISTICS, AND DEBUGGING
SUBTTL COUNTERS FOR ACCOUNTING, STATISTICS, AND DEBUGGING
CT10: Z; MINUTE
CT10A: Z; HOUR
CT32: Z; U - USERS
CT33: Z; GQ - GREEN STATION QUEUE
CT2=.
CT34: Z; CQ - COMPUTE QUEUE
CT35: Z; BQ - BUFFER, OR CHOKE QUEUE
CT28: Z; Q - THE QUEUE
CT13: Z; COM - CHARGED COMPUTER TIME
CT14: Z; ST - STATEMENTS INTERPRETED
CT15: Z; A - UNUSED
CT27: Z; I - IN REQUESTS
CT16: Z; TL - LINES TRANSMITTED TO USERS
CT37: Z; B - BACKSPACES RECEIVED FROM USERS
CT31: Z; CR - LINES RECEIVED FROM USERS
CT2A=.
CT25: Z; 1 - COUNTER ONE
CT26: Z; 2 - COUNTER TWO
CT27A: Z; 3 - COUNTER THREE
CT27B: Z; 4 - COUNTER FOUR
CT12: Z; U - UNOVERLAPPED I/O TIME (DRUM)
CT11: Z; RP - IDLE LOOP COUNT
CT39: Z; IC - USERS IN CORE
CT19A: Z; SW - DRUM SWAPS
CT18: Z; S - SAVES
CT18A: Z; D - DELETES
CT18B: Z; DI - PRINT DICTIONARY
CT19: Z; L - LOADS FROM DISC
CT17: Z; SR - STATUS RESPONSES
CT23: Z; SE - STATUS ERRORS
CT43: Z; 1/100TH % OF AVAIL TIME SPENT ON USERS
CT44: Z; TOTAL COMPUTE TIME FOR USERS SINCE BEGIN
CT3A=.
CT46: Z; INPUT INTERRUPTS
CT47: Z; OUTPUT INTERRUPTS
CT48A: Z; CELLS FOR DISPLAY OF SIZE DISTR.
CT48B: Z;
CT48C: Z;
;PG. 15 - COUNTERS FOR ACCOUNTING, STATISTICS, AND DEBUGGING
CT7=.
CT41: Z; T - TAPE REWRITE TRIES
CT42: Z; E - TAPE ERASES
CT45: Z; - - UNERASABLE TAPE
CT21: Z; D - DRUM ERRORS
CT22A: Z; K - DISC ERRORS
CT22: Z; C - CONSOLE DETECTED PARITY ERRORS
CT24: Z; S - SCANNER DETECTED PARITY ERRORS
CT7A=.
CT50: Z; COUNT CORE COMPACTS
CT49=N.DRM
TERROR=CT41
TERASE=CT42
USERS=CT32
;PG. 16 - COUNTERS FOR ACCOUNTING, STATISTICS, AND DEBUGGING
; HEADER LINE FOR CONSOLE TTY OUTPUT
HEAD: ASCII /TM UR-GQ-C-B COM-STA I--TL-C/; 30 CHAR
ASCII /R-CI-CO T-K-T-#-R-#-D T%-RP-U-IC SW-S-L-D/; 42 CHAR
;PG. 17 - COUNTERS FOR ACCOUNTING, STATISTICS, AND DEBUGGING
; STORAGE FOR SUMMARY DATA
, BLOCKS FOR DISTRIBUTIONAL DATA
, COUNTER RANGES READING THE DISPLAY FROM THE LEFT ARE:
, >500,500-200,200-100,100-50,50-20,20-10,10-5,5-2,2-1,<
, UNITS FOR THE DISPLAYS ARE:
, SESSION TIME - MINUTES
, COMPUTE TIME - 10 SECONDS
, PROGRAM SIZE - CELLS USED
, GR-GR TIME - 1/10 MINUTES
, COMP/INTERAC - TICKS
SESTIM: ZBLOK 12; CUMULATIVE SESSION TIME DISTRIBUTION
CCTIM: ZBLOK 12; CUMULATIVE COMPUTE TIME
DSIZE: ZBLOK 12; * SIZE
DTIM: ZBLOK 12; * GREEN-GREEN INTERARRIVAL TIME
DCPI: ZBLOK 12; * COMPUTE TIME PER INTERACTION
CPIL: ZBLOK 12; CHAR/INPUT LINE
CPOL: ZBLOK 12; CHAR/OUPUT LINE
;PG. 18 - COUNTERS FOR ACCOUNTING, STATISTICS, AND DEBUGGING
; CHARACTER (MOSTLY) INTERRUPTS/SECOND/USER
, RANGE: >=15,15-7.5,7.5-3,3-1.5, ... , .75-.03,<.03
IINT: ZBLOK 12; INPUT INTERRUPTS
OINT: ZBLOK 12; OUTPUT INTERRUPTS
TINT: ZBLOK 12; TOTAL INTERRUPTS
T5: ZBLOK 12; INTERPRETATION RATE
T6: ZBLOK 12; BLOCKSIZE DISTRIBUTION
T7: ZBLOK 12; MISC COUNTS
T7.9=T7+9
T8: ZBLOK 12; TASK TURN-AROUND TIME
T9: ZBLOK 12; JOE USES T9, T10, AND T11 TO COUNT
T10: ZBLOK 12; COMMAND EXECUTIONS BY VERB TYPE
T11: ZBLOK 12
T11.1=T11+1
T11.2=T11+2
T11.3=T11+3
T11.4=T11+4
T11.5=T11+5
T11.6=T11+6
T11.7=T11+7
T11.8=T11+8
T11.9=T11+9
;PG. 19 - COUNTERS FOR ACCOUNTING, STATISTICS, AND DEBUGGING
, PER USER COUNTERS
, RIGHT=COMPUTE TICKS SINCE LAST GREEN
, LEFT=TIME OF LAST GREEN
USTAT: ZBLOK N.S; USER COUNTERS
MINT: ZBLOK N.S; CURRENT USERS INITIALS
LIST
SUM: ZBLOK N.S; USER BLOCK CHECKSUMS
;PG.20 - FIELD SIZE, SCALE FACTOR, AND POINTER FOR COUNTERS
SUBTTL FIELD SIZE, SCALE FACTOR, AND POINTER FOR COUNTERS
, IN CTP MACRO:= A# OF COLUMNS (MUST TOTAL <=72)
, B=SCALE FACTOR USED BEFORE PRINT
, C=CT (OR COUNTER) #
, E=0 IF COUNTER IS ZEROED EACH MINUTE
DEFINE CTP (A,B,C,E)
<OPDEF CTP2[BYTE (1)E(5)A(12)^D'B]
CTP2 CT'C>
CTPAR:CTP 3,1,32,1; UR - USERS
CTP 3,1,33; GQ - GREEN USERS
CTP 2,1,34; C - COMPUTING USERS
CTP 2,1,35; B - OUTPUT LIMITED USERS
CTP 4,6,13; COM- COMPUTE TIME
CTP 4,10,14; STA - STATEMENTS INTERPRETED
CTP 2,1,15,1; A - IGNORED PARITY ERRORS
CTP 2,1,50; M - MORE COMPACTS
CTP 4,1,16; TL - LINES TRANSMITTED TO USER
CTP 3,1,31; CR - LINES RECEIVED FROM USERS
CTP 3,10,25; CI - CHARACTERS INPUT
CTP 3,100,26; CO - CHARACTERS OUTPUT
CTP 2,1,41,1; T - TAPE ERRORS
CTP 2,1,22A,1; K - DISC ERRORS
;PG. 21 - FIELD SIZE, SCALE FACTOR, AND POINTER FOR COUNTERS
CTP 2,1,27A; P - LAST STATION TO TRANSMIT PARITY ERROR
CTP 2,1,22; C - CONSOLE PARITY ERRORS
CTP 2,1,27B; B - LAST STATION TO TRANSMIT A BAD CHARACTER
CTP 2,1,24; S - SCANNER PARITY ERRORS
CTP 2,1,21,1; D - DRUM ERRORS
CTP 3,100,43,1; 1/100% COMPUTE TIME - RESET EACH HOUR (LOGS AS %)
CTP 3,2000,11; ID - IDLE LOOP COUNT
CTP 2,1,12; U - UNOVERLAPPED I/O COUNTS
CTP 3,1,39,1; OD - USERS IN CORE
CTP 4,1,19A; SW - DRUMS READS+WRITES
CTP 2,1,18; S - DISC SAVES
CTP 2,1,19; L - DISC LOADS
CTP 2,1,18A; D - DISC DISCARDS
CTPARS=.-CTPAR
;PG 22
SUBTTL DATA CONTROL INTERRUPT ROUTINE
DISMIS: Z; DATA CONTROL END ROUTINE
CONO PI,1000+CHDC; TURN OFF CHANNEL
JRST 12,@DISMIS
;PG 23
SUBTTL DRUM CHANNEL INTERRUPT ROUTINES
DRMR: Z
SETZM DRM14; IF ERROR, FLAG STORED HERE
CONSZ DP,100060;
JRST DEER; MISSED DATA, NOEX MEM, OR PARITY ERROR
SKIPN DMBY
H15: HALT 15; SHOULD BE USING THE DRUM
CONSO DP,10
JRST DRM3
CONO DP,0; KILL THE INTERRUPT
JRST 12,@DRMR; DISMISS END INTERRUPT FROM 167
DRM3: EXCH B,DRM9
EXCH C,DRM8
CONSZ DR,1000; CHECK FOR ERROR
JRST DERR
MOVEI B,77777
ANDM B,DPWD1; MASK OUT POSSIBLE HIGH CARRY BIT
DATAI DP,B
CAME B,DPWD1; CHECK FOR GOOD
JRST DERR
DATAI DR,B
CAME B,DEDR1; DRUM REGISTER ENDING CONTENTS
JRST DERR
CONSO DR,100
H17: HALT 17; NO JOB DONE FLAG
CONO DR,270; DESELECT THE DRUM
SETZM DMBY
SKIPN DMWR; SKIP IF WRITING
JRST 10,DRM7; MUST BE A READ
SETZM DECT; ZERO THE ERROR COUNT
; WRITE END ROUTINE
EXCH S,DRM13
MOVE S,DMUSR
MOVE C,BLKSWRIT
MOVE B,DMIBK
SETZM CORE(B); IDLE THE CORE JUST WRIT
AOS B
SOJG C,.-2
DR2: AOS N.DRM; COUNT DRUM USERS
SOS CT39; COUNT DOWN USERS IN CORE
MOVE B,DMNR; GET LIST FOR OUT
TLNE B,777777; SKIP IF NO MORE TO GO OUT
JRST 10,DM10; GO FOR NEXT WRITE
SKIPE SS98; SKIP IF NO COMPACT REQUEST
JRST 10,DRM2
SKIPGE S,DMIN; SKIP IF SOME TO COME IN
JRST 10,DRM4.5
EXCH PP,DRMPP
TSX ISWAP; INITIATE IN TRANSFER
EXCH PP,DRMPP
JRST 10,DRM5
;PG 24
; INTERRUPT END SEQUENCE
DRM4.5: AOS COMEBACK
DRM5: EXCH S,DRM13
DRM6: EXCH B,DRM9
EXCH C,DRM8
DRM6.5: AOS CT19A; COUNT DRUM ACTIONS
JRST 2,@DRMR
DRM2: AOS SS99; SET REQUEST FOR COMPACT OF CORE
SETZM SS98
AOS DMBY
JRST DRM4.5
;PG 25
; READ END INTERRUPT
DRM7: EXCH S,DMIN
EXCH A,DRM14
HRRZ B,DMIBK
ADDI B,BBLOCK
LDB C,S.BLOCK
LDB A,S.STA
CAIN A,QC.S; CHECK FOR EXPANDING SIZE
SUBI C,1
JSR CKSUM; CHECKSUM THE BLOCK
CAMN A,SUM(S)
JRST DRM7.5; GOOD
EXCH A,DRM14
EXCH S,DMIN
JRST DMERR
DRM7.5: SETZM DECT
EXCH A,DRM14
HRRZ B,DMIBK
DPB S,S.UR
ADDI B,BBLOCK
DPB B,S.COR; SET USER CORE LOCATION
EXCH A,DRM11; SAVE REG AND GET A 2
HRRZ B,DMIBK
LDB C,S.BLOCK
DPB A,S.UD; SET IN CORE AND NO DRUM USE
AOS B
SOJG C,.-2
EXCH A,DRM11
AOS CT39
DRM7.6: SOS N.DRM
DRM7.7: EXCH S,DMIN
JRST DRM6
; PG 26
DRM8: Z; SAVE FOR REG C
DRM9: Z; SAVE FOR REG B
DRM10: OCT 1; SAVE FOR REG A AND A ONE
DRM11: OCT 2; SAVE FOR REG A AND A TWO
DRM12: Z
DRM13: Z; SAVE CELL FOR S
DRM14: Z; SAVE FOR A
DRMPP: XWD -2,.; LOCAL PUSH REGISTER
Z
, INITIATE NEXT WRITE
, B HAS PP REG FOR REQUEST LIST
DM10: EXCH PP,DRMPP
POP B,X; GET NEXT TO WRITE
LDB C,S.BLOCK
EXCH D,DRM12
MOVEM B,DMNR
EXCH A,DRM14
TSX OSWAP; START HIM OUT
EXCH A,DRM14
EXCH D,DRM12
EXCH PP,DRMPP
JRST DRM5
SUBTTL DRUM ERROR RECOVERY
; PG 27
; DATA PROCESSOR ERRORS (PARITY, NOEX MEM, DATA MISS)
DEER: EXCH B,DRM9
CONI DP,B
HRLM B,DRM14
CONO DP,0
EXCH C,DRM8
; OTHER HARDWARE ERRORS--DC FLAGS AND DATA REGISTER MISCOMPARE
DERR: CONI DP,B
HRRM B,DRM14; SAVE FLAGS FOR DISPLAY
CONO DR,200270; DISMISS DRUM
JRST 10,DMERR
DMERR: AOS CT21; COUNT DRUM ERRORS
AOS B,DECT
CAILE B,5
JRST FAIL
AOS DMBY
SKIPN DMWR; SKIP IF WRITE
JRST DE10; GO RECOVER READ ERROR
CONO DP,100+CDRM
DATAO DP,DPWD
DATAO DR,DEDR
CONO DR,260
CONO DR,220+CDRM
JRST DRM6
DE10: CONO DP,CDRM
DATAO DP,DPWD
DATAO DR,DEDR
CONO DR,260
CONO DR,230+CDRM
JRST DRM6
CKER: Z; SET IF A GRONKED USER
DECT: Z; ERROR RETRY COUNT
DEDR: Z; UNIT AND TRACK OF LAST SELECT
DEDR1: Z; EXPECTED ENDING TRACK AND SECTOR
; PG 28
; CANT RECOVER DRUM ERROR--PREPARE TO GRONK USER
FAIL: EXCH S,DMIN
EXCH A,DRM14
MOVEM A,MINT(S); SAVE FAILING CHECKSUM
AOS CKER; FLAG ERROR OCCURRENCE
MOVEI A,1
DPB A,S.GK; FLAG USER AS GRONKED
EXCH A,DRM14
SETZM DECT
SETZM DMBY
SKIPE DMWR
JRST DRM7.7
LDB C,S.BLOCK
HRRZ B,DMIBK
SETZM CORE(B); FREE CORE
AOS B
SOJG C,.-2
JRST DRM7.6
SUBTTL CHECKSUM A USERS BLOCK
; PG 29
, REPORTS ZERO CHECKSUM WHEN CKF IS ZERO
, C,B CLOBBERED
, S= USER #, C=BLOCKS TO SUM, B= LOCATION
CKSUM: Z
SKIPE CKF
JRST .+3
MOVEI A,0
JRST 2,@CKSUM
ASH C,^D10
SUBI C,1
ASH B,^D10
HRRM B,CKS7
EXCH 7,CKS7
EXCH 10,CKS10
EXCH 11,CKS11
MOVEI A,0
JRST 7
CKS5: EXCH 7,CKS7
EXCH 10,CKS10
EXCH 11,CKS11
JRST 2,@CKSUM
CKS7: ADD A,0(C)
CKS10: SOJGE C,7
CKS11: JRST CKS5
SUBTTL INITIATE TRANSFER TO DRUM
; PG 30
, C= # OF BLOCKS TO WRITE
, S= USER TO WRITE
, DRUM LOCATIONS ARE FIXED BY USER - TWO TRACKS EACH,
, SO THE MAX SIZE HANDLED IS 16K WORDS PER USER. B,D ARE CLOBBERED
OSWAP: CONSZ DR,100
H14: HALT 14; DRUM SHOULD BE FREE
MOVEM C,BLKSWRIT
LDB B,S.COR
JSR CKSUM
MOVEM A,SUM(S)
MOVE C,BLKSWRIT
ASH C,6
MOVEM C,DEDR1
ASH C,4
MOVEM C,DPWD1
MOVE C,BLKSWRIT
HRRZ D,C
LSH C,^D28
MOVNM C,DPWD; WORDS TO MOVE
LDB B,S.COR
SUBI B,BBLOCK
MOVEM B,DMIBK; SAVE LOCATION OF BLOCK WRITTEN
MOVEI C,1
DPB C,S.ID; SET DRUM USE BIT
AOS B
SOJG D,.-2
LDB B,S.COR
ASH B,^D10
DPB B,S.COR; MARK USER OUT OF CORE
HRRM B,DPWD; FIRST WORD TO TRANSFER
ADDM B,DPWD1
CONO DP,100+CDRM; SELECT FOR WRITE AND SET CHANNEL
DATAO DP,DPWD; ACTIVATE I/O PROCESSOR
HRRZ B,S
HRRZM B,DMUSR
ADD B,DBASE
ASH B,^D10; TRACK = 2&USER+DBASE
MOVEM B,DEDR; SAVE UNIT AND TRACK FOR RECOVERY
DATAO DR,B; SET UNIT AND TRACK
CONO DR,260; SELECT UNIT
CONO DR,220+CDRM; WRITE
ADDM B,DEDR1
AOS DMWR; INDICATE DRUM WRITE
AOS DMBY
DONE
SUBTTL DATA FOR DRUM TRANSFERS
; PG 31
DMNR: XWD 0,.; LIST OF USERS TO WRITE
ZBLOK 16
DMIBK: Z; INCOMING BLOCK NUMBER
DPWD: Z; I/O CONTROL WORD
DPWD1: Z; EXPECTED END CONTENTS OF 167
DMUSR: Z; DRUM USER
DMWR: Z; SET WHEN WRITING
DMIN: Z; RIGHT = USER TAGGED FOR IN, LEFT = PLACE IN QUEUE, NEG IF NO IN
BLKSWR: Z; # OF BLOCKS WRITTEN
SUBTTL INITIATE TRANSFER FROM DRUM TO CORE
; PG 32
, S HAS USER TO COME IN; DMIBK= CORE BLOCK FOR "IN"
, S IS CLOBBERED
ISWAP: LDB C,S.BLOCK
LDB B,S.STA
CAIN B,QC.S; CHECK FOR SIZE INCREASE
SUBI C,1
MOVEM S,DMIN
MOVEM C,S; SAVE CORRECT BLOCK SIZE
LSH C,^D28
MOVNM C,DPWD; WORD COUNT
HRRZ B,DMIBK; GET IN LOCATION
ADDI B,BBLOCK
ASH B,^D10
HRRM B,DPWD; FIRST WORD
HRRZM B,DPWD1
HRRZ B,DMIBK
MOVE C,S
ASH C,^D10
ADDM C,DPWD1
MOVE C,S
ASH C,6
MOVEM C,DEDR1
MOVE C,S
EXCH A,DRM10
DPB A,S.ID; SET DRUM IN USE
AOS B
SOJG C,.-1
SETZM DMWR
AOS DMBY
MOVE S,DMIN; RECOVER USER #
ADD S,DBASE
ASH S,^D10; TRACK = 2&USER+DBASE
CONO DP,CDRM; SAY READ AND ASSIGN CHANNEL
DATAO DP,DPWD; ACTIVATE 167
MOVEM S,DEDR; SAVE UNIT AND TRACK FOR RECOVERY
CONO PI,400; PREVENT INTERRUPT FOR A WHILE
DATAO DR,S; UNIT AND TRACK
CONO DR,260; SELECT UNIT
CONO DR,230+CDRM; READ
EXCH A,DRM10
CONO PI,200; ON AGAIN
ADDM S,DEDR1; EXPECTED END #
HRRZS DEDR1; ZERO LEFT HALF
DONE
SUBTTL TAPE INTERRUPT ROUTINES
; PAGE 33
TIP: CONI MT1,TEND4; READ IN TAPE FLAGS
CONSO MT1,4; ERF INTERRUPT?
JRST TE20
TEND: CONO MT1,0; DISABLE THE INTERRUPTS
EXCH S,TEND5
EXCH B,TEND6
EXCH E,TEND7; GIVE ME SOME ELBOW ROOM
EXCH PP,TPDL
MOVE B,TEND4; GET THE FLAGS
TRNE B,70; SKIP IF NO ERROR
JRST TEND9; GO FIX THE ERROR
SETZM TEND8; OK, ZERO THE RETRY COUNT
SKIPE TEND4; RESTART DO DONT GIVE BACK BUFFER
TSX MBA
SKIPE DT.BUF; SKIP IF NO MORE BUFFERS
TEND1: TSX CIO
TEND2: EXCH S,TEND5
EXCH B,TEND6
EXCH E,TEND7
EXCH PP,TPDL
JRST 12,@CTYR
TE20: SKIPN TEND8; SKIP TO IGNORE BKSPACE OR WRITE BLANK
JRST TE22; GO TO TRY TO READY TAPE
TE21: CONO MT1,0; KILL THE INTERRUPT
JRST 12,@CTYR
TE22: CONSZ PI,CHDC; GET IT LATER IF DATA CONTROL IS BUSY
JRST TE21
CONSO MT1,2; SKIP IF TRANSPORT READY
JRST TE21; RETURN WE WILL TRY AGAIN LATER
SETZM TEND4; SET RESTART SIGNAL
JRST TEND; GO DO IT
TEND4: Z; FLAG STORAGE
TEND5: DEC -2; SAVE CELL FOR S AND CONTEXT FOR TAPE
TEND6: Z
TEND7: Z; SAVE CELL
TEND8: Z; COUNT OF REWRITE TRIES
SUBTTL TAPE INTERRUPT ROUTINES
; PAGE 34
TEND9: AOS TERROR; COUNT TAPE ERRORS
TEND93: AOS B,TEND8; COUNT REWRITE TRIES
CONO MT1,0; OFF WITH THE LIGHTS
TSX TWAIT; WAIT ON TAPE
CONO MTC,CDAT+3400; BACKSPACE TAPE
TSX TWAIT