-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathvkabb0.mac
3502 lines (3502 loc) · 109 KB
/
vkabb0.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
;
; IDENTIFICATION
; --------------
;
; PRODUCT CODE: AC-8190B-MC
; PRODUCT NAME: CVKABB0 LSI-11 EIS INST TEST
; DATE CREATED: JULY, 1981
; MAINTAINER: DIAGNOSTIC GROUP
; AUTHOR: PERVEZ A. ZAKI
;
; Copyright (c) 1975,1977,1978
; Digital Equipment Corp., Maynard, Mass.
;
; This software is furnished to purchaser under a license for use
; on a single computer system and can be copied with inclusion
; of DEC's copyright notice only for use in such system, except
; as may otherwise be provided in writing by DEC.
;
; The information in this document is subject to change without
; notice and should not be construed as a commitment by Digital
; Equipment Corporation.
;
; DEC assumes no responsibility for the use or reliability of
; its software on equipment which is not supplied by DEC.
;_____________________________________________________________________________
;
; CONTENTS
; --------
; 1. Abstract
; 2. Requirements
; 2.1 Equipment
; 2.2 Storage
; 2.3 Preliminary programs
; 3. Loading procedure
; 4. Starting procedure
; 4.1 Control switch settings
; 4.2 Starting address
; 4.3 Program and/or operator action
; 5. Operating procedure
; 5.1 Switch settings
; 5.2 Subroutine abstracts
; 6. Errors
; 6.1 Error printout
; 6.2 Error recovery
; 7. Restrictions
; 8. Miscellaneous
; 8.1 Execution time
; 8.2 Stack pointer
; 8.3 Pass counter
; 8.4 Test number
; 8.5 Power fail
; 9. Program description
;_____________________________________________________________________________
;
; 1. Abstract
;
; This program tests the LSI-11 extended instruction set
; (ash, ashc, mul, and div) option using registers 0-5 at
; least once with each instruction. It is also checked that
; extended instructions can be interrupted (by the console
; teletype) (however this test will not be executed when bit
; 5 of $envm byte is high). The program should be run for
; at least 2 passes with all switches low. The program is
; designed to run under APT and ACT systems. When running
; under APT with bit 5 of $envm low it will be required to
; have a SLU with TTY registers having addresses of 176560-66
; and interrupt vectors of 70 for receiver and 74 for trans-
; mitter.
;
; 2. Requirements
; 2.1 Equipment
;
; LSI-11 standard computer with EIS option and 4K of memory
;
; 2.2 Storage
;
; Program storage - the routines use memory 0 - 17500
;
; 2.3 Preliminary programs
;
; None
;
; 3. Loading procedure
;
; Use standard procedure for ABS tapes.
;
; 4. Starting procedure
; 4.1 Control switch settings
;
; see 5.1 (all low for worst case testing)
;
; 4.2 Starting address
;
; After loading the program it should always be started at 200.
; If it is desired to save the pass counter then the program
; should be restarted at location restart (i.e. 222) otherwise
; the program can be restarted at 200
;
; 4.3 Program and/or operator action
; 4.3.1 Stand alone
;
; 1) place LTC switch in off position (if applicable).
; 2) load program into memory using ABS loader or XXDP+ (.R VKABB0).
; 3) set switches (see sec 5.1) all low for worst case.
; 4) type 200g if using ABS loader.
; 5) the program will loop and "END PASS" will be typed after
; completion of first pass and every 4th pass. However type
; out will be suppressed if bit 5 of location $envm is high
; 6) a minimum of two passes should always be run.
;
; 4.3.2 Under APT
;
; Load the program and start after setting the desired switches
; (see sec. 5.1). However if the diagnostic is run under APT
; with bit 5 of $envm low then it will be required that a SLU
; with TTY registers having addresses of 176560-66, and interrupt
; vectors of 70 for receiver and 74 for transmitter be present,
; it will also be required to change the pass time from 5 sec.
; to 15 seconds and the test time from 3 to 10 seconds
;
; 5. Operating procedure
; 5.1 Switch settings
;
; a 16 bit location called $swreg (i.e. location 422) has been
; used to give the following options by inserting a 1 in their
; respective positions
;
; bit # octal value function
;
; 15 100000 halt on error
; 13 020000 inhibit printout
;
; An 8 bit byte $envm (i.e. location 421) has been used to define
; the operating mode. All typeouts can be suppressed by making
; bit 5 of byte $envm high, in other words by placing a 20000 in
; location 420
;
; 5.2 Subroutine abstracts
; 5.2.1 Halt routine
;
; This routine called via jsr instruction is used each time
; an error is seen and an error message of the format given
; in sec. 6.1 is typed out unless suppressed by the switches
; defined in sec. 5.1
;
; 5.2.2 Trap catcher
; A ".+2" - "halt" sequence is repeated from 0-776 to catch
; any unexpected traps. Thus any unexpected traps or
; interrupts will halt at the vector+2.
;
; 6. Errors
; 6.1 Error printout
;
; The format is as follows:
; ADR ERRNM
;
; where:
; ADR = address of error
; ERRNM = error number
;
; in most cases the comment beside the call for halt subroutine
; tells what was being checked and what was expected. All
; printouts will be suppressed when bit 5 of location
; $envm is high. While running under APT the diagnostic
; will not support spooling of console outputs.
;
; 6.2 Error recovery
;
; Restart at 200 or 222 (see sec 4.2)
;
; 7. Restrictions
;
; None
;
; 8. Miscellaneous
; 8.1 Execution time
;
; Due to the random characteristic of the interrupt tests, the
; execution time can be 5 seconds or more per pass.However,
; normally first "END PASS" will be typed within 5 seconds and
; within 50 seconds for every consecutive 10 passes
;
; 8.2 Stack pointer
;
; Stack is initially set to 600
;
; 8.3 Pass counter
;
; A 16 bit location "$pass" (i.e. location 406) is used to keep
; pass count. It can be cleared by restarting the program at 200
;
; 8.4 Test number
;
; A 16 bit location "$testn" (i.e. location 404) is used to keep track
; of the test number. Upper byte of this location gives the iteration
; number and the lower byte the test that was being executed
;
; 8.5 Power fail
;
; The diagnostic can be power failed with no errors. To use,
; start the test as usual and power down then up at any time,
; the program should restart from test 0 after typing "POWER"
; with no errors, However if the program is stored in a MOS
; memory that can not hold data with power down then the program
; will not recover from a power fail
;
; 9. Program description
;
; This program tests all the EIS instructions of the LSI-11.
; For ash and ashc instructions every even pass is executed
; with destination mode 0 for all registers and every odd pass
; with destination mode of 67. The diagnostic does not make a
; pass with T bit set
;_____________________________________________________________________________
;
HOEP = 0 ; halt on end-of-pass
NOEISI = 0 ; no EIS-iterruptible tests
;_____________________________________________________________________________
;
;
.asect
.nlist mc, md, cnd
.list me
.title CVKABA
;
; Copyright (c) August 1975
; Digital Equipment Corporation.
; Maynard, Mass. 01754
;
; Program by Pervez Zaki
;
; This program was assembled using the PDP-11 maindec sysmac
; Package (maindec-11-DZQAC-C5), Jan. 1981.
;
$tn = 1 ;
$swr = 160000 ; halt on error, loop on test
; inhibit error typout
. = 0 ; trap catcher 0 - 776
;_____________________________________________________________________________
;
; hookS required by ACT11
;
; ;
; $svpc=. ; save PC
; . = 46 ;
; $endad ; 1) set loc.46 to address
; ; of $endad in $eop
; . = 52 ;
; .word 0 ; 2) set loc.52 to zero
; . = $svpc ; restore PC
;_____________________________________________________________________________
;
dummy = 0 ;
errnm = 1 ;
f = 51 ;
n = 176 ;
PC = %7 ;
SP = %6 ;
R5 = %5 ;
R4 = %4 ;
R3 = %3 ;
R2 = %2 ;
R1 = %1 ;
R0 = %0 ;
;
scope = 10701 ; mov PC, R1
scope1 = 10701 ; mov PC, R1
scope3 = 10703 ; mov PC, R3
sw09 = 1000 ;
sw10 = 2000 ;
sw11 = 4000 ;
sw12 = 10000 ;
type = iot ;
;
; . = 20 ;
; $type ;
;_____________________________________________________________________________
;
.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 ;
;_____________________________________________________________________________
;
.nlist ;
vect 0 ;
vect 4 ;
vect 10 ;
vect 14 ;
vect 20, $type ; type out the message
vect 24, 200 ; power fail entry
vect 30 ;
vect 34 ;
vect 40 ;
vect 44, $apthd, $endad ;
vect 50 ;
vect 54 ;
vect 60 ;
vect 64 ;
vect 70 ;
vect 74 ;
vect 100 ;
vect 104 ;
vect 110 ;
vect 114 ;
vect 120 ;
vect 124 ;
vect 130 ;
vect 134 ;
vect 140 ;
vect 144 ;
vect 150 ;
vect 154 ;
vect 160 ;
vect 164 ;
vect 170 ;
vect 174 ;
.list ;
;_____________________________________________________________________________
;
. = 200 ; starting of the program
mov #$pwrdn, @#24 ; prepare to service power down routine
mov #$devct, R0 ; prepare to initialize the stack
2$: clr -(R0) ;
cmp #$mail, R0 ;
bne 2$ ;
restrt: jmp begin ;
;
.nlist ;
vect 230 ;
vect 234 ;
vect 240 ;
vect 244 ;
vect 250 ;
vect 254 ;
vect 260 ;
vect 264 ;
vect 270 ;
vect 274 ;
vect 300 ;
vect 304 ;
vect 310 ;
vect 314 ;
vect 320 ;
vect 324 ;
vect 330 ;
vect 334 ;
vect 340 ;
vect 344 ;
vect 350 ;
vect 354 ;
vect 360 ;
vect 364 ;
vect 370 ;
vect 374 ;
.list ;
;_____________________________________________________________________________
;
. = 400 ;
.sbttl apt mailbox-etable ;
.even ;
$mail: ; mailbox
$msgty: .word 0 ; amsgty ; message type code
$fatal: .word 0 ; afatal ; fatal error number
$testn: .word 0 ; atestn ; test number
$pass: .word 0 ; apass ; pass count
$devct: .word 0 ; adevct ; device count
$unit: .word 0 ; aunit ; I/O unit number
$msgad: .word 0 ; amsgad ; message address
$msglg: .word 0 ; amsglg ; message length
$etable: ; APT environment table
$env: .byte 0 ; aenv ; environment byte
$envm: .byte 0 ; aenvm ; environment mode bits
$swreg: .word 0 ; aswreg ; APT switch register
$usur: .word 0 ; ausur ; user switches
$cpuop: .word 0 ; acpuop ; 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
; bit 8 - memory management
$etend: ;
;_____________________________________________________________________________
;
; .mexit
; .sbttl APT parameter block
;
; Set locations 24 and 44 as required for APT
;
; .$x = . ; save current location
; . = 24 ; set power fail to point to start
; 200 ; of program for APT start up
; . = 44 ; point to APT indirect address pntr.
; $apthdr ; point to APT header block
; . = .$x ; reset location counter
;_____________________________________________________________________________
;
; Setup APT parameter block as defined in the APT-PDP-11 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 3 ; run tim of longest test
$pastm: .word 5 ; run time in secs. of 1st pass on 1 unit (quick verify)
$unitm: .word 0 ; additional run time (secs) of a pass for each additional unit
.word $etend-$mail/2 ; length mailbox-etable (words)
;
. = $apthd ;
count: .blkw 1 ;
psword: .blkw 1 ;
temp1: .blkw 1 ;
temp2: .blkw 1 ;
temp3: .blkw 1 ;
temp4: .blkw 1 ;
temp5: .word 0 ;
temp6: .word 0 ;
typcnt: .byte 0 ;
$tpcnt: .byte 0 ;
;
s0: .word 7 ;
s1: .word -7 ;
s2: .word s1 ;
s3: .word -6 ;
s4: .word -1 ;
s5: .word 40000 ;
s6: .word s5 ;
s7: .word 40000 ;
s8: .word -2 ;
s9: .word 2 ;
s10: .word s9 ;
s11: .word 2 ;
ttyout: .word 64 ;
$tpb: .word 177566 ;
$tps: .word 177564 ;
$crlf: .asciz <15><12><40><40><40> ;
power: .asciz <12><15>"POWER" ;
;_____________________________________________________________________________
;
.nlist ;
vect 530 ;
vect 534 ;
vect 540 ;
vect 544 ;
vect 550 ;
vect 554 ;
vect 560 ;
vect 564 ;
vect 570 ;
vect 574 ;
.list ;
;
. = 600 ;
begin: mov #$testn, R5 ; make R5 point to the location $testn
clr @#count ; clear the counter
mov #1, (R5) ; initialize test number
mov #begin, SP ; ** stack at begin **
mtps #0 ; place #0 in PSW
;
bitb #1, @#$env ; are we under APT?
beq 2$ ; if not then go to 2$
mov #$tps+2, R0 ; otherwise set for other SLU
mov #176564, -(R0) ;
mov #176566, -(R0) ;
mov #74, -(R0) ;
2$: mov #1, @#temp1 ; temp1 = 1
clr @#temp2 ; temp2 = 0
mov #1, @#temp3 ; temp3 = 1
clr @#temp4 ; temp4 = 0
;_____________________________________________________________________________
;
; TESTS 1-36 - ash instruction tests
;
start: scope1 ;
mov @#temp1, R0 ; load R0 with the contents of temp1
bit #1, @#$pass ; is it an even pass?
bne 2$ ; if not then go to 2$
mov @#temp2, R1 ; otherwise execute the instruction
; in mode 0 using R1
ash R1, R0 ;
br 4$ ;
2$: ash temp2, R0 ; shift R0 by the number
4$: mfps @#psword ; specified by temp2
cmpb @#temp4, @#psword ; is the PSW = temp4?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 1 ; the PSW is not equal to 0
;
inc @#count ; increment the counter
cmp @#temp3, R0 ; is the result in R0 equal to temp3?
beq .+10 ;
6$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 2 ; either incorrect R0 or incorrect sequence
;
cmp (R5), @#count ; is the test number equal to the
; counter?
bne 6$ ; if not go to the halt above
inc (R5) ;
scope1 ;
cmp (R5), #37 ; has the contents of registers been
bge 8$ ; shifted left by 14. and right by 14.?
inc @#temp2 ;
asl temp3 ; shift temp3 left
cmp (R5), #20 ; has the contents of registers
bne reg1 ; been shifted left by 14.?
jmp negat ; if so go to negat and
; initiate right shift
8$: jsr PC, tst37 ; if so go and continue
;
reg1: scope3 ; the rest of the program
mov @#temp1, R1 ; load R1 with the contents of temp1
bit #1, @#$pass ; is it an even pass?
bne 2$ ; if not then go to 2$
mov @#temp2, R2 ; otherwise execute ash instruction
ash R2, R1 ; in mode 0 using R1
br 4$ ;
2$: ash temp2, R1 ; shift R1 by the number
4$: mfps @#psword ; specified by temp2
cmpb @#temp4, @#psword ; is the PSW = temp4?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 3 ; the PSW is not equal to 0
;
inc @#count ; increment the counter
cmp @#temp3, R1 ; is the result in R1 equal to temp3?
beq .+10 ;
6$: jsr PC, $hlt ; seen an error. go to the halt routine
.word 4 ; either incorrect R1 or incorrect sequence
;
cmp (R5), @#count ; is the test number equal to the counter?
bne 6$ ; if not go to the halt above
inc (R5) ;
scope3 ;
cmp (R5), #37 ; has the contents of registers been
bge 8$ ; shifted left by 14. and right by 14.?
;
inc @#temp2 ;
asl temp3 ; shift temp3 left
cmp (R5), #20 ; has the contents of registers been
bne reg2 ; shifted left by 14.?
jmp negat ; if so go to negat and
; initiate right shift
8$: jsr PC, tst37 ; if so go and continue
; the rest of the program
reg2: scope1 ;
mov @#temp1, R2 ; load R2 with the contents of temp1
bit #1, @#$pass ; is it an even pass ?
bne 2$ ; if not then go to 2$
mov @#temp2, R3 ; otherwise execute ash instruction
ash R3, R2 ; in mode 0 using R2
br 4$ ;
2$: ash temp2, R2 ; shift R2 by the number
4$: mfps @#psword ; specified by temp2
cmpb @#temp4, @#psword ; is the PSW = temp4?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 5 ;
;
inc @#count ;
cmp @#temp3, R2 ; is the result in R2 equal to temp3?
beq .+10 ;
6$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 6 ; either incorrect R2 or incorrect sequence
;
cmp (R5), @#count ; is the test number equal to the counter?
bne 6$ ; if not go to the halt above
inc (R5) ;
scope1 ;
cmp (R5), #37 ; has the contents of registers been
bge 8$ ; shifted left by 14, and right by 14.?
inc @#temp2 ;
asl temp3 ; shifted temp3 left
cmp (R5), #20 ; has the contents of registers been
bne reg3 ; shifted left by 14.?
jmp negat ; if so go to negat and initiate right shift
8$: jsr PC, tst37 ; if so go and continue the rest of the program
;
reg3: scope1 ;
mov @#temp1, R3 ; load R3 with the contents of temp1
bit #1, @#$pass ; is it an even pass?
bne 2$ ; if not then go to 2$
mov @#temp2, R4 ; otherwise execute ash instruction
ash R4, R3 ; in mode 0 using R3
br 4$ ;
2$: ash temp2, R3 ; shift R3 by the number
4$: mfps @#psword ; specified by temp2
cmpb @#temp4, @#psword ; is the PSW = temp4?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 7 ; the PSW is not equal to 0.
;
inc @#count ;
cmp @#temp3, R3 ; is the result in R3 equal to temp3?
beq .+10 ;
6$: jsr PC, $hlt ; seen an error, go to the halt routine
10 ; either incorrect R3 or incorrect sequence
;
cmp (R5), @#count ; is the test number equal to the counter?
bne 6$ ; if not go to the halt above
inc (R5) ;
scope1 ;
cmp (R5), #37 ; has the contents of registers been
bge 8$ ; shifted left by 14, and right by 14.?
inc @#temp2 ;
asl temp3 ; shift temp3 left?
cmp (R5), #20 ; has the contents of registers
bne reg4 ; been shifted left by 14.?
br negat ; if so go to negat and initiate right shift
8$: jsr PC, tst37 ; if so go and continue the rest of the program
;
reg4: scope3 ;
mov @#temp1, R4 ; load R4 with the contents of temp1
mov R5, R1 ; save R5
bit #1, @#$pass ; is it an even pass?
bne 2$ ; if not then go to 2$
mov @#temp2, R5 ; otherwise execute ash instruction in mode 0
ash R5, R4 ; using R4
br 4$ ;
2$: ash temp2, R4 ; shift R4 by the number
4$: mfps @#psword ; specified by temp2
cmpb @#temp4, @#psword ; is PSW = temp4?
beq .+10 ;
jsr PC, $hlt ; :seen an error, go to the halt routine
.word 11 ; the ps is not equal to 0
inc @#count ;
cmp @#temp3, R4 ; is the result in R4 equal to temp3?
beq .+10 ;
6$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 12 ; either incorrect R4 or incorrect sequence
mov R1, R5 ; restore R5
cmp (R5), @#count ; is the test number equal to the counter?
bne 6$ ; if not go to the halt above
inc (R5) ;
scope1 ;
cmp (R5), #37 ; has the contents of registers been
bge 8$ ; shifted left by 14. and right by 14.?
;
inc @#temp2 ;
asl temp3 ; shift temp3 left
cmp (R5), #20 ; has the contents of register
bne reg5 ; been shifted by 14.?
br negat ; if so go to negat and initiate right shift
8$: jsr PC, tst37 ; if so go and continue the rest of the program
;
reg5: scope1 ;
mov R5, R1 ; save R5
mov @#temp1, R5 ; load R5 with the contents of temp1
bit #1, @#$pass ; is it an even pass ?
bne 2$ ; if not then go to 2$
mov @#temp2, R0 ; otherwise execute ash instruction
ash R0, R5 ; in mode 0 using R5
br 4$ ;
2$: ash temp2, R5 ; shift R5 by the number specified by temp2
4$: mfps @#psword ;
cmpb @#temp4, @#psword ; is PSW = temp4?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 13 ; the ps is not equal to 0
;
inc @#count ;
cmp @#temp3, R5 ; is the result in R5 equal to temp3?
beq .+10 ;
6$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 14 ; either incorrect R5 qr incorrect sequence
;
cmp (R1), @#count ; is the test number equal to the counter?
bne 6$ ; if not go to the halt above
mov R1, R5 ; restore R5
inc (R5) ;
scope1 ;
cmp (R5), #37 ; has the contents of registers been
bge 8$ ; shifted left by 14. and right by 14.?
; if so go and continue
inc @#temp2 ; the rest of the program
asl temp3 ; shift temp3 left
cmp (R5), #20 ; has the contents of registers been shifted left by 14.?
beq negat ; if so go to negat and initiate right shift
br 10$ ;
8$: jsr PC, tst37 ;
10$: jmp start ; go back to start
negat: mov #40000, @#temp1 ; temp1 = 40000
mov #177762, @#temp2 ; temp2=1 77762
mov #1, @#temp3 ; temp3=1
jmp start ;
;_____________________________________________________________________________
;
tst37: cmp (R5), #37 ; is it test 37?
bne tst40 ; if not then try test 40
clr @#temp1 ;
mov #16., @#temp2 ; 0 shifted by 16
clr @#temp3 ; is=0
mov #4, @#temp4 ; and PSW=4
rts PC ;
;
tst40: cmp (R5), #40 ; is it test 40?
bne tst41 ; if not then try test 41
clr @#temp2 ; 0 shifted by 0=0 and ps=4
rts PC ;
;
tst41: cmp (R5), #41 ; is it test 41?
bne tst42 ; if not then try test 42
mov #-16., @#temp2 ; shifted by -16. =0 and ps=4
rts PC ;
;
tst42: cmp (R5), #42 ; is it test 42?
bne tst43 ; if not then try test 43
mov #100000, @#temp1 ;
inc @#temp2 ; 100000 shifted by -15
dec @#temp3 ; is=-1 and ps=10
mov #10,@#temp4 ;
rts PC ;
;
tst43: cmp (R5), #43 ; is it test 43?
bne tst44 ; if not then try test 44
mov #125252, @#temp1 ;
mov #-1, @#temp2 ; 125252 shifted by -1
mov #152525, @#temp3 ; is=152525 and ps=10
rts PC ;
;
tst44: cmp (R5), #44 ; is it test 44?
bne tst45 ; if not then try test 45
mov #1, @#temp2 ; 125252 shifted by 1
mov #52524, @#temp3 ; is=52524 and ps=3
mov #3, @#temp4 ;
rts PC ;
;
tst45: cmp (R5), #45 ; is it test 45?
bne tst46 ; if not then try test 46
mov #-2, @#temp2 ; 125252 shifted by -2
mov #165252, @#temp3 ; is=165252 and ps=11
mov #11, @#temp4 ;
rts PC ;
;
tst46: cmp (R5), #46 ; is it test 46?
bne tst47 ; if not then try test 47
mov #-1, @#temp1 ;
mov #16., @#temp2 ; -1 shifted by 15.
clr @#temp3 ; is=0 and ps=7
mov #7, @#temp4 ;
rts PC ;
;
tst47: cmp (R5), #47 ; is it test 47?
bne tst50 ; if not then try test 50
dec @#temp2 ; -1 shifted by 15
mov #100000, @#temp3 ; is=100000 and ps=11
mov #11, @#temp4 ;
rts PC ;
;
tst50: cmp (R5), #50 ; is it test 50
bne ent51 ; if not then try test 51
mov #137777, @#temp1 ; 137777 shifted by 15.
mov #13, @#temp4 ; is=100000 and ps=13
rts PC ;
;_____________________________________________________________________________
;
ent51: cmp (R5), #51 ; is it entering test 51?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 15 ; test number goofed
;
tst (SP)+ ; restore stack pointer
mov #-7, R4 ;
mov #s1, R2 ;
mov #s2, R3 ;
;_____________________________________________________________________________
;
; TEST 51 - LSI-11 ash 125252 shifted by #5 = 52500 ps = 3
;
tst51: scope1 ;
mov #125252, R1 ; load R1 with 125252
ash #5, R1 ; shift R1 by #5
mfps @#psword ; save ps
;
cmpb #3, @#psword ; is the ps 3?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 16 ; the ps is not equal to 3
;
cmp #52500, R1 ; is the result 52500?
beq .+10 ;
1$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 17 ; R1 is not equal to 52500
; or incorrect sequence
cmp (R5), #51 ; is $testn = #51
bne 1$ ; if not then go to hlt above
inc (R5) ;
;_____________________________________________________________________________
;
; TEST 52 - LSI-11 ash 125252 shifted by @s2 = 177525 ps = 10
;
tst52: scope1
mov #125252, R0 ; load R0 with 125252
ash @s2, R0 ; shift R0 by @s2
mfps @#psword ; save ps
cmpb #10, @#psword ; is the ps 10?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 20 ; the ps is not equal to 10
;
cmp #177525, R0 ; is the result 177525?
beq .+10 ;
1$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 21 ; R0 is not equal to 177525
; or incorrect sequence
cmp (R5), #52 ; is $testn = #52
bne 1$ ; if not then go to hlt above
inc (R5) ;
;_____________________________________________________________________________
;
; TEST 53 - LSI-11 ash 125252 shifted by @#s1 = 177525 ps = 10
;
tst53: scope1 ;
mov #125252, R0 ; load R0 with 125252
ash @#s1, R0 ; shift R0 by @#s1
mfps @#psword ; save ps
cmpb #10, @#psword ; is the ps 10?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 22 ; the ps is not equal to 10
;
cmp #177525, R0 ; is the result 177525?
beq .+10 ;
1$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 23 ; R0 is not equal to 177525
; or incorrect sequence
cmp (R5), #53 ; is $testn = #53
bne 1$ ; if not then go to hlt above
inc (R5) ;
;_____________________________________________________________________________
;
; TEST 54 - LSI-11 ash 125252 shifted by (R2) = 177525 ps = 10
;
tst54: scope1 ;
mov #125252, R0 ; load R0 with 125252
ash (R2), R0 ; shift R0 by (R2)
mfps @#psword ; save ps
cmpb #10, @#psword ; is the ps 10?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 24 ; the ps is not equal to 10
;
cmp #177525, R0 ; is the result 177525?
beq .+10 ;
1$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 25 ; R0 is not equal to 177525 or incorrect sequence
;
cmp (R5), #54 ; is $testn = #54
bne 1$ ; if not then go to hlt above
inc (R5) ;
;_____________________________________________________________________________
;
; TEST 55 - LSI-11 ash 125252 shifted by (R2)+ = 177525 ps = 10
;
tst55: scope1 ;
mov #125252, R0 ; load R0 with 125252
ash (R2)+, R0 ; shift R0 by (R2)+
mfps @#psword ; save ps
cmpb #10, @#psword ; is the ps 10?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 26 ; the ps is not equal to 10
;
cmp #177525, R0 ; is the result 177525?
beq .+10 ;
1$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 27 ; R0 is not equal to 177525 or incorrect sequence
;
cmp (R5), #55 ; is $testn = #55
bne 1$ ; if not then go to hlt above
inc (R5) ;
;_____________________________________________________________________________
;
; TEST 56 - LSI-11 ash 125252 shifted by -(R2)+ = 177525 ps = 10
;
tst56: scope1 ;
mov #125252, R0 ; load R0 with 125252
ash -(R2), R0 ; shift R0 by -(R2)
mfps @#psword ; save ps
cmpb #10, @#psword ; is the ps 10?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 30 ; the ps is not equal to 10
;
cmp #177525, R0 ; is the result 177525?
beq .+10 ;
1$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 31 ; R0 is not equal to 177525 or incorrect sequence
;
cmp (R5), #56 ; is $testn = #56
bne 1$ ; if not then go to hlt above
inc (R5) ;
;_____________________________________________________________________________
;
; TEST 57 - LSI-11 ash 125252 shifted by 2(R3) = 177525 ps = 11
;
tst57: scope1 ;
mov #125252, R0 ; load R0 with 125252
ash 2(R3), R0 ; shift R0 by 2(R3)
mfps @#psword ; save ps
cmpb #11, @#psword ; is the ps 11?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 32 ; the ps is not equal to 10
;
cmp #177252, R0 ; is the result 177525?
beq .+10 ;
1$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 33 ; R0 is not equal to 177525 or incorrect sequence
;
cmp (R5), #57 ; is $testn = #57
bne 1$ ; if not then go to hlt above
inc (R5) ;
;_____________________________________________________________________________
;
; TEST 60 - LSI-11 ash 125252 shifted by @(R3) = 177525 ps = 10
;
tst60: scope1 ;
mov #125252, R0 ; load R0 with 125252
ash @(R3), R0 ; shift R0 by @(R3)
mfps @#psword ; save ps
cmpb #10, @#psword ; is the ps 10?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 34 ; the ps is not equal to 10
;
cmp #177525, R0 ; is the result 177525?
beq .+10 ;
1$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 35 ; R0 is not equal to 177525 or incorrect sequence
;
cmp (R5), #60 ; is $testn = #60
bne 1$ ; if not then go to hlt above
inc (R5) ;
;_____________________________________________________________________________
;
; TEST 61 - LSI-11 ash 125252 shifted by @(R3)+ = 177525 ps = 10
;
tst61: scope1 ;
mov #125252, R0 ; load R0 with 125252
ash @(R3)+, R0 ; shift R0 by @(R3)+
mfps @#psword ; save ps
cmpb #10, @#psword ; is the ps 10?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 36 ; the ps is not equal to 10
;
cmp #177525, R0 ; is the result 177525?
beq .+10 ;
1$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 37 ; R0 is not equal to 177525 or incorrect sequence
;
cmp (R5), #61 ; is $testn = #61
bne 1$ ; if not then go to hlt above
inc (R5) ;
;_____________________________________________________________________________
;
; TEST 62 - LSI-11 ash 125252 shifted by @-(R3) = 177525 ps = 10
;
tst62: scope1 ;
mov #125252, R0 ; load R0 with 125252
ash @-(R3), R0 ; shift R0 by @-(R3)
mfps @#psword ; save ps
cmpb #10, @#psword ; is the ps 10?
beq .+10 ;
jsr PC, $hlt ; seen an error, go to the halt routine
.word 40 ; the ps is not equal to 10
;
cmp #177525, R0 ; is the result 177525?
beq .+10 ;
1$: jsr PC, $hlt ; seen an error, go to the halt routine
.word 41 ; R0 is not equal to 177525 or incorrect sequence
;
cmp (R5), #62 ; is $testn = #62
bne 1$ ; if not then go to hlt above
inc (R5) ;
;_____________________________________________________________________________
;
; TEST 63-157 - ashc instruction tests
;
mov #62, @#count ;
clr @#temp1 ; temp1=0
mov #1, @#temp2 ; temp2=1
clr @#temp3 ; temp3=0
clr @#temp4 ; temp4=0
mov #1, @#temp5 ; temp5=1
clr @#temp6 ; 0:1 shifted by 0=0:1, ps=0
;
reg01: scope3 ;