-
Notifications
You must be signed in to change notification settings - Fork 0
/
pa1050.mac
13025 lines (11801 loc) · 412 KB
/
pa1050.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
;Edit 413 More code bumming etc, 29-Jun-83 by NIXON.
;SOFTWARE HOUSE 4/3/85 (GC)
;/SH2/ Added COMPAT function 32 that will set/unset internal flag.
; The flag is tested instead of .JBCST to determine whether
; or not to unmap the LIBOL high-segment.
;SOFTWARE HOUSE 4/19/84 (JB)
;/SH/ Added storage for level 3 pc words.
;TS.JFOX 11/7/83 CHANGE VERSION NUMBER TO PRINT IN DECIMAL
;TS.CHull 10-13-83 Put our edits into this new source file--no edit number.
; Removed feature tests--just put it in and commented out old stuff.
;/A3/ TS.CHULL 8/26/82 ADD COMPAT FUNCTION 13 - SUPPORT EXTENDED INTERRUPTS.
; THE PHILOSOPHY IS TO ALLOW PA1050 TO WORK IN SECTION ZERO WITH THE
; INTERRUPT TABLE SET UP THE "EXTENDED" WAY (XSIR%). THERE IS NO
; GUARANTEE OF ANYTHING WORKING IF PA1050 IS INVOKED FROM OR EXECUTED
; IN A NON ZERO SECTION OF MEMORY.
;/A1/ WIZ.MT 7/27/81 PUT IN SOFTWARE HOUSE PATCHES
; Add new COMPT. UUO. functions for COBOL 27-Jun-83 by NIXON.
; Cosmetic changes, code bumming etc. 27-Jun-83 by NIXON.
;Edit 412 by MAYO on Tue 26-Jul-83
; Give more information on a machine size exceeded error.
;Edit 411 by MAYO on Thu 24-Mar-83
; Add power to FTDEB (allow UUO name typeout)
;Edit 410 by SM - goodbye to SAMFRK conditionals
;Edit 409 by SM - Remove XCTUM in SKPINL; it caused SKPINL$X to fail.
; Also add JFCL check to SKPINC as well. No SPR.
;Edit 408 by SM - Pick up block address, not length, at FOPN8A:+3L. 18871.
; Yet another correction to 356!
; UPD ID= 66, AU51:PAT.MAC.9, 7-Dec-82 12:10:26 by MAYO
;Edit 407 by SM - Correction to 356
; UPD ID= 63, au51:PAT.MAC.8, 23-Nov-82 12:54:06 by MAYO
;Edit 406 by SM - Overhaul TMSG. 18148.
; UPD ID= 40, AU51:PAT.MAC.6, 17-Sep-82 15:59:06 by MAYO
;Edit 405 by SM - Finish installing 356, 2 years later.
; UPD ID= 35, AU51:PAT.MAC.5, 1-Sep-82 11:36:03 by MAYO
;Edit 404 by SM - Pretty up output of edit 365. 18080.
; UPD ID= 28, AU5:PAT.MAC.3, 1-Jul-82 11:29:09 by MAYO
; UPD ID= 76, U5:PAT.MAC.4, 28-Jan-82 14:06:25 by NIXON
; Fix FILOP USETI to behave like USETI UUO when block # is beyond end of file
;Edit 403 by SM - Oops on 402. Fix failing unlabeled tape code.
; UPD ID= 6, AU4:PAT.MAC.2, 24-Mar-82 11:10:17 by MAYO
;Edit 402 by SM - Have ENTER/LOOKUP on MTA actually GTJFN the name.
; UPD ID= 959, AU4:PAT.MAC.11, 2-Feb-82 15:50:51 by MAYO
;Edit 401 by SM - neaten up the TTY code now that it's all stable
; UPD ID= 958, AU4:PAT.MAC.8, 28-Jan-82 15:03:56 by MAYO
;Edit 400 by SM - Reshuffle tty code for easier debugging (addition to 367)
; UPD ID= 957, AU4:PAT.MAC.7, 26-Jan-82 12:47:48 by MAYO
;Edit 377 by SM - Have SETNAM do more reasonable SETSN call
; UPD ID= 956, AU4:PAT.MAC.6, 26-Jan-82 11:44:47 by MAYO
;Edit 376 by SM - Create new compt. function - kill w/out screwing vestigals
; UPD ID= 940, AU4:PAT.MAC.5, 13-Jan-82 11:50:00 by MAYO
;Edit 375 by SM - Have a 7 pro code translate to 00, not 02.
; UPD ID= 934, AU4:PAT.MAC.4, 30-Dec-81 14:20:33 by MAYO
;Edit 374 by SM - Put break key same-as ^C^C code in condit. FTBKCC
; UPD ID= 915, au4:PAT.MAC.13, 4-Dec-81 15:18:27 by MAYO
;Edit 373 by SM - On a suicide function, fix the terminal (see 400,401)
;Edit 372 by SM - Addition to definitive fix 367
; UPD ID= 910, au4:PAT.MAC.11, 1-Dec-81 10:42:29 by MAYO
;Edit 371 by SM - Fix to edit 360 - make MTA error check not hurt universe.
; UPD ID= 840, au4:PAT.MAC.7, 1-Oct-81 13:18:42 by MAYO
;Edit 370 by SM - Fix to DEVCHR for "controlling tty" bit
; UPD ID= 810, AU4:PAT.MAC.4, 16-Sep-81 14:05:11 by MAYO
;Edit 367 by SM - fix for term states on entry and
; exit. Undoes (321) and tco 5.1260. Allows PA1050 to restore
; all pertinent tty states to what they were on entry at EXIT:
; time. Restores them back on a CONTinue. (see also 372,373,376,
; 400,401.)
; UPD ID= 791, AU4:PAT.MAC.3, 11-Sep-81 15:13:06 by MAYO
;Edit 366 by SM - attempt to make TAPOP. .TKKTP guess better
; UPD ID= 786, AU4:PAT.MAC.2, 9-Sep-81 14:53:03 by MAYO
;Edit 365 by SM - If overquota, etc., say what file did it
;Edit 364 by SM - Fix so TRMNO can take -1 for current job
; UPD ID= 2226, SNARK:<5.UTILITIES>PAT.MAC.8, 19-Jun-81 11:25:14 by MAYBERRY
; Indicate which version shipped with COBOL-12B
; UPD ID= 1942, SNARK:<5.UTILITIES>PAT.MAC.7, 5-May-81 17:08:38 by SCHMITT
;TCO 5.1310 - If DWNTIM -1, return -1 to caller
; This is the edit level that went out with COBOL-12B, all edits below here
; UPD ID= 1807, SNARK:<5.UTILITIES>PAT.MAC.6, 15-Apr-81 10:31:48 by MAYBERRY
; TCO 5.1281 v(363) make check for page number in .JBHSO in hi-seg origin calc
; UPD ID= 1767, SNARK:<5.UTILITIES>PAT.MAC.5, 25-Mar-81 17:47:52 by GRANT
;Update Copyright
; UPD ID= 1521, SNARK:<5.UTILITIES>PAT.MAC.4, 5-Feb-81 14:36:56 by OSMAN
;tco 5.1260 - Don't SFMOD when doing EXIT uuo, since if we're running as
;background fork, the SFMOD can screw up things like EMACS which may be
;running in foreground. (this edit later removed)
; UPD ID= 1166, SNARK:<5.UTILITIES>PAT.MAC.3, 15-Oct-80 15:35:48 by SCHMITT
; TCO 5.1174 - Turn echoing off for PTY rather than setting Half Duplex
; UPD ID= 819, SNARK:<5.UTILITIES>PAT.MAC.2, 1-Aug-80 12:30:09 by SIMMONS
; TCO 5.1118 V(360) INSTALL ERROR MSG ON DUMPO
; UPD ID= 757, SNARK:<4.1.UTILITIES>PAT.MAC.15, 16-Jul-80 11:09:02 by MAYBERRY
; TCO 4.1.1161 V(356) INSTALL SITGO FILOP. PATCHES,V(357) CHANGE LABTAP CODE
; UPD ID= 637, SNARK:<4.1.UTILITIES>PAT.MAC.14, 13-Jun-80 15:24:37 by SIMMONS
;TCO 4.1.1160 V(355) FIX SO ON A CONT IN APLSF YOU GET L/C CHARACTERS
; UPD ID= 633, SNARK:<4.1.UTILITIES>PAT.MAC.13, 12-Jun-80 14:03:14 by MAYBERRY
; UPD ID= 2927 on 6/6/80 at 4:25 PM by MAYBERRY
;TCO 4.1.1158 V(354) DO RING-BUFFERED UPDATE RIB FILOP.
;TCO 4.1.1159 V(353) OPEN MTA WITH CORRECT BYTE SIZE
; UPD ID= 549, SNARK:<4.1.UTILITIES>PAT.MAC.12, 22-May-80 11:02:27 by SIMMONS
;TCO 4.1.1157 V(352) FIX SO -10 PROG CAN RUN FROM SUBSYS ON A GETSEG
; UPD ID= 409, SNARK:<4.1.UTILITIES>PAT.MAC.11, 4-Apr-80 10:02:04 by SIMMONS
;TCO 4.1.1135 V(351) FIX TO CORRECT DATE FOR D60SPT
; UPD ID= 389, SNARK:<4.1.UTILITIES>PAT.MAC.10, 28-Mar-80 10:42:26 by SIMMONS
;TCO 4.1.1130 V(350) FIX FOR ERROR CODE GJFX35 AT LKERTB
; UPD ID= 371, SNARK:<4.1.UTILITIES>PAT.MAC.9, 26-Mar-80 11:33:21 by SIMMONS
;TCO 4.1.1122 V(347) FIX FOR GETSEG
; UPD ID= 297, SNARK:<4.1.UTILITIES>PAT.MAC.8, 28-Feb-80 14:49:22 by SIMMONS
;TCO 4.1.1093 V(346) FIX FOR APLSF SO ON U/C INPUT RECEIVE L/C ON OUTPUT
; UPD ID= 295, SNARK:<4.1.UTILITIES>PAT.MAC.7, 27-Feb-80 09:43:37 by SIMMONS
; UPD ID= 292, SNARK:<4.1.UTILITIES>PAT.MAC.6, 21-Feb-80 13:33:28 by MAYBERRY
;TCO 4.1.1087 V(345) ADD OPEN APPEND FILOP CODE
;TCO 4.1.1086 V(344) FIX FILOP USETI/USETO BLK-NUM TO FILE ADDRESS CALC
; UPD ID= 177, SNARK:<4.1.UTILITIES>PAT.MAC.5, 28-Dec-79 11:02:04 by SIMMONS
;TCO # 4.1.1057 V(343) - FIX JFNS WHEN 2 CONTAINS A 101
; UPD ID= 12, SNARK:<4.1.UTILITIES>PAT.MAC.4, 26-Nov-79 12:15:18 by SIMMONS
;<4.1.UTILITIES>PAT.MAC.3, 8-Nov-79 15:18:32, EDIT BY DBELL
;TCO 4.2568 - USE VARYING BYTESIZES FOR MAGTAPES SO EBCDIC TAPES WORK
;<4.UTILITIES>PAT.MAC.74, 7-Nov-79 10:51:17, EDIT BY DBELL
;TCO 4.2566 - GIVE GOOD ARGUMENT TO UFPGS SO FILOP FUNCTION 10 WORKS
;<4.UTILITIES>PAT.MAC.73, 27-Sep-79 13:51:36, EDIT BY DBELL
;TCO 4.2492 - MAKE MTCHR NOT FAIL IF THE MAGTAPE HAPPENS TO NOT BE OPEN
;<EKLUND>PAT.MAC.2, 10-Sep-79 16:28:22, EDIT BY EKLUND
;TCO 4.2451 - MAKE STACK SANE AGAIN ON QUOTA EXCEEDED INTERRUPTS
;<4.UTILITIES>PAT.MAC.71, 4-Sep-79 14:02:42, EDIT BY DBELL
;TCO 4.2437 - MAKE READ BACKWARDS WORK FOR MAGTAPES
;<EKLUND>PAT.MAC.7, 4-Sep-79 09:57:05, EDIT BY EKLUND
;TCO # 4.2435 v4(334) make REWIND of spooled card file work reasonably
;<4.UTILITIES>PAT.MAC.68, 8-Aug-79 10:42:33, EDIT BY HELLIWELL
;DON'T MOUNT DECTAPE UNLESS MUST GET JFN IN MTAPE CODE
;<YODER>PAT.MAC.2, 26-Jul-79 17:10:10, EDIT BY YODER
;TCO # 4.2350 v4(332) fix edit 331, which broke NUL:
;<4.UTILITIES>PAT.MAC.65, 15-Jun-79 13:45:29, EDIT BY YODER
;TCO # 4.2290 v4(331) make DIRCHK give non-skip return for NUL:
;<4.UTILITIES>PAT.MAC.64, 13-Jun-79 15:20:34, EDIT BY R.ACE
;[EDIT ON BEHALF OF STAN WHITLOCK]
;TCO # 4.2285 v4(327) make GETLCH return correct line characteristics, not 0
;<4.UTILITIES>PAT.MAC.63, 23-Apr-79 11:51:16, EDIT BY WHITLOCK
;TCO # 4.2239 v4(326) make MTCHR. return record length in LH of AC
;<4.UTILITIES>PAT.MAC.62, 1-Apr-79 21:03:35, EDIT BY GILBERT
;TCO 4.2231 v4(325) Reserve pages 764 up for DDT. Define MAXPAT==764000.
;<4.UTILITIES>PAT.MAC.61, 12-Mar-79 14:09:48, EDIT BY KONEN
;UPDATE COPYRIGHT FOR RELEASE 4
;<4.UTILITIES>PAT.MAC.60, 2-Mar-79 16:26:39, EDIT BY MILLER
;TCO 4.2201. REMOVE CODE ADDED IN RELEASE 2 TO FIX MTA POSITIONING OPS
;<WHITLOCK..PA1050>PAT.MAC.59, 1-Mar-79 08:45:43, EDIT BY WHITLOCK
;TCO # 4.2200 v4(324) make edit 322 work with edit 320
;<WHITLOCK..PA1050>PAT.MAC.58, 26-Feb-79 13:06:29, EDIT BY WHITLOCK
;TCO # 4.2199 V4(323) make BREAK key act like 2 ^C if user is trapping ^C
;<WHITLOCK..PA1050>PAT.MAC.57, 26-Feb-79 12:13:55, EDIT BY WHITLOCK
;TCO # 4.2198 V4(322) speed up OUTSTR - use SOUT instead of BOUT loop
;<WHITLOCK..PA1050>PAT.MAC.56, 26-Feb-79 11:44:22, EDIT BY WHITLOCK
;TCO # 4.2197 v4(321) restore user's SFMOD on CONTinue
;<WHITLOCK..PA1050>PAT.MAC.55, 22-Feb-79 16:53:36, EDIT BY WHITLOCK
;TCO # 4.2196 v4(320) disable control char translation on TTY output
;<4.UTILITIES>PAT.MAC.54, 2-Feb-79 14:15:22, EDIT BY ALUSIC
;TCO # 4.2182 V4(317) ISSUE ERROR MSG AND HALT ON CHN 11 INT IF NOT UUO @IOERR
;<4.UTILITIES>PAT.MAC.53, 23-Jan-79 15:02:38, EDIT BY ALUSIC
;TCO # 4.2169 V4(316) FIX TRMOP FUNCTIONS .TONFC AND .TOWID AT TONFCS & TOWIDR.
;<4.UTILITIES>PAT.MAC.52, 27-Dec-78 11:59:42, EDIT BY HELLIWELL
;TCO # 4.2133 V4(315) FIX BUG IN REMAP WHEN MOVING CODE UP
;<4.UTILITIES>PAT.MAC.51, 13-Dec-78 14:47:28, EDIT BY ALUSIC
;TCO # 4.2121 V4(314) SET EOF POINTER TO REFLECT CORRECT # WDS AT MOVBUF+7
;<4.UTILITIES>PAT.MAC.50, 6-Dec-78 17:34:15, EDIT BY HURLEY
;FIX THE MISSING DATA ON THE "CREF" COMMAND. (EMPTY LISTINGS)
;MAKE UCL3 NOT CALL SETEOF IF THE DEVICE IS NOT A DISK (EG A LPT:)
;<4.UTILITIES>PAT.MAC.49, 17-Nov-78 17:18:47, EDIT BY HELLIWELL
;TCO # 4.2091 CHANGE "DSK:<SUBSYS>" TO "PS:<SUBSYS>"
;<4.UTILITIES>PAT.MAC.48, 17-Nov-78 09:52:29, EDIT BY ALUSIC
;TCO# 4.2090 SET USE BITS IN INPUT BUFFER HEADERS, FIXES FORTRAN MTA BACKSPACE
;<ALUSIC.SPR>PAT.MAC.1, 6-Nov-78 11:13:18, EDIT BY ALUSIC
;TCO# 4.2080 MAKE TTCL6 (GETLCH) RETURN 0 IF JOB IS DETACHED
;<4.UTILITIES>PAT.MAC.46, 29-Oct-78 14:13:03, EDIT BY HELLIWELL
;<4.UTILITIES>PAT.MAC.45, 29-Oct-78 13:13:44, EDIT BY HELLIWELL
;SOME MORE FIXES FOR HI SEG FREE POINTER OFF END OF HI SEG
;<4.UTILITIES>PAT.MAC.44, 29-Oct-78 12:32:43, EDIT BY HELLIWELL
;TCO 4.2073 ACCOUNT FOR HI SEG WITH LENGTH EXACT MULTIPLE OF PAGE DURING GETSEG
;<4.UTILITIES>PAT.MAC.43, 20-Oct-78 18:38:23, EDIT BY HELLIWELL
;TCO 4.2057 ADD GETTAB TABLE 100 FOR HI SEG ORIGIN ONLY.
;<4.UTILITIES>PAT.MAC.42, 19-Oct-78 11:00:22, EDIT BY ALUSIC
;TCO 4.2053 MAKE SLEEP WORK CORRECTLY-DELETE THIBR AT IOWAIT.
;<4.UTILITIES>PAT.MAC.41, 3-Oct-78 11:16:49, EDIT BY HURLEY
;TCO 4.2030 - CHANGE LINE FEED CCOC BITS TO BE 2 INSTEAD OF 3
;<4.UTILITIES>PAT.MAC.40, 21-Sep-78 10:36:37, EDIT BY HELLIWELL
;<4.UTILITIES>PAT.MAC.39, 21-Sep-78 10:29:59, EDIT BY HELLIWELL
;TCO # 4.2018 ADD GETTAB TABLE 5 (.GTKCT). RETURN RUNTIME * 20K
;<4.UTILITIES>PAT.MAC.38, 20-Sep-78 17:37:36, EDIT BY HELLIWELL
;TCO # 4.2017 DON'T COPY JOB DATA AREA TO HIGH SEG IF NOT WRITABLE
;<4.UTILITIES>PAT.MAC.37, 19-Sep-78 10:57:30, EDIT BY HELLIWELL
;TCO # 4.2014 IMPLEMENT GETTABS .GTRDV AND .GTRDI
;TCO # 4.2014 ADD CELLS LOWDEV AND LOWPPN AND MAKE SURE THEY ARE SETUP
;<4.UTILITIES>PAT.MAC.36, 23-Aug-78 08:12:34, EDIT BY MILLER
;CHANGE NAME OF .GTHSN TO GTHSNS
;<4.UTILITIES>PAT.MAC.35, 23-Aug-78 07:57:56, EDIT BY MILLER
;RESTORE TOPAGS AND TOPAGR TO THEIR OLD SELVES.
;<4.UTILITIES>PAT.MAC.34, 18-Aug-78 08:10:01, Edit by KONEN
;TCO 4.1987 - DON'T CLOBBER BYTE COUNT FOR NON-DISK FILES IN EXEC CLOSE
;<4.UTILITIES>PAT.MAC.33, 1-Aug-78 14:52:30, Edit by ALUSIC
;TCO #1964 CALL SETEOF AT UCL3+7 TO SET EOF IN FDB DURING CLOSE OUTPUT
;<4.UTILITIES>PAT.MAC.32, 27-Jul-78 08:09:39, EDIT BY MILLER
;MORE FIXES FOR XON/XOFF
;<4.UTILITIES>PAT.MAC.31, 26-Jul-78 18:51:42, EDIT BY MILLER
;CHANGE TOPAGR TO USE MTOPR TO FETCH THE BIT
;<4.UTILITIES>PAT.MAC.30, 26-Jul-78 18:40:51, EDIT BY MILLER
;CHANGE TOPAGS TO DO XON/XOFF PROPERLY
;<4.UTILITIES>PAT.MAC.23, 21-Jul-78 13:38:34, EDIT BY OSMAN
;CHECK .JIT20 (GETJI) INSTEAD OF LOOKING FOR /EXEC/
;<4.UTILITIES>PAT.MAC.22, 14-Jul-78 13:52:19, EDIT BY HURLEY
;FIXED IO ERROR INDICATION ON DATA ERRORS FROM THE DISK
;<3A.UTILITIES>PAT.MAC.18, 27-Jun-78 23:39:45, Edit by HELLIWELL
;<4.UTILITIES>PAT.MAC.20, 26-Jun-78 15:09:20, Edit by HELLIWELL
;SET TERMINAL MODE ON OPEN OF CONTROLLING TERMINAL
;<4.UTILITIES>PAT.MAC.19, 24-Apr-78 14:40:22, Edit by DBELL
;MAKE TMPBLK LARGER SO ENQ/DEQ CAN HAVE LARGER ARGUMENT BLOCKS
;<4.UTILITIES>PAT.MAC.18, 12-Apr-78 12:26:01, Edit by HELLIWELL
;FIX REMAP TO DEFAULT HI SEG ORIGIN PROPERLY
;<4.UTILITIES>PAT.MAC.17, 11-Apr-78 15:24:17, Edit by HELLIWELL
;ADD MISSING INSTRUCTION AT REMAP1+12
;<4.UTILITIES>PAT.MAC.16, 11-Apr-78 14:38:45, Edit by HELLIWELL
;FIX TYPO IN HI SEG ORIGIN EDIT
;<4.UTILITIES>PAT.MAC.15, 11-Apr-78 14:30:26, EDIT BY HURLEY
;TCO 1899 - FIX MAGTAPE BUFFER SIZE DEFAULTING TO USE JOB DEFAULTS
;<4.UTILITIES>PAT.MAC.14, 11-Apr-78 14:12:06, Edit by HELLIWELL
;FIX MANY BUGS HAVING TO DO WITH HI SEG ORIGIN, INCLUDING REWRITE OF REMAP UUO
;<4.UTILITIES>PAT.MAC.13, 7-Apr-78 16:49:20, EDIT BY HURLEY
;FIX TAPE REWINDS - BOT WAS NEVER BEING CLEARED AT GSTATS
;<4.UTILITIES>PAT.MAC.12, 7-Apr-78 12:37:46, Edit by HELLIWELL
;RETURN TO USER AFTER COMPTG (GTJFN) IF PARSE ONLY
;<4.UTILITIES>PAT.MAC.11, 7-Apr-78 11:27:15, Edit by HELLIWELL
;MUST COPY USER STRING TO STRNG1 BUFFER WHEN STPARS FAILS
;<4.UTILITIES>PAT.MAC.10, 6-Apr-78 16:06:44, Edit by HELLIWELL
;FIX COMPT. FUNCTION 3 TO REQUIRE 4 ARGS FOR PPN TO DIR (INCLUDES DEVICE)
;<4.UTILITIES>PAT.MAC.9, 6-Apr-78 15:38:48, Edit by HELLIWELL
;FIX COMPT. FUNCTION 2 (RENAME) TO REQUIRE ONLY 3 ARGS (2 MORE OPTIONAL)
;<4.UTILITIES>PAT.MAC.8, 6-Apr-78 14:29:40, Edit by HELLIWELL
;AT MTAPE7+6 MOUNT DECTAPE EVEN IF ALREADY HAVE JFN
;IN COMPTG, IF STPARS FAILS, USE USER'S ORIGINAL STRING INSTEAD OF GIVING ERROR RETURN
;IN COMPTG, AVOID DVCHR JSYS IF GJ%OFG ON FOR GTJFN (PARSE)
;UNLABLED EDIT:
;FIX SFMOD THAT USESE 770000 INSTEAD OF 170000
;<4.UTILITIES>PAT.MAC.5, 28-Feb-78 16:23:27, Edit by DBELL
;IMPLEMENT FUNCTION 10 OF FILOP. - UPDATE "RIBS"
;<4.UTILITIES>PAT.MAC.4, 28-Feb-78 15:55:57, Edit by BORCHEK
;fix enter returning error in wrong place
;<4.UTILITIES>PAT.MAC.3, 14-Feb-78 17:37:24, EDIT BY HURLEY
;CHANGED TM.ASC TO BE 1B29
;<4.UTILITIES>PAT.MAC.2, 29-Jan-78 18:09:54, Edit by BORCHEK
;DON'T SET INIT BIT FOR LPT AT DEVCHZ
;<4.UTILITIES>PAT.MAC.1, 23-Jan-78 12:01:39, EDIT BY HELLIWELL
;FIX PROTECTION TRANSLATION AT ULK2L, TEST FOR LEAST PROTECTION
;TTYSET NOW CALLED IN OPEN ROUTINE BECAUSE RFMOD CAN'T BE DONE UNTIL OPEN
TITLE PAT - 10/50 COMPATIBILITY FOR TOPS20
SEARCH MONSYM,MACSYM
IFNDEF .PSECT,<
.DIRECT .XTABM>
.GROUP==1 ;/A1/GROUP WHO LAST MODIFIED PROGRAM
.MAJOR==5 ;MAJOR VERSION NUMBER
.MINOR==1 ;MINOR VERSION LETTER
RADIX 10
.EDIT==413 ;EDIT NUMBER by SM
RADIX 8
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1976,1977,1978,1979,1980,1981,1982,1983
; BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
PATVER==:<BYTE (3).GROUP(9).MAJOR(6).MINOR(18).EDIT> ;EDIT NUMBER STORED IN PVLOC
SUBTTL DEFINITIONS AND ALLOCATION
COMMENT \
THIS CODE RESIDES IN A HIGH AREA OF USER CORE (CURRENTLY 700000).
IT IS LOADED FROM THE SSAVE FILE SYS:PA1050.EXE BY THE
MONITOR WHENEVER A FORK EXECUTES ITS FIRST 10/50 UUO (40-77, BUT NOT 0).
THE FIRST TIME, ENTRY IS VIA THE SECOND LOCATION OF THE ENTRY VECTOR.
THEREAFTER, 10/50 UUO'S RESULT IN AN IMMEDIATE TRANSFER TO
THIS CODE VIA THE FIRST LOCATION OF THE ENTRY VECTOR. WHEN
ANY 10/50 UUO IS EXECUTED, THE MONITOR MOVES LOCATION 40 TO
MONUUO (SPECIFIED BY FOURTH WORD OF ENTRY VECTOR), AND THE RETURN
PC TO MONUPC (SPECIFIED BY FIFTH WORD OF ENTRY VECTOR). THIS CODE
INTERPRETS THE UUO AND RETURNS DIRECTLY TO THE USER PROGRAM.
THIS CODE USES THREE OF THE RESERVED UUO'S (42-44) FOR INTERNAL
PURPOSES.
ASSEMBLY AND LOADING PROCEDURE:
@LOAD PAT
@START
@
THE START AFTER LOADING CAUSES THE CODE TO BE MOVED FROM ITS LOAD
LOCATION TO ITS RUNNING LOCATION IN HIGH CORE. THE SYMBOL
TABLE IS ALSO MOVED, AND THE POINTER ADJUSTED. AN SSAVE FILE
OF PAGES 700-777 SHOULD BE MADE TO BE USED FOR DEBUGGING.
TO PRODUCE THE SYSTEM FILE, START AT MAKEPF (MAKEPF$G). THIS WILL
WRITE A SSAVE FILE WITH WRITE PROTECTION INTO THE SPECIFIED FILE.
FOR DEBUGGING COMPATIBILITY PACKAGE, FIRST RESET, AND GET
THE TEN-50 PROGRAM TO BE USED FOR TESTING, IF ANY.
THEN, MERGE AN SSAVE FILE (WITH DDT AND SYMBOLS) OF THE
DEBUG VERSION OF PAT, TYPE DDT, THEN DEBUG$G TO SET UP THE
COMPATIBILITY VECTOR, PSI SYSTEM, AND TEMPORARY STORAGE.
NOTES ON ^C TRAPPING: PAT WAS ORIGINALLY DESIGNED TO ALLOW A USER TO
BREAK THROUGH ^C TRAPS. IF THIS IS NOT DESIRED, THE TRAP CAN BE MADE
SAFER BY SETTING MAXFRU TO -1 AND FTBKCC TO 0.
\
;INTERNAL UUO'S
OPDEF PJRST [JRST]
OPDEF CALL[40B8] ;10/50 CALL UUO
DEFINE UMOVE (A,B)<
PUSHJ P,UXCT
MOVE A,B>
DEFINE UMOVEM (A,B)<
PUSHJ P,UXCT
MOVEM A,B>
DEFINE XCTUU (A)<
PUSHJ P,UXCT
A>
DEFINE XCTU2 (A)<
PUSHJ P,UXCT2
A>
DEFINE XCTUM (A)<
PUSHJ P,UXCT
A>
DEFINE XCTMU (A)<
PUSHJ P,UXCT
A>
DEFINE XCTLB (A)<
PUSHJ P,LBXCT
A>
DEFINE XJSYS (INST) <
PUSHJ P,DOJSYS
INST>
DEFINE IJSYS (INST)<
JSP EE,INJSYS
INST>
;MACRO TO REFERENCE PAGE NUMBER WITHIN ADDRESS
DEFINE PAGEN (LOC)<POINT 9,LOC,26>
;TYPEOUT MACRO AND FRIENDS
.NUL==0 ;NO TYPEOUT AHEAD OF MESSAGE
.CR==1 ;TYPE A <CR> FIRST
.CRQ==2 ;<CR> AND ? FIRST
.CRP==3 > AND % FIRST
.NOREF==0
DEFINE TMSG (MSG)
< TMSGS .NUL,<MSG>
>
DEFINE TMSGS(LD,MSG<>,%FOO)
< PUSHJ P,TMSGQ
%%R==<-1,,[ASCIZ ~MSG~] >
%%Q==<XWD LD,0>
IFN %%Q,< ;;LONG FORM
JRST %FOO
EXP %%R
EXP %%Q>
IFE %%Q,< ;;SHORT FORM
TRNA 0
EXP %%R>
%FOO:>
IFNDEF FTSTAT,<FTSTAT==0> ;KEEP STATISTICS OF PA1050 USAGE
IFNDEF FTFILSER,<FTFILSER==0> ;USE FILSER FOR DEVICE DPA
;**;[374] At IFNDEF FTFILSER, Added 1 line SM 7-Dec-81
IFNDEF FTBKCC,<FTBKCC==-1> ;ALLOW BREAK TO ACT LIKE ^C^C
FTDEB==0 ;0 OR -1 ONLY (-1 FOR ON)
MLON
SALL
;ACCUMULATOR DEFINITIONS
PF=0 ;PAT'S FLAG AC
A=1 ;FIRST AC'S ARE TEMPS AND JSYS ARGS
B=2
C=3
D=4
E=5
F=6
G=7
AA=10 ;CONTAINS DEVICE NUMBER DURING I/O UUO HANDLING
BB=11 ;HOLDS BASE OF I/O CHANNEL DATA BLOCK DURING ...
CC=12 ;HOLDS ADDRESS OF CURRENT RING BUFFER IN I/O
AC=13 ;AC NUMBER IN TEN-FIFTY UUO
CAC=14 ;CONTENTS OF THAT AC. LOADED ON ALL UUOS.
EE=15 ;EE AND FF ARE USED BY UMOVE AND UMOVEM WITHOUT SAVING
FF=16 ; IF USED, BE AWARE THAT THEY WILL BE CHANGED ON UMOVE'S
P=17
;FLAGS IN AC PF. LEFT HALF ARE PERMANENT (HOLD OVER USER PROG)
; RIGHT HALF ARE MEANINGFUL ONLY WITHIN A GIVEN UUO, CLEARED ON ENTRY
R.CLS==1 ;FLAG SET DURING CLOSE AND TESTED IN OUTPUT TO AVOID
;OUTPUTTING 0 LENGTH RECORDS.
R.DIRN==2 ;DIRECTION OF TRANSFER IN MTA, USET
R.RUNU==4 ;DISTINGUISH RUN UUO FROM GETSEG UUO
R.UEXT==10 ;EXTENDED LOOKUP OR ENTER FLAG
R.EXIT==20 ;ON FOR EXIT 1, ; OFF FOR EXIT 0, .
R.NOWC==40 ;DONT COMPUTE WORD COUNT FOR BUFFER. THERE IS DATA THERE
R.FERR==100 ;FATAL ERROR. PREVENTS PMAPPING PAT OUT OF EXISTANCE
R.KJFN==200 ;KEEP JFN IN CLOSE ROUTINE.
R.RHLT==400 ;RUN OR GETSEG UUO FOLLOWED BY HALT (DON'T RETURN)
R.SYS==1000 ;RUN UUO FROM SYS, SO DO SETNM
R.ENT==2000 ;DOING AN ENTER, SET PROTECTION FIELD
R.CMR==4000 ;CMRETN RETURN FOR STATISTICS GATHERING
R.CVF==10000 ;FLAG TO CAUSE CONTROL-V'S TO GO INTO ASCII STRINGS
R.CVC==20000 ;FLAG TO MARK THAT A PARTICULAR CHARACTER SHOULD BE QUOTED
R.EXP==40000 ;AN EXPUGE WAS DONE DURING THIS UUO, DONT DO ANOTHER
R.ILLJ==100000 ;DOING AN XJSYS, DONT TYPE ILL INST
R.SUIC==200000 ;COMMITTING SUICIDE
;**;[376] At R.SUIC, Added 1 line SM 25-Jan-82
R.SU2==R.ENT ;[376] On a suicide, don't touch VESTigals (REUSE R.ENT)
;**;[345] CREATE NEW TEMPORARY FLAG
R.FLP==400000 ;[345] FILOP. UUO IN PROGRESS
L.DBUG==1 ;DEBUGGING PAT ITSELF
L.ONCE==2 ;HAVE BEEN THRU ONCE CODE
L.INDF==4 ;INDICATE FF BY ^L REQUESTED AT EXEC LEVEL, SO DO SO.
L.GSTA==20 ;<SYSTEM>PA1050.STATISTICS WAS FOUND, DO GENERAL STATISTICS
L.LSTA==40 ;PA1050.STATISTICS WAS FOUND, DO LOCAL STATISTICS
L.FLSR==100 ;FILSER HAS BEEN LOADED INTO ADDRESS SPACE
L.TFA==200 ;TTY FORK FOR HIBERNATE IS NOW ACTIVE
L.NCCE==400 ;CONTROL-C CANNOT BE ENABLED
L.SMAL==1000 ;SMALL SYSTEM (LESS THAN 196K)
L.UPDT==(1B1) ;[356] Put a file into update mode in ENTER UUO processing
;[356] This is used by FILOP. to force update mode
;CHARACTERS REFERENCED SYMBOLICALLY
C.CC==3 ;CONTROL-C CHARACTER
C.BELL==7 ;BELL CHARACTER
C.TAB==11 ;TAB
C.LF==12 ;LINE FEED
C.FF==14 ;FORMFEED CHARACTER
C.CR==15 ;CARRIAGE RETURN
C.EOF=="Z"-100 ;CONTROL-Z, END-OF-FILE FOR TTY
STDALT==33 ;10/50'S STANDARD ALTMODE CHARACTER
ALT1==175 ;NON-STANDARD ALTMODE
ALT2==176 ;ANOTHER NON-STANDARD ALTMODE
C.RTYP=="R"-100 ;RETYPE THE CURRENT LINE COMMAND
C.DELC==177 ;SINGLE-CHARACTER DELETE (RUBOUT)
C.DELL=="U"-100 ;LINE (BUFFER) DELETE (^U)
C.CNTV=="V"-100 ;CONTROL-V HARACTER FOR QUOTING
;DEVICE DESIGNATOR DEFINITIONS
DSK==0
DRM==1
MTA==2
DTA==3
PTR==4
PTP==5
DIS==6
LPT==7
CDR==10
CDP==11
TTY==12
PTY==13
NIL==15
PLT==17
;[356] TOPS-10 LOOKUP/ENTER/RENAME/FILOP. ERROR RETURNS
FNFERR==0 ;[356] FILE NOT FOUND
IPPERR==1 ;[356] INCORRECT PPN
PRTERR==2 ;[356] PROTECTION FAILURE
FBMERR==3 ;[356] FILE BEING MODIFIED
AEFERR==4 ;[356] ALREADY EXISTING FILE NAME
ISUERR==5 ;[356] ILLEGAL SEQUENCE OF UUOS
TRNERR==6 ;[356] TRANSMISSION ERROR
NSFERR==7 ;[356] NOT A SAVE FILE
NECERR==10 ;[356] NOT ENOUGH CORE
DNAERR==11 ;[356] DEVICE NOT AVAILABLE
NSDERR==12 ;[356] NO SUCH DEVICE
ILUERR==13 ;[356] ILLEGAL UUO
NRMERR==14 ;[356] NO ROOM
WLKERR==15 ;[356] WRITE LOCKED
NETERR==16 ;[356] NOT ENOUGH TABLE SPACE
POAERR==17 ;[356] PARTIAL ALLOCATION ERROR
BNFERR==20 ;[356] BLOCK NOT FREE
CSDERR==21 ;[356] CAN NOT SUPERSEDE A DIRECTORY
;ARGUMENT BLOCK FOR FILOP.
;;[356] !=========================================================================!
;;[356] !UP! ! FUNCTION CODE !
;;[356] !-------------------------------------------------------------------------!
;;[356] ! I/O MODE !
;;[356] !-------------------------------------------------------------------------!
;;[356] ! DEVICE NAME OR UDX !
;;[356] !-------------------------------------------------------------------------!
;;[356] ! OUTPUT BUFFER HEADER ! INPUT BUFFER HEADER !
;;[356] !-------------------------------------------------------------------------!
;;[356] ! NUMBER OF OUTPUT BUFFERS ! NUMBER OF INPUT BUFFERS !
;;[356] !-------------------------------------------------------------------------!
;;[356] ! PTR TO RENAME BLOCK ! PTR TO LOOKUP BLOCK !
;;[356] !-------------------------------------------------------------------------!
;;[356] ! LENGTH OF PATH BLOCK ! PTR TO PATH BLOCK !
;;[356] !-------------------------------------------------------------------------!
;;[356] ! PROJECT NUMBER ! PROGRAMMER NUMBER !
;;[356] !=========================================================================!
;[356] OFFSETS IN ARGUMENT BLOCK
.FOFNC==0 ;[356] FUNCTION (AND FLAGS)
.FOIOS==1 ;[356] I/O STATUS (OPEN MODE)
.FODEV==2 ;[356] DEVICE
.FOBRH==3 ;[356] BUFFER RING HEADER POINTERS
.FONBF==4 ;[356] NUMBER OF BUFFER TO BUILD
.FOLEB==5 ;[356] PTR TO RENAME,,LOOKUP/ENTER BLOCK (SEE .RB??? SYMBOLS)
.FOPAT==6 ;[356] PTR TO PATH BLOCK (SEE .PT??? SYMBOLS)
.FOPPN==7 ;[356] (PRIVILEGED) IN-YOUR-BEHALF PPN
;[356] FLAGS IN .FOFNC
FO.PRV==1B0 ;[356] JOB IS JACCT OR [1,2] AND WANT TO USE PRIVS
FO.ASC==1B1 ;ASSIGN AN EXTENDED CHANNEL NUMBER
;[356] FUNCTION CODES
.FORED==1 ;[356] READ ONLY
.FOCRE==2 ;[356] CREATE (NEW FILE ONLY)
.FOWRT==3 ;[356] WRITE (CREATE OR SUPERCEDE)
.FOSAU==4 ;[356] SINGLE ACCESS UPDATE
.FOMAU==5 ;[356] MULTI-ACCESS UPDATE
.FOAPP==6 ;[356] APPEND
.FOCLS==7 ;[356] CLOSE (OPTIONAL FLAGS IN .FOIOS, SEE CL.???)
.FOURB==10 ;[356] UPDATE RIB
.FOUSI==11 ;[356] USETI
.FOUSO==12 ;[356] USETO
.FORNM==13 ;[356] RENAME
.FODLT==14 ;[356] DELETE
.FOPRE==15 ;[356] PREALLOCATE
REPEAT 0,< ;NOT YET IMPLEMENTED
.FOSIO==16 ;SUPER I/O
.FOINP==17 ;INPUT
.FOOUT==20 ;OUTPUT
.FOSET==21 ;SETSTS
.FOGET==22 ;GETSTS
.FOREL==23 ;RELEASE
.FOWAT==24 ;WAIT
.FOSEK==25 ;SEEK
.FORRC==26 ;REWRITE RIB
>
;ARGUMENT BLOCK FOR COMPT. UUO FUNCTION 1 AND 13
; !=========================================================================!
; ! CHANNEL ! FUNCTION CODE !
; !-------------------------------------------------------------------------!
; ! AC1 GTJFN BITS !
; !-------------------------------------------------------------------------!
; ! AC2 GTJFN BITS !
; !-------------------------------------------------------------------------!
; ! AC1 OPENF BITS !
; !-------------------------------------------------------------------------!
; ! OPEN MODE !
; !-------------------------------------------------------------------------!
; ! INPUT BUFFER HEADER ADDRESS !
; !-------------------------------------------------------------------------!
; ! OUTPUT BUFFER HEADER ADDRESS !
; !-------------------------------------------------------------------------!
; ! ADDRESS FOR EXTENDED FUNCTION !
; !-------------------------------------------------------------------------!
; ! NUMBER OF OUTPUT BUFFERS ! NUMBER OF INPUT BUFFERS !
; !=========================================================================!
;OFFSETS IN ARGUMENT BLOCK FOR FUNCTION 1 AND 13
.CMPCH==0 ;CHANNEL # (LHS)
.CMPFN==0 ;FUNCTION (RHS)
.CMPG1==1 ;AC1 GTJFN BITS
.CMPG2==2 ;AC2 GTJFN BITS
.CMPO2==3 ;AC2 OPENF BITS
.CMPOM==4 ;OPEN MODE
.CMPIB==5 ;INPUT BUFFER HEADER ADDRESS
.CMPOB==6 ;OUTPUT BUFFER HEADER ADDRESS
.CMPXF==7 ;ADDRESS OF RIB FOR EXTENDED FUNCTION (MUST BE 4 WORDS OR MORE)
.CMPNB==10 ;NUMBER OF OUTPUT BUFFERS ,, NUMBER OF INPUT BUFFERS
;FUNCTION CODES
.CMOPN==1 ;FUNCTION 1, OPEN, LOOKUP, AND ENTER
.CMRNM==2 ;FUNCTION 2, RENAME
.CMDIR==3 ;FUNCTION 3, PPN TO DIRECTORY
.CMRUN==4 ;FUNCTION 4, RUN
.CMJFS==5 ;FUNCTION 5, JFNS
.CMPSI==6 ;FUNCTION 6, SET UP PSI CHANNEL
.CMERS==7 ;FUNCTION 7, ERSTR
.CMCHN==10 ;FUNCTION 10, GET JFN OF CHANNEL
.CMSUI==11 ;FUNCTION 11, COMMIT SUICIDE AND RETURN
.CMVST==12 ;FUNCTION 12, LIKE 11 BUT LEAVE VEST ALONE!
.CMAPP==13 ;FUNCTION 13, OPEN EXTEND (APPEND)
;10/50 JOB AREA LOCATIONS
JOBPD1==45
JOBS41==122
.JBUUO=40
.JBERR=42
.JBREL=44
.JBDDT=74
.JBHSO=75
.JBPFI=114
.JBHRL=115
.JBSYM=116
.JBUSY=117
.JBSA=120
.JBFF=121
.JBREN=124
.JBAPR=125
.JBCNI=126
.JBTPC=127
.JBOPC=130
.JBCOR=133
.JBINT=134
.JBVER=137
.JBDA=140
.JBHSA==0
.JBH41==1
.JBHCR==2
.JBHRN==3
.JBHVR==4
.JBHNM==5
.JBHSM==6
; ==7
.JBHDA==10 ;NEEDED DURING ASSEMBLY
;FLAGS IN RH OF FLAGWD
IO.BIN==10 ;BINARY MODE
IO.FCS==100 ;FULL CHARACTER SET
IO.SUP==200 ;SUPPRESS ECHOING
IO.TEC==400 ;TRUTH IN ECHOING MODE
IO.IMP==400000 ;IO IMPROPER MODE
;FLAGS IN LH OF FLAGWD IN CHANNEL DATA TABLES (CHTABS)
RNDMF==1 ;FILE IS BEING READ RANDOMLY
MTABFS==1 ;MTA BUFFERS ARE SET UP
PTYCRF==2 ;LAST CHAR SENT TO PTY WAS A <CR>
MTALTW==2 ;LAST MAGTAPE TRANSFER WAS A WRITE
PTYCWF==4 ;PTY IS WAITING FOR ^C TO TAKE EFFECT
DTACLS==PTYCWF ;DTA JFN WAS CLOSED FOR ANOTHER CHANNEL TO RUN
MTADMS=PTYCWF ;DATA MODE WAS SET ON MTA
RDMFDF==10 ;READING MFD, SIMULATE WITH DIRST
RDUFDF==20 ;READING UFD, SIMULATE WITH GNJFN
UFDEOF==40 ;NO MORE FILES IN DIRECTORY DURING UFD SIMULATION
DTADMP==100 ;DTA HAS BEEN OPENED IN DUMP MODE
ENTERF==200
INBUFF==400
IOPENF==1000
LOOKPF==2000
OOPENF==4000
DTAMF==10000 ;DTA IS MOUNTED AND DIRECTORY WAS READ
MTARDB==DTAMF ;MAGTAPE READS ARE BACKWARDS
OUTBFF==20000
INFIRF==40000
OUFIRF==100000
INITF==200000
;FLAGS IN LH OF TYSTAT AND LH OF FLAGWD FOR TTY'S ONLY
TT.BIN==PTYCRF ;TTY IS IN BINARY MODE FLAG
TT.CTY==PTYCWF ;TTY IS CONTROLING TTY FOR THIS JOB
TT.ALT==RDMFDF ;USER WANTS NO ALT MODE CONVERSION
TT.GAG==RDUFDF ;DONT TYPE MESSAGES TO USER TTY
TT.XON==UFDEOF ;TTY IN TAPE MODE, NO LF AFTER CR
TT.BKE==DTADMP ;TTY BREAK ON EVERYTHING
;TTY MODE DEFINITIONS
TM.ECH==3B25 ;ECHO FIELD
TM.IOD==2B25 ;IMMEDIATE OR DEFERRED MODE
TM.WAK==17B23 ;ALL TTY WAKE BITS
TM.BKE==17B23 ;BREAK ON EVERYTHING
TM.FWK==14B23 ;FORMAT CONTROLS WAKE
TM.FCS==14B23 ;FORMAT AND NON-FORMAT CONTROLS
TM.GAG==1B26!1B27 ;ADVISE AND LINK
TM.ASC==1B29 ;ASCII OR BINARY
TM.ATE==3B29 ;(320) disable translation on output
;FLAGS FOR DEVICE CHARACTERISTICS
HASDIR==4 ;DEVICE HAS DIRECTORY
MTADEV==20 ;DEVICE IS MAGTAPE
DTADEV==100 ;DEVICE IS DECTAPE
PTRDEV==200 ;DEVICE IS PAPERTAPE READER
PTPDEV==400 ;DEVICE IS PAPERTAPE PUNCH
TTYDEV==1B32
DSKDEV==200000 ;DEVICE IS DISC
MAXERR==10 ;RETRIES WHEN READING MAGTAPE
USRLVL==3 ;LEVEL PERMITTED FOR COMPAT FUNCTION 6
USRMXC==2 ;[356] MAXIMUM CHANNEL AVAILABLE FOR COMPAT 6
.HSLOC=400000 ;DEFAULT (NORMAL) HISEG LOCATION
DDTLOC=770000 ;START ADDRESS OF DDT
MAXPAT==764000 ;FIRST ADDRESS WE CAN'T USE
B18==400000 ;HANDY ABBREVIATION FOR SIGN BIT
TTYDSG==400000 ;TTY DESIGNATOR FORMAT
MAXIOL==7000 ;BIGGEST DUMP I/O LIST TOPS-20 WILL BUY
MAXFRU==3 ;# OF ^C'S BEFORE BOMBING PAT
WHEEL==1B18 ;PROCESS CAPABILITY BIT
OPER==1B19 ;PROCESS CAPABILITY BIT
MAINT==1B21 ;PROCESS CAPABILITY BIT
PRIJFN==100 ;PRIMARY INPUT JFN
PROJFN==101 ;PRIMARY OUTPUT JFN
PPNLH==4 ;LH OF PPN RETURNED BY GETPPN AND GETTAB
MAXDIR==^D1000 ;# OF ILLEGAL DIR'S BEFORE EOF
;/A1/STDPRT=005000,,0 ;STANDARD FILE PROTECTION
STDPRT=077000,,0 ;/A1/STANDARD FILE PROTECTION
FDBCTL==1 ;FILE DESCRIPTOR BLOCK DEFINITIONS
FDBPRT==4
FDBVER==7
FDBBYV==11
FDBSIZ==12
FDBCRV==13
FDBWRT==14 ;LAST WRITE OF FILE
FDBREF==15
FDBDEL==1B3
DV.DSK==1B1 ;DEVICE CHARACTERISTICS BITS
DV.LPT==1B3 ;DEVICE CHARACTERISTICS BITS
;GET THE 10/50 UUO'S INTO THE SYMBOL TABLE FOR DEBUGGING PAT
X==0
DEFINE RDEFS,<
REDEF <CALL,INIT,X,X,X,X,X,CALLI,OPEN,TTCALL,X,X,X,RENAME,IN,OUT,SETSTS,STATO>
REDEF <GETSTS,STATZ,INBUF,OUTBUF,INPUT,OUTPUT,CLOSE,RELEAS>
REDEF <MTAPE,UGETF,USETI,USETO,LOOKUP,ENTER,X>
>
DEFINE REDEF(A)<IRP A,<A=:EXP <A>>>
RDEFS
DEFINE SYSGET (X)<
MOVE A,[SIXBIT /X/]
SKIPN B,X ;HAVE WE GOTTEN THIS ALREADY?
SYSGT ;NO, GO GET IT
MOVEM B,X ;STORE IT FOR FUTURE USE
>
DEFINE SYSGTA (X)<
SKIPE A,X
JRST .+3
MOVE A,[SIXBIT/X/]
SYSGT
MOVEM A,X
>
;CORE ASSIGHMENTS
;FIRST FOR THE CODE.
PATLOC=:700000 ;PLACE WHERE COMPATIBILITY ACTUALLY RUNS
PATPAG==:PATLOC_<-^D9> ;AND AS A PAGE NUMBER TO GET THRU LOADER
FLSRLC=:600000 ;START ADR OF FILSER DATA BASE
FLSRPG==:FLSRLC_<-^D9> ;PAGE NUMBER OF START OF FILSER
LODORG==400000 ;WHERE THE LOADER WILL LEAVE "HI SEGMENT"
;STORAGE ALLOCATOR FOR TEMP STORAGE
DEFINE ALC(NAM,SIZ)
< NAM=:LC
LC==LC+SIZ
>
;VARIABLE STORAGE FOR PAT
PATVAR==732 ;[356] STORAGE AREA FOR PAT VARIABLES
TMPPAG==PATVAR ;PAGE FOR TMPCOR DATA BASE FILE
IFE FTSTAT,<STATLP==TMPPAG ;NO STATISTICS PAGE
STATGP==TMPPAG> ;NO SYSTEM STATISTICS PAGE
IFN FTSTAT,<STATLP==TMPPAG+1 ;DEFINE STATISTICS PAGE
STATGP==STATLP+1> ;DEFINE SYSTEM WIDE STATISTICS PAGE
LC==<STATGP+1>_11 ;START OF TEMPORARY PAGES
IFN FTSTAT,<
STATLC==STATLP_11 ;ADDRESS OF LOCAL STAISTICS PAGE
STATGC==STATGP_11 ;ADDRESS OF SYSTEM WIDE STATISTICS PAGE
STATFW==ST.X_^D24!ST.Y_^D12!ST.Z ;FORMAT WORD
ST.X==4 ;LENGTH OF MISC TABLE
ST.Y==200 ;LENGTH OF CALLI TABLE
ST.Z==100 ;LENGTH OF GETTAB TABLE
ST.FMT==0 ;WHERE TO STORE FORMAT WORD
ST.TCL==1 ;1-20 IS FOR TTCALL'S
ST.UUO==21 ;21-60 IS FOR UUO'S
ST.VER==61 ;COMPATIBILITY PACKAGE VERSION #
ST.ONC==62 ;# OF TIMES THRU ONCE CODE
ST.UNI==63 ;# OF UNIMPLEMENTED CALLI'S EXECUTED
ST.UEI==64 ;# OF UNEXPECTED INTERRUPTS IN PAT
ST.CLI==61+ST.X ;61+X TO 60+X+Y IS FOR CALLI'S
;60+X+Y DOWN IS FOR NEGATIVE CALLI'S
ST.GTB==61+ST.X+ST.Y ;61+X+Y TO 60+X+Y+Z IS FOR GETTAB'S
ST.TIM==60+ST.X+ST.Y+ST.Z ;OFFSET FOR TIMMING STATISTICS
>
DEFINE STAT(A,B,C)
<IFN FTSTAT,<
TLNN PF,L.LSTA ;LOCAL STATISTICS WANTED?
JRST .+3 ;NO, DONT REFERENCE THE PAGE
AOS STATLC+C(A) ;EXECUTION COUNTER
ADDM B,STATLC+ST.TIM+C(A) ;INCREMENT TIME SPENT IN UUO
TLNN PF,L.GSTA ;GLOBAL STATISTICS WANTED?
JRST .+3 ;NO, DONT REFERENCE PAGE
AOS STATGC+C(A) ;SYSTEM WIDE COUNTER
ADDM B,STATGC+ST.TIM+C(A) ;SYSTEM STATISTICS FOR UUO TIMMINGS
>>
FILPAG==600 ;FILSER STARTS AT PAGE 600
FILEND==677 ;HIGHEST PAGE OF FILSER DATA BASE
TSLOC==LC
ALC CHTABS,0
ALC JFNTAB,1 ;ONLY NEEDS 7 BITS
ALC LABDAT,15 ;FOR CHECKING TAPES FOR LABELS, ETC.
ALC MAPTAB,1 ;MAPPING INFO FOR DISK FILES
ALC BUFHTB,1 ;OUTPUT AND INPUT BUFFER HEADERS
ALC FLAGWD,1 ;INTERNAL FLGS,,FILE STATUS
ALC DEVNUM,1 ;DEVICE DESIGNATOR OF THIS DEVICE,
; FILLED IN BY INIT
ALC DEVNAM,1 ;SIXBIT DEVICE NAME FROM USER
ALC FILNAM,1 ;SIXBIT FILE NAME FROM USER
ALC EXT,1 ;SIXBIT FILE EXT (3 CHARS) FROM USER
ALC DIRNUM,1 ;DIRECTORY NUMBER
ALC PROT,1 ;PROTECTION VALUE (TOPS-20 STYLE)
ALC IOBYTP,1 ;POINTER TO NEXT WORD IN FILE
ALC NOMFDC,0 ;# OF ILLEGAL DIR NUMBERS PASSED OVER
ALC IOEOFP,1 ;POINTER TO EOF FOR DISK FILES
ALC MTADAT,0 ;MAGTAP INFORMATION (DEFSTR'S BELOW)
ALC MFDPT,1 ;DIRECTORY COUNT FOR MFD READING
NTABS==LC-CHTABS
MAXCHN==17 ;HIGHEST REGULAR CHANNEL
ALC CHTABN,<MAXCHN*NTABS>
ALC HIBWRD,1 ;LAST HIBERNATE FLAGS
ALC WAKEF,1 ;-1 = AN EVENT OCCURED FORCING HIBER TO WAKE UP
ALC IOWATF,1 ;WAITING FOR IO TO HAPPEN
ALC SAVMOD,1 ;SAVED TELETYPE MODE
ALC CHTEND,0 ;ABOVE HERE CLEARED BY CALLI 0.
;MAGTAP DEFSTRS
DEFSTR (MTADEN,MTADAT(BB),35,4) ;DENSITY
DEFSTR (MTADM,MTADAT(BB),31,4) ;DATA MODE
DEFSTR (MTABYT,MTADAT(BB),27,6) ; [357] OPEN BYTE SIZE (^D36 MAX)
ALC JOB,1 ;TSS JOB #
ALC NJOBS,1 ;NUMBER OF JOBS
ALC HGHSGN,1 ;NUMBER OF THE HIGH SEG FOR THIS JOB
IFN FTFILSER,<
ALC TOPNBL,3 ;OPEN BLOCK FOR FILSER
>
ALC CCIENB,1 ;CONTROL-C INTERCEPT IS ENABLED
ALC CCIFLG,1 ;CONTROL-C INTERCEPT IS IN PROGRESS
ALC FRUSTC,1 ;NUMBER OF TIMES ^C HAS BEEN HIT
ALC FIRPTY,1 ;FIRST PTY IN TTYJOB TABLE (SETUP BY ONCE)
ALC TTINPT,1 ;PUTTER POINTER FOR TTCALL BUFFER
ALC TTOUPT,1 ;GETTER POINTER FOR TTCALL BUFFER
ALC TTCNT,1 ;BYTE COUNT,TTCALL INPUT BUFFER
ALC OTTCNT,1 ;NUMBER OF CHARS IN LAST LINE (FOR TTCALL 10)
TTMAXC==100*4 ;MAXIMUM # OF CHARS IN TTBUF
ALC TTBUF,100 ;TTCALL INPUT BUFFER
ALC TTBUFE,0 ;END OF TTBUF
ALC TTLINE,1 ;LINE PRESENT FOR TTCALL
;**;[367] At ALC TTLINE+1, Replaced 1 line with 2 SM 16-Sep-81
ALC TTSTI,12 ;[367] STORAGE FOR TTY INFO ON ENTRY
ALC TTSTO,12 ;[367] DITTO FOR TTY INFO ON EXIT
ALC DEVNM7,2 ;SEVEN BIT DEVICE NAME
ALC FILNM7,3 ;SEVEN BIT FILE NAME (LEAVE ROOM FOR ^V'S)
ALC EXT7,2 ;SEVEN BIT EXTENSION
ALC SEE,1 ;SAVE EE AND FF DURING MYUUO'S
;**;[370] At ALC SEE+1, Added 1 line SM 1-Oct-81
ALC DVTMP,2 ;[370] AC STORE ON DEVCHR TTY CHECK
;**;[406] At ALC SEE +2L, Inserted 1 line SM 16-Nov-82
ALC TMSTMP,2 ;TEMP FOR TMSGQ
ALC BUFFER,2
ALC IAC,20 ;AC'S ON INTERRUPT
ALC ASAVE,1 ;TEMPORARY STORAGE AT INTERRUPT LEVEL
IFN FTSTAT,<
ALC NCALLI,1 ;NUMBER OF THE CALLI UUO BEING DONE
>
ALC IOBPT,1 ;BYTE POINTER FOR IN AND OUT
ALC IOCNT,1 ;COUNT FOR IN AND OUT
TMPBKL==^D120 ;LENGTH OF TMPBLK
ALC TMPBLK,TMPBKL ;TEMP BLOCK, USED FOR ENQ/DEQ
BLLEN==30
ALC STRNG1,BLLEN ;TEMP STRING STORAGE (LARGE ENOUGH FOR GETJI BLOCK)
;ALSO USED AS STACK IN CSTART ROUTINES
ALC DIRNAM,12 ;STRING SPACE FOR A DIRECTORY NAME
ALC FDBB,22
ALC LABBLK,15 ;[353] TEMP TO SAVE MTA LABEL INFORMATION
ALC JBLOCK,14 ;FOR JFN ARG LIST
;**;[366] At ALC JBLOCK +2L, Added 1 line SM 10-Sep-81
ALC MTOPIN,.MODVT+2 ;[366] STORE FOR MTOPR INFO (.MOSTA)
;/A1/ ALC RETSAV,1 ;RETURN SAVED BY PSEUDOINTERRUPT
;/A1/ ALC LV2SAV,1 ;LEVEL 2 PC SAVE WORD
ALC RETSAV,2 ;/A1/RETURN SAVED BY PSEUDOINTERRUPT
ALC LV2SAV,2 ;/A1/LEVEL 2 PC SAVE WORD
ALC LV3SAV,2 ;/SH/LEVEL 3 PC SAVE WORDS
ALC CNIWRD,1 ;SAVES OV EN AND FOV EN FOR APR CONI
ALC HSORG,1 ;ORIGIN OF HISEG (ADDRESS)
ALC JBREL,1 ;SAVED .JBREL
ALC JBHRL,1 ;SAVED .JBHRL
ALC JBDDT,1 ;COMPATIBILITY'S COPY OF .JBDDT
ALC LOWNAM,1 ;NAME OF JOB AS SET BY RUN OR SETNAM UUOS
ALC LOWDEV,1 ;DEVICE FROM WHICH LOW SEG CAME
ALC LOWPPN,1 ;PPN OF LOW SEG
ALC SEGNAM,1 ;NAME OF JOB'S HIGH SEGMENT
ALC SEGDEV,1 ;DEVICE FROM WHICH HIGH SEG CAME
ALC SEGPPN,1 ;PPN OF HIGH SEG
ALC USRENB,1 ;WHAT USER ASKED FOR ON LAST APRENB UUO
ALC EXTINF,1 ;/A3/EXTENDED INTERRUPT FLAG (SEE PSIFLP)
ALC UNMFLG,1 ;/SH2/NO UNMAP LIBOL FLAG
ALC DMPLST,2 ;MTA IO BY DUMP COMMANDS HERE
ALC STRRET,1 ;INDEX FOR COMPT. UUO TO RETURN GTJFN STRING AND POINTER
ALC MTDUMP,1 ;TEMP IN DUMP I/O
ALC SPDELC,1 ;TEMP IN DUMP I/O
ALC TMPJFN,1 ;JFN OF TMPCOR FILE
ALC FLSJFN,1 ;JFN OF FILSER DATA BASE FILE
ALC TTYFRK,1 ;FORK HANDLE FOR TTY HIBERNATE FORK
ALC TYSTAT,1 ;TTY STATUS (CONTROLLING TTY).
; SIGN IS ^O FLAG, RH IS INIT BITS
ALC CSTFLG,1 ;FLAG TO FORCE MRETN TO DO A START/REE
ALC UIIFLG,1 ;USER INTERRUPT ICC DONE FROM MRETN
ALC UIFLAG,1 ;[356] Bit n denots which channel has an interrupt
;[356] pending.
;**;[407] At ALC UIITRP, Commented 1 line SM 7-Dec-82
;[407] ALC UIITRP,USRMXC+1 ;;[407] Incorrect
ALC UTRPPC,2 ;[356] First word is thw word that is JSR'd to for
;[356] a user interrupt. The second word should
;[356] contain a JRST USRINT.
;**;[407] At ALC UITRAP, Modified 1 line SM 7-Dec-82
ALC UITRAP,USRMXC+1 ;[407] CUSER INTERRUPT TRAP ADDRESSES
ALC UIACA,1 ;PLACE TO SAVE AN AC DURING USER INT
ALC LEVTAB,3 ;PSI LEVEL TABLE
USRSAV==LEVTAB+2 ;POINTER TO USER INTERRUPT PC
ALC CHNTAB,^D36 ;PSI CHANNEL TABLE
ALC JOBNAM,1 ;STORAGE AREA FOR SYSGET MACRO
ALC TICKPS,1
ALC SNAMES,1
ALC SSIZE,1
ALC SNBLKS,1
ALC SYSVER,1
ALC PTYPAR,1
ALC SYSTAT,1
ALC TTYJOB,1
ALC DWNTIM,1 ;CEASE TIME
ALC DMAPTB,NPPN ;TABLE OF DIRECTORY NUMBERS FOR UNMAPPING
ALC LSTUFD,1 ;LAST UFD READ
ALC LSTUFJ,1 ;JFN USED TO READ LAST UFD
ALC LSTUFP,1 ;POINTER INTO UFD
ALC LSTMFP,1 ;POINTER INTO MFD
ALC LSTMFN,1 ;LAST DIR NUM USED IN MFD READ
ALC NEWJFN,1 ;JFN TO BE RELEASED AT LOOKER
ALC USRMSK,1 ;MASK OF CHANNELS DEFINED BY USER
ALC MAPLST,1 ;BIT MASK OF AVAILABLE PREFAULTING PGS
ALC MAPTOT,1 ;# OF FILES THAT ARE BEING PREFAULTED
;**;[345] INSERT AFTER DEFINITION OF MAPTOT
ALC SUCNT,1 ;[345] SIMULATED UUO COUNT
ALC FLPAC,1 ;[345] FILOP. UUO AC
ALC FLPAGL,1 ;[345] FILOP. UUO ARGUMENT BLOCK LENGTH
ALC FLPARG,1 ;[345] FILOP. UUO ARGUMENT BLOCK ADDRESS
ALC FOPAD, 1 ;[356] Address for the FILOP processing
ALC FOPFLG,1 ;[356] FILOP. flags