-
Notifications
You must be signed in to change notification settings - Fork 25
/
fkthb0.mac
5246 lines (5203 loc) · 204 KB
/
fkthb0.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
; Originally was compiled by MACY-11, an assembler running on the PDP-10.
; The source is adapted to be translated by regular MACRO-11.
;
; IDENTIFICATION
; --------------
; Product code: AC-8054B-MC
; Product name: CFKTHB0 PDP 11/34 MEM MGMT
; Date: June 22, 1978
; Maintainer: Diagnostic Engineering
; Author: Diagnostic Engineering
;
; The information in this document is subject to change without notice
; and should not be construed as a commitment by Digital Equipment
; Corporation. Digital Equipment Corporation assumes no responsibility
; for any errors that may appear in this document.
;
; The software described in this document is furnished to the purchaser
; under a license for use on a single computer system and can be copied
; (with inclusion of digital's copyright notice) only for use in such
; system, except as may otherwise be provided in writing by Digital.
;
; Digital Equipment Corporation assumes no responsibility for the use
; or reliability of its software on equipment that is not supplied
; by Digital.
;
; Copyright (c) 1977, 1978 by Digital Equipment Corporation
;
; PROGRAM HISTORY
;
; Date Revision Reason for revision
;
; 31-Jan-77 A First release
; 28-Jun-78 B Hardware fault not detected
;
;
; TABLE OF CONTENTS
;
; 1.0 Program information
; 1.1 Abstract
; 1.2 Requirements
; 1.3 Related documents and standards
; 1.4 Preliminary programs
;
; 2.0 Operating instructions
; 2.1 Loading procedures
; 2.2 Starting procedures
; 2.3 Operational switch settings
; 2.4 Loading the switch register
; 2.5 Execution times
;
; 3.0 Error information
; 3.1 Error reporting procedures
; 3.2 Interpreting error reports
; 3.3 Sample error report
;
; 4.0 Miscellaneous information
; 4.1 ACT/APT/XXDP compatability
; 4.2 End-of-pass message
; 4.3 T-bit trapping
; 4.4 Power failure handling
; 4.5 Physical bus address construction
;
; 5.0 Program description
; 5.1 Subroutines used by this program
; 5.2 Program listing
; 5.3 Using the program to diagnose a fault
;
; 1.0 Program information
; 1.1 Abstract
;
; This program was designed using a "bottom up" approach
; starting with the smallest segment of memory management
; logic possible and building to cover all of the logic.
; The diagnostic will provide enough information such that
; by deduction, the failure can be isolated to a small
; segment of the memory management logic.
;
; The program begins by testing some of the internal CPU
; data and address paths and address detection logic, then
; works outward through the memory management registers.
; After the registers are found to be useable, relocation
; (construction of physical addresses from a virtual address
; and the associated PAR/PDR information) is tested followed
; by testing of the abort and status segments of logic.
; Finally, checks of special abort sequences and testing of
; the mfpi/mtpi instructions are done.
;
; 1.2 Requirements
;
; A PDP 11/34 processor with a minimum of 16kW of memory
; and a console terminal are required to run the program
; unless the program is running under APT or ACT in which
; case the console terminal is not necessary.
;
; 1.3 Related documents and standards
;
; 1. ACT11/XXDP programming specification
; 2. Standard apt system to a pdp11 diagnostic interface
; 3. Diagnostic engineering standards and conventions
; 4. PDP-11 maindec sysmac package
; 5. XXDP user's manual
;
; 1.4 Preliminary programs
;
; Before this memory management diagnostic is run, the
; following CPU diagnostics should be run:
;
; md-11-dfkaa PDP-11/34 basic cpu tests
; md-11-dfkab PDP-11/34 traps tests
;
; Also, one of the main memory diagnostics should be run
; to scan at least the first 16k to see that a program
; can be executed.
;
; 2.0 Operating instructions
; 2.1 Loading procedures
;
; The program is supplied on the diagnostic load media.
; refer to the XXDP user's manual for further information.
; For use with ACT or APT, refer to their respective
; documents. The program can also be directly loaded
; using the absolute loader and the binary paper tape.
;
; 2.2 Starting procedures
;
; The program is started by loading address 200 and
; starting. If the processor has the optional programmer's
; console, the switch register should be set according to
; section 2.3 before the program is started. If there
; is no hardware switch register, the program will use the
; software switch register at location 176 (location 174
; will be used as the software display register). In that case
; the program will ask for the initial switch register
; value by typing "swr = xxxxxx" "new= " after typing
; the name of the program (xxxxxx = the octal contents of
; location 176). (see section 2.4)
;
; Also the program can be made to use the software switch
; reg. even if the hardware switch reg. is present by loading
; "177777" into the hardware switch reg. before starting
; the program.
;
; 2.3 Control switch settings
;
; Switch Octal Use
;
; sw15 100000 Halt on error
; This switch when set will halt
; the processor when an error is
; detected after the error message
; has been typed. pressing continue
; will resume testing (see section
; 3.1 about loading the switch reg
; before continuing).
;
; sw14 040000 Loop on test
; This switch when set will
; cause the program to loop on
; the current subtest.
;
; sw13 020000 Inhibit error typeouts
; This switch when set will
; inhibit the typing of error
; messages.
;
; sw12 010000 Inhibit trace trap
; This switch when set will
; Inhibit T-bit trapping which
; normally takes place during
; every other pass starting
; with the third pass.
;
; sw11 004000 Inhibit subtest iterations
; This switch when set inhibits
; iterations of each subtest after
; the first pass. If this switch
; is not set, each subtest is run
; 200. times.
;
; sw10 002000 Bell on error
; This switch when set will ring
; the console terminal bell when
; an error has been detected.
;
; sw9 001000 Loop on error
; This switch when set will
; cause the program to loop on the
; first failure which is encountered
; even if the failure is intermittant
;
; sw8 000400 Loop on test in swr <7:0>
; This switch when set will
; cause the program to loop on the
; test whose test number is set
; in bits 7-0 of the switch reg.
;
; 2.4 Loading the switch register
;
; The hardware switch register provided when the optional
; programmer's console is present is loaded directly from
; the console keypad by depressing the "lsr" key. The
; value of the hardware switch reg. can be changed any
; time whether the program is running or not.
;
; To load the software switch reg. while the program is
; running, a control g (^g) should be typed on the console
; terminal. (the "scope" and "error" routines check to see
; if a ^g has been typed.) The original value of the software
; switch reg. will be requested as mentioned in section 2.2.
;
; In response to a ^g or at the beginning of the program, the
; program will type:
;
; swr = xxxxxx new =
;
; where "xxxxxx" is the current octal contents of loc. 176.
; The operator may then type any one of the following:
;
; - xxxxxx<cr> one to six octal digits followed by a
; carriage return which will be loaded as the new
; value for the switch reg.
; - <cr> just a <cr>, leaves the switch reg. as it is.
;
; - xxx^u, a control-u (^u) will cause all of the
; digits typed so far to be ignored.
;
; - ^c will cause the program to type the present
; test and pass numbers, request a new value
; for the switch reg., and jump to the end-
; of-pass routine so the program will go directly
; to the next pass with a new sw. reg. value
;
; - <ill.char> any character typed which is not any of the
; above or an octal digit will cause the program
; to type a "?<crlf>" and react as though a
; ^u had been typed.
;
; NOTE: recognition of a ^g may be hampered by
; ----- execution of a couple "reset" instructions
; within the program.
;
; 2.5 Execution times
;
; The run time for a single pass with no iterations
; or trace trapping is approximately 5 seconds.
;
; The run time for a single pass with iterations
; and trace trapping enabled is approximately 3 1/4 minutes.
;
; 3.0 Error information
;
; 3.1 Error reporting procedures
;
; If an error is detected, the program will trap to the
; error handling routine ($error). The value of bits
; 15, 13, 10, and 9 in the switch register are considered
; in reporting an error (see section 2.3). the
; error information will be typed unless sw13 = 1.
;
; If sw15 = 1, the processor will halt after the error is
; reported. If the contents of the software switch register
; are to be changed, a ^g should be typed before pressing
; "continue" to resume testing.
;
; If sw9 = 1 (loop on error), the program will go to the
; address contained in location "$lperr". After reporting
; the error. "$lperr" is set by each "scope" call and is
; set directly during some subtests to provide the smallest
; loop for looping on error. If sw9 = 0, the program will
; return to the instruction following the error call.
; (see section 5.3 for more on "loop on error").
;
; 3.2 Interpreting error reports
;
; Every error report types the number of the test in which
; the error took place (testno) and the location of the
; error call (errorpc). These two values pinpoint the
; place in the code that the error occurred. by referring
; to the program listing, The operator can then read the
; comments associated with that particular error and subtest.
; A description of the test found in the program listing
; will also provide the operator with information on the logic
; and functions being tested.
;
; Every error report also types an error message
; giving a verbal description of the error that has
; been detected.
;
; By using the comments and test description found in
; the program listing to determine what function or
; logic was being tested, the operator can then refer
; to the engineering drawings to isolate the probable
; cause for the failure.
;
; 3.3 Sample error report
;
; Below is an example of an error which could have
; occurred during execution of the program:
;
; mem. mgmt. reg. bits not set correctly
; registr wrote read read-(binary)
; address (octal) (octal) 5432109876543210 testno errorpc
; 177572 040000 060000 0110000000000000 000012 022060
;
; We see that the error occurred in test 12 at location
; 022060. The "registr address" tells us that we were
; testing memory management's status register 0 (SR0).
; in the listing, The test description says that the
; error bits (bits <15:13>) of SR0 were being set and
; cleared individually. The error report says we tried
; to set bit 14 by writing "040000" to SR0 but when we
; read it back we read "060000". It appears that bit 13 is
; stuck at "1" or it is getting set when bit 14 is set
; to "1". Error reports before and after this one could
; tell us which is the case.
;
; 4.0 Miscellaneous information
; 4.1 ACT/APT/XXDP compatability
;
; The program is fully ACT and APT compatable
; and is supported under the xxdp package.
;
; 4.2 End-of-pass message
;
; At the end of each pass of the program the pass number
; and total number of errors since the last end-of-pass are
; reported in the end-of-pass message. for example:
;
; END OF PASS #2 TOTAL ERRORS SINCE LAST REPORT 0
;
; That would indicate that pass two was just completed
; and no errors were detected during that pass. both
; the pass number and number of errors are decimal numbers.
;
; 4.3 T-bit trapping
;
; The "T-bit" (bit 4) in the processor status word is set
; by an "rti" in the end-of-pass routine for every other pass
; beginning with the third pass (passes 3, 5, 7, 9...). T-bit
; trapping can be inhibited by setting bit 12 = 1 in the switch
; register (see section 2.4).
;
; 4.4 Power failure handling
;
; If a power fail occurs (followed by a power up). the
; message "power failure-restarting" is typed out and
; the program will restart execution at "start:" (the
; very beginning of the program). If the software
; switch register is being used. its contents will be
; restored. if there is a hardware switch register,
; there is no way to restore the value of the switch
; register so the operator must reload it from the console.
;
; 4.5 Physical bus address construction
;
; Below is a simplified diagram of how the memory
; management logic constructs a physical bus address
; using the virtual address and the page address register.
; the page descriptor register selected will contain the
; page expansion, length, and access information.
;
; 12 11 10 09 08 07 06 05 04 03 02 01 00
; --------------------------------------
; / 0 1 1 1 1 1 1 1 1 1 1 1 0/ vba*
; ---------------------------------------
; I
; (added to) I
; I
; 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 I
; ------------------------------------------------ I
; / 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1/ I par**
; ------------------------------------------------- I
; I I
; I I
; V V
; 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
; -------------------------------------------------------------------
; / 0 0 0 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0/ pba
; -------------------------------------------------------------------
;
; *= vba bits <15:13> select the appropriate PAR and PDR
; **= PSW mode bit 15 selects the user (=1) or
; kernel (=0) set of par's/pdr's
;
; 5.0 Program description
;
; 5.1 Subroutines used by this program
;
; Following is a list of the subroutines and handlers used
; by this program that are not provided by the "sysmac
; package". Details of the subroutines unique to this
; program may be found in the program listing. Refer to
; the "sysmac" document and program listing for the other
; routines.
;
; 1. Turn off T-bit and save current PSW
; 2. Turn on T-bit and restore previous PSW
; 3. Set all writeable bits in all PAR/PDR's
; 4. Read and compare kernel and user PAR/PDR's
; 5. Convert virtual address to physical address
;
; 5.2 Program listing
;
; A table of contents appears at the beginning of the listing
; which contains the names of each section, subtest, and
; routine and the line numbers corresponding to the start of
; each.
;
; Following this section of documentation is the actual
; program listing complete with subtest descriptions and
; "coding comments".
;
; 5.3 Using the program to diagnose a fault
;
; When an error occurs, one of the things that's important
; to note is what pass the error occurred on. If the pass
; number is odd and is three or greater, the error might be
; T-bit sensitive. Try running the program again with bit
; 12 of the switch reg. equal to "1" to inhibit T-bit
; trapping. If the pass number is greater than one, the
; error may be iteration sensitive. Try running the program
; again with bit 11 of the switch reg. equal to "1" to inhibit
; iterations. These hints should help you determine what makes
; the machine fail and when.
;
; If you have been running with bit 15 of the switch
; reg. equal to "0", then you are able to look at all
; the errors that may be related to the fault you are
; diagnosing. A fault in an earlier test may result in
; errors during later tests which may give you more
; clues about the nature of the fault. Now use the method
; outlined in section 3.2 for each error to gather as
; much information as possible.
;
; Now to test your ideas on the cause of the failure,
; you may want to scope this error condition. Set bit 9
; of the switch reg. equal to "1" to loop on the error.
; For an even tighter scope loop the error call can be
; replaced with a branch (refer to comments by error calls
; in the program listing).
;
; Or you could loop on the test by either setting bit 14
; of the switch reg. equal to "1" of by setting bit 08 of the
; switch reg. equal to "1" and then setting the test number
; in bits 07-00 of the switch reg. You will probably want to
; inhibit error typeouts by setting bit 13 of the switch reg.
; equal to "1".
;_____________________________________________________________________________
;
HOEP = 0 ; halt on end-of-pass
NOSCO = 0 ; no scope trap
INSWR = 000000 ; 100000 for halt on error, no gtswr
MSIM = 0 ; make test shorter for simulation
SKIP = 0 ; skip/minimize final prints
;_____________________________________________________________________________
;
.asect ;
. = 0 ; loop on test
.title CFKTHB0 PDP 11/34 MEM MGNT DIAG
.nlist cnd, mc, md
.list me ;
;_____________________________________________________________________________
;
; This program was assembled using the pdp-11 maindec sysmac
; package (maindec-11-dzqac-c3), Jan 19, 1977.
;
.sbttl "OPERATIONAL SWITCH SETTINGS"
;
; switch use
; ------ -----------------------------------
; 15 Halt on error
; 14 Loop on test
; 13 Inhibit error typeouts
; 12 Inhibit trace trap
; 11 Inhibit iterations
; 10 Bell on error
; 9 Loop on error
; 8 Loop on test in swr <7:0>
;
.sbttl "BASIC DEFINITIONS"
.macro error, code
emt code
.endm
;_____________________________________________________________________________
;
.if ne NOSCO ;
scope = 240 ; nop
.iff ;
scope = iot ; .equiv iot, scope - basic definition of scope call
.endc ;
stack = 1100 ; initial address of the stack pointer
ht = 11 ; code for horizontal tab
lf = 12 ; code for line feed
cr = 15 ; code for carriage return
crlf = 200 ; code for carriage return-line feed
ps = 177776 ; processor status word
psw = ps ;
stklmt = 177774 ; stack limit register
pirq = 177772 ; program interrupt request register
dswr = 177570 ; hardware switch register
ddisp = 177570 ; hardware display register
aptspool = 100 ;
; "switch register" switch definitions
sw15 = 100000 ;
sw14 = 40000 ;
sw13 = 20000 ;
sw12 = 10000 ;
sw11 = 4000 ;
sw10 = 2000 ;
sw09 = 1000 ;
sw08 = 400 ;
sw07 = 200 ;
sw06 = 100 ;
sw05 = 40 ;
sw04 = 20 ;
sw03 = 10 ;
sw02 = 4 ;
sw01 = 2 ;
sw00 = 1 ;
sw9 = sw09 ;
sw8 = sw08 ;
sw7 = sw07 ;
sw6 = sw06 ;
sw5 = sw05 ;
sw4 = sw04 ;
sw3 = sw03 ;
sw2 = sw02 ;
sw1 = sw01 ;
sw0 = sw00 ;
; data bit definitions (bit00 to bit15)
bit15 = 100000 ;
bit14 = 40000 ;
bit13 = 20000 ;
bit12 = 10000 ;
bit11 = 4000 ;
bit10 = 2000 ;
bit09 = 1000 ;
bit08 = 400 ;
bit07 = 200 ;
bit06 = 100 ;
bit05 = 40 ;
bit04 = 20 ;
bit03 = 10 ;
bit02 = 4 ;
bit01 = 2 ;
bit00 = 1 ;
;
bit9 = bit09 ;
bit8 = bit08 ;
bit7 = bit07 ;
bit6 = bit06 ;
bit5 = bit05 ;
bit4 = bit04 ;
bit3 = bit03 ;
bit2 = bit02 ;
bit1 = bit01 ;
bit0 = bit00 ;
;
; basic "CPU" trap vector addresses
errvec = 4 ; time out and other errors
resvec = 10 ; reserved and illegal instructions
tbitvec = 14 ; "T"-bit
trtvec = 14 ; trace trap
bptvec = 14 ; breakpoint trap (bpt)
iotvec = 20 ; input/output trap (iot) **scope**
pwrvec = 24 ; power fail
emtvec = 30 ; emulator trap (emt) **error**
trapvec = 34 ; "trap" trap
tkvec = 60 ; tty keyboard vector
tpvec = 64 ; tty printer vector
pirqvec = 240 ; program interrupt request vector
;
;_____________________________________________________________________________
;
.sbttl "MEMORY MANAGEMENT DEFINITIONS"
mmvec = 250 ; kt11 vector address
; kt11 status register addresses
sr0 = 177572 ;
sr1 = 177574 ;
sr2 = 177576 ;
sr3 = 172516 ;
; user "I" page descriptor registers
uipdr0 = 177600 ;
uipdr1 = 177602 ;
uipdr2 = 177604 ;
uipdr3 = 177606 ;
uipdr4 = 177610 ;
uipdr5 = 177612 ;
uipdSP = 177614 ;
uipdr7 = 177616 ;
; user "I" page address registers
uipar0 = 177640 ;
uipar1 = 177642 ;
uipar2 = 177644 ;
uipar3 = 177646 ;
uipar4 = 177650 ;
uipar5 = 177652 ;
uipaSP = 177654 ;
uipar7 = 177656 ;
; kernel "I" page descriptor registers
kipdr0 = 172300 ;
kipdr1 = 172302 ;
kipdr2 = 172304 ;
kipdr3 = 172306 ;
kipdr4 = 172310 ;
kipdr5 = 172312 ;
kipdSP = 172314 ;
kipdr7 = 172316 ;
; kernel "I" page address registers
kipar0 = 172340 ;
kipar1 = 172342 ;
kipar2 = 172344 ;
kipar3 = 172346 ;
kipar4 = 172350 ;
kipar5 = 172352 ;
kipaSP = 172354 ;
kipar7 = 172356 ;
;
ksp = SP ;
usp = SP ;
tbit = bit4 ;
wbit = bit6 ;
kerstk = stack ;
usestk = stack-200 ;
;_____________________________________________________________________________
;
.macro vect, offset, adr, val ;
. = offset ;
.if nb, <adr> ;
.word adr ;
.iff ;
.word .+2 ;
.endc ;
.if nb, <val> ;
.word val ;
.iff ;
.word 0 ;
.endc ;
.endm ;
;_____________________________________________________________________________
;
; all unused locations from 4-776 contain a ".+2, halt"
; sequence to catch illegal traps and interrupts
; location 0 contains 0 to catch improperly loaded vectors
;
.sbttl "TRAP CATCHER"
.nlist ;
vect 0, 0 ;
vect 4, 6 ;
vect 10, 12 ;
vect 14, 16 ;
vect 20, 22 ;
vect 24, 200 ; for apt start up
vect 30, 32 ;
vect 34, 36 ;
vect 40, 42 ; hooks required by act-11
vect 44, $apthd, $endad ; set loc.46 to address of $endad in .seop
.list ;
;_____________________________________________________________________________
;
.sbttl "act11 hooks"
.nlist ;
vect 50, 52 ; set loc.52 to zero
vect 54, 56 ;
vect 60, 62 ;
vect 64, 66 ;
vect 70, 72 ;
vect 74, 76 ;
vect 100, 102 ;
vect 104, 106 ;
vect 110, 112 ;
vect 114, 116 ;
vect 120, 122 ;
vect 124, 126 ;
vect 130, 132 ;
vect 134, 136 ;
vect 140, 142 ;
vect 144, 146 ;
vect 150, 152 ;
vect 154, 156 ;
vect 160, 162 ;
vect 164, 166 ;
vect 170, 172 ;
.list ;
;
. = 174 ;
dispreg: .word 0 ; software display register
swreg: .word INSWR ; software switch register
.sbttl "STARTING ADDRESS(ES)"
jmp @#start ; jump to starting address of program
;_____________________________________________________________________________
;
.sbttl "APT PARAMETER BLOCK"
;
; Setup APT parameter block as defined in the apt-pdp11 diagnostic interface spec.
;
$apthd:
$hibts: .word 0 ; two high bits of 18 bit mailbox addr.
$mbadr: .word $mail ; address of apt mailbox (bits 0-15)
$tstm: .word 10 ; run tim of longest test
$pastm: .word 20 ; run time in secs. of 1st pass on 1 unit (quick verify)
$unitm: .word 5 ; additional run time (secs) of a pass for each additional unit
.word $etend-$mail/2 ; length mailbox-etable(words)
;_____________________________________________________________________________
;
.nlist ;
vect 220, 222 ;
vect 224, 226 ;
vect 230, 232 ;
vect 234, 236 ;
vect 240, 242 ;
vect 244, 246 ;
vect 250, 252 ;
vect 254, 256 ;
vect 260, 262 ;
vect 264, 266 ;
vect 270, 272 ;
vect 274, 276 ;
vect 300, 302 ;
vect 304, 306 ;
vect 310, 312 ;
vect 314, 316 ;
vect 320, 322 ;
vect 324, 326 ;
vect 330, 332 ;
vect 334, 336 ;
vect 340, 342 ;
vect 344, 346 ;
vect 350, 352 ;
vect 354, 356 ;
vect 360, 362 ;
vect 364, 366 ;
vect 370, 372 ;
vect 374, 376 ;
;
vect 400, 402 ;
vect 404, 406 ;
vect 410, 412 ;
vect 414, 416 ;
vect 420, 422 ;
vect 424, 426 ;
vect 430, 432 ;
vect 434, 436 ;
vect 440, 442 ;
vect 444, 446 ;
vect 450, 452 ;
vect 454, 456 ;
vect 460, 462 ;
vect 464, 466 ;
vect 470, 472 ;
vect 474, 476 ;
vect 500, 502 ;
vect 504, 506 ;
vect 510, 512 ;
vect 514, 516 ;
vect 520, 522 ;
vect 524, 526 ;
vect 530, 532 ;
vect 534, 536 ;
vect 540, 542 ;
vect 544, 546 ;
vect 550, 552 ;
vect 554, 556 ;
vect 560, 562 ;
vect 564, 566 ;
vect 570, 572 ;
vect 574, 576 ;
;
vect 600, 602 ;
vect 604, 606 ;
vect 610, 612 ;
vect 614, 616 ;
vect 620, 622 ;
vect 624, 626 ;
vect 630, 632 ;
vect 634, 636 ;
vect 640, 642 ;
vect 644, 646 ;
vect 650, 652 ;
vect 654, 656 ;
vect 660, 662 ;
vect 664, 666 ;
vect 670, 672 ;
vect 674, 676 ;
vect 700, 702 ;
vect 704, 706 ;
vect 710, 712 ;
vect 714, 716 ;
vect 720, 722 ;
vect 724, 726 ;
vect 730, 732 ;
vect 734, 736 ;
vect 740, 742 ;
vect 744, 746 ;
vect 750, 752 ;
vect 754, 756 ;
vect 760, 762 ;
vect 764, 766 ;
vect 770, 772 ;
vect 774, 776 ;
.list ;
;_____________________________________________________________________________
;
; This table contains various common storage locations used in the program
;
. = 1100 ;
$cmtag: .word 0 ; start of common tags
$tstnm: .byte 0 ; contains the test number
$erflg: .byte 0 ; contains error flag
$icnt: .word 0 ; contains subtest iteration count
$lpadr: .word 0 ; contains scope loop address
$lperr: .word 0 ; contains scope return for errors
$erttl: .word 0 ; contains total errors detected
$itemb: .byte 0 ; contains item control byte
$ermax: .byte 1 ; contains max. errors per test
$errpc: .word 0 ; contains PC of last error instruction
$gdadr: .word 0 ; contains address of 'good' data
$bdadr: .word 0 ; contains address of 'bad' data
$gddat: .word 0 ; contains 'good' data
$bddat: .word 0 ; contains 'bad' data
.word 0 ; reservednot to be used
.word 0 ;
$autob: .byte 0 ; automatic mode indicator
$intag: .byte 0 ; interrupt mode indicator
.word 0 ;
swr: .word dswr ; address of switch register
display: .word ddisp ; address of display register
$tks: .word 177560 ; tty kbd status
$tkb: .word 177562 ; tty kbd buffer
$tps: .word 177564 ; tty printer status reg. address
$tpb: .word 177566 ; tty printer buffer reg. address
$null: .byte 0 ; contains null character for fills
$fills: .byte 2 ; contains # of filler characters required
$fillc: .byte 12 ; insert fill chars. after a "line feed"
$tpflg: .byte 0 ; insert fill chars. after a "line feed"
$regad: .word 0 ; contains the address from
; which (sreg0) was obtained
$reg0: .word 0 ; contains ((sregad)+0)
$reg1: .word 0 ; contains ((sregad)+2)
$reg2: .word 0 ; contains ((sregad)+4)
$reg3: .word 0 ; contains (($regad)+6)
$reg4: .word 0 ; contains (($regad)+10)
$reg5: .word 0 ; contains (($regad)+12)
$tmp0: .word 0 ; user defined
$tmp1: .word 0 ; user defined
$tmp2: .word 0 ; user defined
$tmp3: .word 0 ; user defined
$tmp4: .word 0 ; user defined
$tmp5: .word 0 ; user defined
$times: .word 0 ; max. number of iterations
$escape: .word 0 ; escape on error address
$bell: .asciz <207><377><377> ; code for bell
$ques: .ascii /?/ ; question mark
$crlf: .ascii <15> ; carriage return
$lf: .asciz <12> ; line feed
.sbttl "APT MAILBOX-ETABLE"
;_____________________________________________________________________________
;
.even ;
$mail: ; apt mailbox
$msgty: .word 0 ; message type code
$fatal: .word 0 ; fatal error number
$testn: .word 0 ; test number
$pass: .word 0 ; pass count
$devct: .word 0 ; device count
$unit: .word 0 ; i/o unit number
$msgad: .word 0 ; message address
$msglg: .word 0 ; message length
$etable: ; apt environment table
$env: .byte 0 ; environment byte
$envm: .byte 0 ; environment mode bits
$swreg: .word 0 ; apt switch register
$uswr: .word 0 ; user switches
$cpuop: .word 0 ; cpu type, options
; bits 15-11=cpu type
; 11/04=01, 11/05=02,
; 11/20=03, 11/40=04,
; 11/45=05, 11/70=06,
; pdq=07, q=10
; bit 10 = real time clock
; bit 9 = floating point processor
; bit 8 = memory management
;_____________________________________________________________________________
;
$mams1: .byte 0 ; high address, m.s. byte
$mtyp1: .byte 0 ; mem. type, blk#1
; mem. type byte -- (high byte)
; 900 nsec core=001
; 300 nsec bipolar=002
; 500 nsec mos=003
$madr1: .word 0 ; high address, blk#1
; mem. last addr.=3 bytes,
; this word and low of "type" above
$mams2: .byte 0 ; high address, m.s. byte
$mtyp2: .byte 0 ; mem. type, blk#2
$madr2: .word 0 ; mem. last address, blk#2
$mams3: .byte 0 ; high address, m.s. byte
$mtyp3: .byte 0 ; mem. type, blk#3
$madr3: .word 0 ; mem. last address, blk#3
$mams4: .byte 0 ; high address, m.s. byte
$mtyp4: .byte 0 ; mem. type, blk#4
$madr4: .word 0 ; mem. last address, blk#4
$vect1: .word 0 ; interrupt vector#1, bus priority#1
$vect2: .word 0 ; interrupt vector#2, bus priority#2
$base: .word 0 ; base address of equipment under test
$devm: .word 0 ; device map
$cdw1: .word 0 ; controller description word#1
$cdw2: .word 0 ; controller description word#2
$ddw0: .word 0 ; device descriptor word#0
$ddw1: .word 0 ; device descriptor word#1
$ddw2: .word 0 ; device descriptor word#2
$ddw3: .word 0 ; device descriptor word#3
$ddw4: .word 0 ; device descriptor word#4
$ddw5: .word 0 ; device descriptor word#5
$ddw6: .word 0 ; device descriptor word#6
$ddw7: .word 0 ; device descriptor word#7
$ddw8: .word 0 ; device descriptor word#8
$ddw9: .word 0 ; device descriptor word#9
$ddw10: .word 0 ; device descriptor word#10
$ddw11: .word 0 ; device descriptor word#11
$ddw12: .word 0 ; device descriptor word#12
$ddw13: .word 0 ; device descriptor word#13
$ddw14: .word 0 ; device descriptor word#14
$ddw15: .word 0 ; device descriptor word#15
;
$etend: ;
;
testno: .word 0 ; holds test number for typeouts
wasSP: .word 0 ; used to store the stack pointer after a trap
trappc: .word 0 ; used to store the PC of a trap or abort
trapps: .word 0 ; used to store the ps of a trap or abort
corsr0: .word 0 ;+ used to store the correct sr0
corsr2: .word 0 ;+ used to store the correct sr2
wassr0: .word 0 ; used to store contents of sr0
wassr2: .word 0 ; used to store contents or sr2
tbitps: .word 0 ; saves the PSW that may have its T-bit on
andadr: .word 0 ; holds result of addresses being and-ed
oradr: .word 0 ; holds result of addresses being or-ed
tonum: .word 0 ; holds number of time-outs
virt1: .word 0 ; holds virtual address to be converted
virt2: .word 0 ; holds virtual address to be converted
pbalo: .word 0 ; holds bits <15:00> of physical address
pbahi: .word 0 ; holds bits <17:16> of physical address
.sbttl "ERROR POINTER TABLE"
;_____________________________________________________________________________
;
; This table contains the information for each error that can occur.
; The information is obtained by using the index number found in
; location $itemb. This number indicates which item in the table is pertinent.
; Note1: If $itemb is 0 the only pertinent data is ($errpc).
; Note2: Each item in the table contains 4 pointers explained as follows:
;
; em ; points to the error message
; dh ; points to the data header
; dt ; points to the data
; df ; points to the data format
;
$errtb:
; item 1
em1 ; unexpected cpu trap to loc. 004
dh1 ; old PC old PSW SP was testno errorpc
dt1 ; trappc, trapps, wasSP, testno, $erppc, 0
df1 ; 0, 0, 0, 0, 0
; item 2
em2 ; unexpected mem. mgmt. trap to loc. 250
dh2 ; old PC old PSW SP was sr0 sr2 testno errorpc
dt2 ; trappc, trapps, wasSP, wassr0, wassr2, testno, $errpc,
df2 ; 0, 0, 0, 0, 0, 0, 0
; item 3
em3 ; priority bits set wrong in PSW
dh3 ; wrote read testno errorpc
dt3 ; $reg0, $reg1, testno, $errpc, 0
df3 ; 0, 0, 0, 0
; item 4
em4 ; mode bits set wrong in PSW
dh3 ; wrote read testno errorpc
dt3 ; $reg0, $reg1, testno, $errpc, 0
df3 ; 0, 0, 0, 0
; item 5
em5 ; dual addressing between hi&lo bytes of PSW
dh3 ; wrote read testno errorpc
dt3 ; $reg0, $reg1, testno, $errpc, 0
df3 ; 0, 0, 0, 0
; item 6
em6 ; kernel SP changed by writing user SP
dh3 ; wrote read testno errorpc
dt3 ; $reg0, $reg1, testno, $errpc, 0
df3 ; 0, 0, 0, 0
; item 7