   2 .CS/80 OFFLINE DIAGNOSTIC PROGRAM 7/28/86 REVISION 0.16
   4 DB &CC,50
   6 DB &BB,50
   8 DB &DD,100
  10 DB &EE,20000
  12 DB &HH,1000
  14 DB &LL,6
  16 DB &MM,16,"0123456789ABCDEF"
  18 DB &NN,20
  20 DB NN,20
  22 DB PP,10,0
  24 DB &FF,4096
  26 DB &GG,8,"CS80MSGS "
  28 FILENAME &GG(0)
  30 READFILE &EE(0),20000
  32 DB YY,7,0
  34 DB ZZ,122,-1
  36 DB WW,126,0
  38 DB &VV,30
  40 LET TIMEOUT:=5,ZZ(39):=0,WW(100):=!4800,WW(101):=!D00,ZZ(70):=0
  42 GOSUB 5806
  44 GOSUB 5534
  46 LET &VV(0):=ZZ(0):=0
  48 CPVA YY(0)
  50 GOTO 1044
  52 GOSUB 710
  54 EPRINT *&EE(W,A)
  56 GOSUB 718
  58 RETURN 
  60 LET W:=&VV(0)
  62 PRINTEX 0,&EE(310,327);&VV(1,W)
  64 RETURN 
  66 IFN YY(0) THEN 74
  68 GOSUB 52
  70 PRINTEX 0,&EE(330,363);!YY(0)
  72 END 
  74 IF YY(1) THEN 126
  76 GOSUB 52
  78 PRINTEX 0,&EE(370,414);!YY(1);
  80 PRINTEX &EE(420,431)
  82 END 
  84 IFN L THEN 88
  86 LPON 
  88 RETURN 
  90 LET WW(100):=WW(100) AND !FF00 OR ZZ(70)
  92 RETURN 
  94 BSIO XX
  96 WR !5,WW(112),P
  98 WAIT 
 100 IF Z=2 THEN 106
 102 RR !E,NAME1,WW(110)
 104 GOTO 108
 106 WR !E,NAME1,WW(110)
 108 WAIT 
 110 DSJ 122,112;Z
 112 WR !5,WW(100),3
 114 WAIT 
 116 RR !E,PP(0),20
 118 WAIT 
 120 DSJ 122;WW(10)
 122 IN H,1,1
 124 ESIO 
 126 RETURN 
 128 BSIO XX
 130 WR !5,WW(112),P
 132 WAIT 
 134 GOTO 110
 136 BSIO XX
 138 WR !12,WW(112),P
 140 WAIT 
 142 DSJ 154,144;Z
 144 WR !5,WW(100),3
 146 WAIT 
 148 RR !E,PP(0),20
 150 WAIT 
 152 DSJ 154;WW(10)
 154 IN H,1,1
 156 RSIO XX
 158 RETURN 
 160 BSIO XX
 162 DSJ 164;Z
 164 WR !5,WW(100),3
 166 WAIT 
 168 RR !E,PP(0),20
 170 WAIT 
 172 DSJ 174;Z
 174 CLEAR 
 176 WAIT 
 178 GOTO 142
 180 LET Q:=P/2,P:=P+1
 182 IFN P MOD 2 THEN 188
 184 LET WW(Q):=Z LSL 8
 186 RETURN 
 188 LET WW(Q):=WW(Q) OR Z
 190 RETURN 
 192 LET Q:=P/2,P:=P+5,R:=Q+1,S:=Q+2,T:=T LSL 1,WW(110):=T
 194 IFN P MOD 2 THEN 200
 196 LET WW(Q):=!1800,WW(R):=T LSR 8,WW(S):=T LSL 8
 198 RETURN 
 200 LET WW(Q):=WW(Q) OR !18,WW(R):=0,WW(S):=T
 202 RETURN 
 204 LET Q:=P/2,P:=P+7,R:=Q+1,S:=Q+2,T:=Q+3
 206 IFN P MOD 2 THEN 218
 208 LET Z:=VALUE2 LSL 8,WW(Q):=WW(37) LSR 8 OR !1000 OR Z
 210 LET Z:=WW(38) LSR 8,WW(R):=WW(37) LSL 8 OR Z
 212 LET Z:=WW(39) LSR 8,WW(S):=WW(38) LSL 8 OR Z
 214 LET WW(T):=WW(39) LSL 8
 216 RETURN 
 218 LET WW(Q):=WW(Q) OR !10 OR VALUE2,WW(R):=WW(37)
 220 LET WW(S):=WW(38),WW(T):=WW(39)
 222 RETURN 
 224 LET Q:=P/2,P:=P-223
 226 IFN P MOD 2 THEN 232
 228 LET WW(Q):=Z LSL 8
 230 RETURN 
 232 LET WW(Q):=WW(Q) OR Z
 234 RETURN 
 236 IFN STEP THEN 240
 238 GOSUB 52
 240 GOSUB 60
 242 PRINTEX &EE(440,458)," ",&EE(460,483)," "
 244 GOSUB 5422
 246 IFN AA(98) THEN 252
 248 IF PP(1) OR PP(2) THEN 252
 250 GOTO 254
 252 LET AA(99):=0,AA(98):=0
 254 LET W:=PP(0) LSR 12,X:=PP(0) LSR 8 MOD 16,Y:=PP(0) MOD 256
 256 PRINTEX "Unit = ";X;" Volume = ";W
 258 IF Y=255 THEN 264
 260 PRINTEX "Unit ";Y;&EE(490,506)
 262 GOTO 266
 264 PRINTEX &EE(510,539)
 266 IFN PP(1) THEN 302
 268 PRINTEX " ",&EE(540,569)," "
 270 IFN !2000 AND PP(1) THEN 274
 272 PRINTEX &EE(570,589)
 274 IFN !400 AND PP(1) THEN 278
 276 PRINTEX &EE(730,743)
 278 IFN !200 AND PP(1) THEN 282
 280 PRINTEX &EE(590,618)
 282 IFN !100 AND PP(1) THEN 286
 284 PRINTEX &EE(620,639)
 286 IFN !80 AND PP(1) THEN 290
 288 PRINTEX &EE(640,661)
 290 IFN !40 AND PP(1) THEN 294
 292 PRINTEX &EE(670,686)
 294 IFN !20 AND PP(1) THEN 298
 296 PRINTEX &EE(750,771)
 298 IFN 8 AND PP(1) THEN 302
 300 PRINTEX &EE(710,729)
 302 IFN PP(2) THEN 380
 304 PRINTEX " ",&EE(800,821),0
 306 IFN !4000 AND PP(2) THEN 314
 308 PRINTEX &EE(830,862)
 310 PRINTEX &EE(870,896)
 312 GOSUB 624
 314 IFN !1000 AND PP(2) THEN 318
 316 PRINTEX &EE(920,935)
 318 IFN !200 AND PP(2) THEN 322
 320 PRINTEX &EE(940,949)
 322 IFN !80 AND PP(2) THEN 352
 324 PRINTEX &EE(950,979)
 326 IF AA(99) THEN 352
 328 LET W:=PP(5) LSR 8,AA(99):=1
 330 IFN W THEN 334
 332 GOSUB 522
 334 LET W:=PP(5) AND !FF
 336 IFN W THEN 340
 338 GOSUB 522
 340 LET W:=PP(6) LSR 8
 342 IFN W THEN 346
 344 GOSUB 532
 346 LET W:=PP(6) AND !FF
 348 IFN W THEN 352
 350 GOSUB 532
 352 IFN !20 AND PP(2) THEN 358
 354 PRINTEX &EE(980,1008);
 356 GOTO 368
 358 IFN !10 AND PP(2) THEN 364
 360 PRINTEX &EE(1010,1041);
 362 GOTO 368
 364 IFN !8 AND PP(2) THEN 372
 366 PRINTEX &EE(1050,1078);
 368 PRINTEX &EE(1080,1121)
 370 GOSUB 514
 372 IFN 2 AND PP(2) THEN 376
 374 PRINTEX &EE(1130,1145);&EE(15050,15066)
 376 IFN 1 AND PP(2) THEN 380
 378 PRINTEX &EE(1170,1189)
 380 IFN PP(3) THEN 430
 382 PRINTEX " ",&EE(1230,1252),0
 384 IFN !8000 AND PP(3) THEN 388
 386 PRINTEX &EE(1260,1285)
 388 IFN !4000 AND PP(3) THEN 392
 390 PRINTEX &EE(1290,1306)
 392 IFN !2000 AND PP(3) THEN 396
 394 PRINTEX &EE(1310,1333)
 396 IFN !1000 AND PP(3) THEN 400
 398 PRINTEX &EE(1340,1357)
 400 IFN !800 AND PP(3) THEN 404
 402 PRINTEX &EE(1360,1384)
 404 IFN !400 AND PP(3) THEN 408
 406 PRINTEX &EE(1570,1582)
 408 IFN !80 AND PP(3) THEN 412
 410 PRINTEX &EE(1390,1416)
 412 IFN !40 AND PP(3) THEN 422
 414 PRINTEX "Unrecoverable Data"
 416 IF AA(99) THEN 422
 418 PRINTEX &EE(15070,15096)
 420 ADDR PP(5),PP(6),PP(7)
 422 IFN !10 AND PP(3) THEN 426
 424 PRINTEX &EE(1470,1492)
 426 IFN 8 AND PP(3) THEN 430
 428 PRINTEX &EE(1500,1524)
 430 IFN PP(4) THEN 502
 432 PRINTEX " ",&EE(1530,1557)," "
 434 IFN !8000 AND PP(4) THEN 440
 436 PRINTEX &EE(1600,1629)
 438 GOSUB 514
 440 IFN !4000 AND PP(4) THEN 446
 442 PRINTEX &EE(1630,1670)
 444 GOSUB 514
 446 IFN !2000 AND PP(4) THEN 452
 448 PRINTEX &EE(1680,1721)
 450 GOSUB 514
 452 IFN !1000 AND PP(4) THEN 456
 454 PRINTEX &EE(1560,1569)
 456 IFN !800 AND PP(4) THEN 460
 458 PRINTEX &EE(1730,1760)
 460 IFN !100 AND PP(4) THEN 464
 462 PRINTEX &EE(1770,1801)
 464 IFN !40 AND PP(4) THEN 468
 466 PRINTEX &EE(1810,1834)
 468 IFN !20 AND PP(4) THEN 478
 470 PRINTEX &EE(1840,1864),&EE(1870,1896),&EE(1900,1915)
 472 IF AA(99) THEN 478
 474 PRINTEX &EE(1920,1947)
 476 ADDR PP(5),PP(6),PP(7)
 478 IFN 16 AND PP(4) THEN 496
 480 PRINTEX &EE(1950,1982)
 482 PRINTEX &EE(1990,2012)
 484 PRINTEX &EE(2020,2035)
 486 IF AA(99) THEN 492
 488 PRINTEX &EE(2040,2073)
 490 ADDR PP(5),PP(6),PP(7)
 492 GOSUB 576
 494 RETURN 
 496 IFN !4 AND PP(4) THEN 504
 498 PRINT " "
 500 PRINTEX &EE(2080,2105)
 502 IF AA(98) THEN 570
 504 IF AA(99) THEN 510
 506 PRINTEX 0,&EE(2110,2132)
 508 ADDR PP(5),PP(6),PP(7)
 510 GOSUB 576
 512 RETURN 
 514 IF AA(99) THEN 520
 516 PRINT &EE(15130,15158)
 518 GOSUB 624
 520 RETURN 
 522 IFN V THEN 528
 524 PRINTEX "FRU NUMBER";W;"FAILED"
 526 GOTO 530
 528 PRINTEX "FRA NUMBER ";W;"FAILED"
 530 RETURN 
 532 IFN V THEN 538
 534 PRINTEX "SUBTEST NUMBER ";W;" FAILED"
 536 GOTO 540
 538 PRINTEX &EE(2160,2172);W;"RETURNED"
 540 RETURN 
 542 FUNCTION ADDR VALUE1,VALUE2,VALUE3
 544 LET AA(99):=1
 546 IF ZZ(70) THEN 556
 548 PRINTEX &EE(2180,2195);
 550 BCDCNVT VALUE1,VALUE2,VALUE3
 552 PRINT 0
 554 GOTO 568
 556 PRINTEX &EE(2200,2213)
 558 LET W:=VALUE1 LSL 8,W:=VALUE2 LSR 8 OR W
 560 PRINTEX "Cyl =";W
 562 LET W:=VALUE2 AND !FF
 564 PRINTEX "Head =";W
 566 PRINTEX "Sect =";VALUE3
 568 ENDF 
 570 PRINTEX &EE(15160,15174)
 572 ADDR PP(5),PP(6),PP(7)
 574 RETURN 
 576 LET &FF(0):=PP(8) LSR 8,&FF(1):=PP(8) AND !FF
 578 LET &FF(2):=PP(9) LSR 8,&FF(3):=PP(9) AND !FF
 580 IF WW(112) LSR 8=6 THEN 610
 582 IFN V THEN 588
 584 GOSUB 5588
 586 GOTO 610
 588 FOR O:=0 UNTIL 3
 590 LET W:=&FF(O)
 592 IFN W THEN 608
 594 IF W=64 THEN 600
 596 PRINTEX &EE(2220,2233);W;" RETURNED"
 598 GOTO 608
 600 PRINTEX &EE(2240,2255);
 602 LET O:=O+1,Z:=&FF(O),Y:=8
 604 GOSUB 5236
 606 PRINTEX " "
 608 NEXT 588
 610 RETURN 
 612 LET W:=Z
 614 IFN Y THEN 610
 616 LET X:=Y-1*4,Q:=W LSR X LSL 1 LSR 1 MOD 16
 618 PRINTEX &MM(Q);
 620 LET Y:=Y-1
 622 GOTO 614
 624 LET &FF(0):=PP(5) LSR 8,&FF(1):=PP(5) AND !FF,&FF(2):=PP(6) LSR 8
 626 LET &FF(3):=PP(6) AND !FF,&FF(4):=PP(7) LSR 8,&FF(5):=PP(7) AND !FF
 628 LET AA(99):=1
 630 FOR O:=0 UNTIL 5
 632 LET W:=&FF(O)
 634 IF W=255 THEN 638
 636 PRINT "Unit =";W
 638 NEXT 630
 640 RETURN 
 642 GOTO 634
 644 GETNAMEINFO NAME1,R,S,T
 646 LET Y:=0
 648 GOSUB 662
 650 LET P:=224,Z:=!20 OR ZZ(40)
 652 GOSUB 180
 654 IFN T THEN 658
 656 GOSUB 192
 658 GOSUB 204
 660 RETURN 
 662 IFN VALUE2 THEN 670
 664 LET Z:=VALUE3 LSL 8,WW(37):=VALUE4 LSR 8 OR Z
 666 LET WW(38):=VALUE4 LSL 8 OR VALUE5,WW(39):=VALUE6
 668 RETURN 
 670 LET WW(37):=VALUE3,WW(38):=VALUE4,WW(39):=VALUE5
 672 RETURN 
 674 GOSUB 224
 676 GOSUB 90
 678 GOSUB 94
 680 RSIO XX
 682 IF AA(73)=1 THEN 698
 684 IFN Z THEN 698
 686 IFN 5 LE AA(77) LE 7 THEN 694
 688 IFN PP(1) EQ PP(2) EQ PP(3) THEN 694
 690 IF PP(3) NE 0 THEN 694
 692 IFN PP(4) AND !F7FF THEN 698
 694 LET AA(79):=1
 696 GOSUB 236
 698 GOSUB 66
 700 RETURN 
 702 GOSUB 90
 704 GOSUB 128
 706 GOSUB 680
 708 RETURN 
 710 LET AA(101):=A,A:=AA(100),AA(102):=W,W:=AA(78)
 712 IF A-W<80 THEN 716
 714 LET A:=W+79
 716 RETURN 
 718 LET A:=AA(101),W:=AA(102)
 720 RETURN 
 722 RANDOM P
 724 RANDOM W
 726 RANDOM U
 728 LET S:=P,T:=X
 730 GOSUB 752
 732 LET P:=S
 734 IFN S=T THEN 750
 736 LET S:=W,T:=Y
 738 GOSUB 752
 740 LET W:=S
 742 IF S<T THEN 750
 744 LET S:=U,T:=Z
 746 GOSUB 752
 748 LET U:=S
 750 RETURN 
 752 IF T<0 THEN 760
 754 IF 0 LE S LE T THEN 764
 756 LET S:=S LSR 1
 758 GOTO 754
 760 IFN T LE S THEN 764
 762 LET S:=S LSR 1
 764 RETURN 
 766 FUNCTION READZERO 
 768 LET &VV(0):=8,&VV(1,8):="READZERO",WW(113):=!1800,WW(115):=!10
 770 LET WW(112):=!20 OR ZZ(40) LSL 8 OR !40
 772 LET WW(114):=WW(116):=WW(117):=WW(118):=WW(119):=0,P:=15
 774 GOSUB 704
 776 ENDF 
 778 FUNCTION FMT VALUE1,VALUE2,VALUE3
 780 LET &VV(0):=10,&VV(1,10):="INIT MEDIA",Z:=VALUE2
 782 IF Z=2 THEN 784
 784 LET WW(112):=!3700 OR Z,Z:=VALUE3,WW(113):=Z LSL 8,P:=3
 786 GOSUB 702
 788 ENDF 
 790 FUNCTION MC VALUE1
 792 LET &VV(0):=7,&VV(1,7):="CICLEAR",ZZ(70):=0
 794 LET WW(112):=!800,P:=1
 796 GOSUB 90
 798 GOSUB 136
 800 GOSUB 682
 802 LET AA(73):=0
 804 ENDF 
 806 FUNCTION RFSI VALUE1,NAME1
 808 LET &VV(0):=9,&VV(1,9):="RF SECTOR",WW(110):=270
 810 LET Z:=0,P:=7,WW(112):=!1800,WW(113):=!200,WW(114):=!32,WW(115):=!C000
 812 GOSUB 676
 814 ENDF 
 816 FUNCTION WFM VALUE1
 818 LET &VV(0):=8,&VV(1,8):="WRITE FM",WW(112):=!4900,P:=1
 820 GOTO 786
 822 FUNCTION DESCRIBE VALUE1,NAME1
 824 LET &VV(0):=8,&VV(1,8):="DESCRIBE"
 826 GETNAMEINFO NAME1,R,S,T
 828 LET WW(112):=!3500,P:=1,WW(110):=T LSL 1,Z:=0
 830 GOTO 812
 832 FUNCTION LOCRD VALUE1,NAME1,VALUE2,VALUE3,VALUE4,VALUE5,VALUE6
 834 LET &VV(0):=4,&VV(1,4):="READ"
 836 GOSUB 644
 838 LET Z:=0
 840 GOSUB 674
 842 GOTO 788
 844 FUNCTION LOCWR VALUE1,NAME1,VALUE2,VALUE3,VALUE4,VALUE5,VALUE6
 846 LET &VV(0):=5,&VV(1,5):="WRITE"
 848 GOSUB 644
 850 LET Z:=!2
 852 GOTO 840
 854 FUNCTION LOCVER VALUE1,VALUE2,VALUE3,VALUE4,VALUE5,VALUE6
 856 LET &VV(0):=6,&VV(1,6):="VERIFY",T:=0
 858 GOSUB 646
 860 LET Z:=!4
 862 GOSUB 224
 864 GOTO 786
 866 FUNCTION BURST VALUE1,VALUE2
 868 LET &VV(0):=5,&VV(1,5):="BURST",WW(112):=!3C00 OR VALUE2,P:=2
 870 GOTO 786
 872 FUNCTION RPS VALUE1,VALUE2,VALUE3
 874 LET &VV(0):=27,&VV(1,27):="ROTATIONAL POSITION SENSING"
 876 LET WW(112):=!3900 OR VALUE2,WW(113):=VALUE3 LSL 8,P:=3
 878 GOTO 786
 880 FUNCTION SETRETIM VALUE1,VALUE2
 882 LET &VV(0):=14,&VV(1,14):="SET RETRY TIME",Z:=VALUE2 LSR 8
 884 LET WW(112):=!3A00 OR Z,WW(113):=VALUE2 LSL 8,P:=3
 886 GOTO 786
 888 FUNCTION MASKSTAT VALUE1,VALUE2,VALUE3,VALUE4,VALUE5
 890 LET &VV(0):=11,&VV(1,11):="MASK STATUS",Z:=VALUE2 LSR 8
 892 LET WW(112):=!3E00 OR Z,Z:=VALUE3 LSR 8,WW(113):=VALUE2 LSL 8 OR Z
 894 LET Z:=VALUE4 LSR 8,WW(114):=VALUE3 LSL 8 OR Z,Z:=VALUE5 LSR 8
 896 LET WW(115):=VALUE4 LSL 8 OR Z,WW(116):=VALUE5 LSL 8,P:=9
 898 GOTO 786
 900 FUNCTION SPAREBLK VALUE1,VALUE2
 902 LET &VV(0):=5,&VV(1,5):="SPARE",WW(112):=!600 OR VALUE2,P:=2
 904 LET WW(112):=!600 OR VALUE2,P:=2
 906 GOTO 786
 908 FUNCTION SBLKDISP VALUE1,VALUE2,VALUE3,VALUE4
 910 LET &VV(0):=22,&VV(1,22):="SET BLOCK DISPLACEMENT",Z:=VALUE2 LSR 8
 912 LET WW(112):=!1200 OR Z,Z:=VALUE3 LSR 8,WW(113):=VALUE2 LSL 8 OR Z
 914 LET Z:=VALUE4 LSR 8,WW(114):=VALUE3 LSL 8 OR Z
 916 LET WW(115):=VALUE4 LSL 8,P:=7
 918 GOTO 786
 920 FUNCTION RETADMOD VALUE1,VALUE2
 922 LET &VV(0):=26,&VV(1,26):="SET RETURN ADDRESSING MODE"
 924 LET Z:=ZZ(70):=VALUE2,WW(112):=!4800 OR Z,P:=2
 926 GOTO 786
 928 FUNCTION RELEASE VALUE1
 930 LET &VV(0):=7,&VV(1,7):="RELEASE",WW(112):=!2F0E,P:=2
 932 GOSUB 702
 934 UNIT VALUE1,ZZ(40)
 936 GOTO 788
 938 FUNCTION RELDEN VALUE1
 940 LET &VV(0):=14,&VV(1,14):="RELEASE DENIED"
 942 LET WW(112):=!2F0F,P:=2
 944 GOTO 932
 946 FUNCTION LENGTH VALUE1,VALUE2,VALUE3
 948 LET &VV(0):=6,&VV(1,6):="LENGTH",Z:=VALUE2 LSR 8,WW(112):=!1800 OR Z
 950 LET Z:=VALUE3 LSR 8,WW(113):=VALUE2 LSL 8 OR Z
 952 LET WW(114):=VALUE3 LSL 8,P:=5
 954 GOTO 786
 956 FUNCTION VOLUME VALUE1,VALUE2
 958 LET &VV(0):=6,&VV(1,6):="VOLUME"
 960 LET WW(112):=VALUE2 LSL 8 OR !4000,P:=1
 962 GOTO 786
 964 FUNCTION STATUS VALUE1,NAME1
 966 LET &VV(0):=6,&VV(1,6):="STATUS"
 968 GETNAMEINFO NAME1,R,S,T
 970 LET P:=ZZ(70),WW(112):=!4800 OR P,WW(113):=!D00,P:=3
 972 LET Z:=!D,WW(110):=20
 974 GOTO 812
 976 FUNCTION SETADDR VALUE1,VALUE2,VALUE3,VALUE4,VALUE5,VALUE6
 978 LET Y:=ZZ(70):=VALUE2
 980 LET &VV(0):=11,&VV(1,11):="SET ADDRESS"
 982 LET WW(112):=!4800 OR Y,P:=226,Y:=-1
 984 GOSUB 662
 986 GOSUB 204
 988 LET P:=9
 990 GOTO 786
 992 FUNCTION CANCEL VALUE1
 994 LET &VV(0):=6,&VV(1,6):="CANCEL"
 996 LET WW(112):=!900,P:=1
 998 GOSUB 90
1000 GOSUB 136
1002 GOSUB 682
1004 GOTO 788
1006 FUNCTION LOOPBACK VALUE1,VALUE2,NAME1
1008 LET &VV(0):=8,&VV(1,8):="LOOPBACK"
1010 GETNAMEINFO NAME1,R,S,T
1012 LET T:=T LSL 1,WW(110):=T,Z:=VALUE2,WW(112):=Z LSL 8 OR !200
1014 LET WW(113):=T LSR 8,WW(114):=T LSL 8,P:=5
1016 GOSUB 90
1018 BSIO XX
1020 WR !12,WW(112),P
1022 IF Z=1 THEN 1028
1024 RR !12,NAME1,WW(110)
1026 GOTO 1030
1028 WR !12,NAME1,WW(110)
1030 GOSUB 110
1032 GOSUB 680
1034 GOTO 788
1036 FUNCTION UNIT VALUE1,VALUE2
1038 LET &VV(0):=4,&VV(1,4):="UNIT",Z:=VALUE2 LSL 8
1040 LET WW(112):=!2000 OR Z,P:=1
1042 GOTO 786
1044 DB JJ,128
1046 DB AA,103,0
1048 DB DD,128,0
1050 DB GG,1024
1052 DB HH,1024
1054 DB &AA,50
1056 DB II,1024
1058 DB FF,128,0
1060 DB EE,128
1062 PRINT &EE(15220,15261);"0.16)"
1064 GOTO 1290
1066 LET IMBNUM:=I,CHANNEL:=1
1068 SMSK !7FFF
1070 RMSK E
1072 RETURN 
1074 LET CHANNEL:=C,E:=TRUE
1076 ROCL B
1078 LET B:=B CSL C
1080 IF B AND !8000 THEN 1084
1082 LET E:=FALSE
1084 RETURN 
1086 RIOC 14,B
1088 LET B:=B AND !F,E:=TRUE
1090 IFN B THEN 1096
1092 IF B=2 THEN 1096
1094 LET E:=FALSE
1096 RETURN 
1098 IF C EQ F AND A EQ I THEN 1106
1100 PRINT &EE(4910,4969),&EE(2300,2315);3;IMBNUM," CHANNEL ";CHANNEL;
1102 PRINT "  ID=0";6;&EE(2320,2345)
1104 LET F:=C,A:=I
1106 PRINT 1;"DEVICE ";DEVICE;3;"ID=";!J;3;
1108 IFN J=!270 THEN 1114
1110 PRINT &EE(16800,16817)
1112 GOTO 1170
1114 IF J NE !204 THEN 1120
1116 PRINT "HP7911 DISC "
1118 GOTO 1170
1120 IF J NE !20A THEN 1126
1122 PRINT "HP7914 DISC "
1124 GOTO 1170
1126 IF J NE !220 THEN 1134
1128 PRINT &EE(13412,13426)
1130 LET V:=TRUE
1132 GOTO 1170
1134 IF J NE !205 THEN 1138
1136 GOTO 1170
1138 IF J NE !208 THEN 1144
1140 PRINT &EE(2350,2361)
1142 GOTO 1170
1144 IF J NE !209 THEN 1150
1146 PRINT &EE(15270,15290)
1148 GOTO 1170
1150 IF J NE !260 THEN 1156
1152 PRINT &EE(15320,15337)
1154 GOTO 1170
1156 IF J NE !212 THEN 1162
1158 PRINT &EE(15340,15353)
1160 GOTO 1170
1162 IF J NE !240 THEN 1168
1164 PRINT &EE(9490,9509)
1166 GOTO 1170
1168 PRINT &EE(15300,15317)
1170 RETURN 
1172 LET DEVICE:=D,E:=TRUE,NORESPONS:=1
1174 INIT 
1176 HIOP 
1178 PROC 
1180 GOSUB 90
1182 BSIO XX
1184 IDENT J
1186 IN H,1,1
1188 RSIO XX,,1192
1190 FOR P:=1 UNTIL 2
1192 RDRT 3,B
1194 IFN B THEN 1200
1196 NEXT 1190
1198 GOTO 1206
1200 PROC N
1202 IF !200 LE J LE !270 THEN 1214
1204 GOTO 1212
1206 HIOP 
1208 INIT 
1210 PROC N
1212 LET E:=FALSE
1214 RETURN 
1216 EPRINT *"GIC/PIC Register ";!C;" is defective"
1218 ZEROESON 
1220 IFN -1 LT F LT 2 THEN 1224
1222 PRINTEX 4;&EE(15390,15413);4;%D
1224 IFN -1 LT F LT 3 THEN 1228
1226 PRINTEX 4;&EE(15420,15442);5;%A
1228 IFN 0 LT F LT 3 THEN 1232
1230 PRINTEX 4;&EE(15450,15476);1;%B
1232 PAUSE 
1234 ZEROESOFF 
1236 RETURN 
1238 WIOC C,D
1240 RIOC C,A
1242 LET A:=A AND E
1244 IF A EQ B THEN 1248
1246 GOSUB 1216
1248 RETURN 
1250 IF J THEN 1256
1252 EPRINT *&EE(15480,15499)
1254 LET J:=FALSE
1256 GOSUB 710
1258 PRINT 3;&EE(W,A)
1260 GOSUB 718
1262 RETURN 
1264 FUNCTION ERR VALUE1,VALUE2,VALUE3
1266 PRINTEX &EE(2450,2472);VALUE1;
1268 ZEROESON 
1270 PRINTEX &EE(2480,2493);%VALUE2
1272 IF VALUE1<10 THEN 1284
1274 PRINTEX " ";
1276 IF VALUE1<100 THEN 1284
1278 PRINTEX " ";
1280 IF VALUE1<1000 THEN 1284
1282 PRINTEX " ";
1284 PRINTEX 25;&EE(2500,2513);%VALUE3
1286 ZEROESOFF 
1288 GOTO 788
1290 LET AA(78):=14160,AA(100):=14174
1292 LET F:=-1,AA(73):=1,G:=0,I:=0
1294 PCN AA(77)
1296 IF 5 LE AA(77) LE 7 THEN 1300
1298 IF AA(77)<>4 THEN 1306
1300 FOR I:=0 UNTIL 2
1302 GOSUB 1066
1304 IFN E THEN 1334
1306 FOR C:=1 UNTIL 15
1308 GOSUB 1074
1310 IFN E THEN 1328
1312 GOSUB 1086
1314 IFN E THEN 1328
1316 FOR D:=0 UNTIL 7
1318 GOSUB 1172
1320 IFN E THEN 1326
1322 GOSUB 1098
1324 LET ZZ(10):=C,ZZ(20):=D,ZZ(90):=I,G:=G+1,ZZ(80):=J,ZZ(40):=0
1326 NEXT 1316
1328 NEXT 1306
1330 IF 5 LE AA(77) LE 7 THEN 1334
1332 IF AA(77)<>4 THEN 1336
1334 NEXT 1300
1336 IF G THEN 1342
1338 PRINT &EE(2540,2561)
1340 END 
1342 PRINT &EE(4910,4969)
1344 IF G EQ 1 THEN 1444
1346 GOSUB 1350
1348 GOTO 1448
1350 LET I:=0
1352 IF 5 LE AA(77) LE 7 THEN 1356
1354 IF AA(77)<>4 THEN 1374
1356 PRINT &EE(13430,13484)
1358 INPUT I
1360 IF -1 LT I LT 3 THEN 1366
1362 PRINT &EE(13490,13519)
1364 GOTO 1350
1366 GOSUB 1066
1368 IF E THEN 1374
1370 PRINT &EE(13960,13982)
1372 GOTO 1350
1374 PRINT &EE(2670,2727),&EE(15500,15517)
1376 INPUT C,D
1378 IF 0 LT C LT 16 THEN 1384
1380 PRINT &EE(2730,2759)
1382 GOTO 1350
1384 IF -1 LT D LT 8 THEN 1390
1386 PRINT &EE(2760,2789)
1388 GOTO 1350
1390 GOSUB 1074
1392 IF E THEN 1398
1394 PRINT &EE(2790,2814)
1396 GOTO 1350
1398 GOSUB 1086
1400 IF E THEN 1406
1402 PRINT &EE(14806,14827)
1404 GOTO 1350
1406 GOSUB 1172
1408 GOTO 1416
1410 IF E THEN 1416
1412 PRINT &EE(2840,2859)
1414 GOTO 1350
1416 LET ZZ(10):=C,ZZ(20):=D,ZZ(90):=I,ZZ(80):=J
1418 GOSUB 5378
1420 IFN E THEN 1350
1422 RETURN 
1424 UNIT 0,ZZ(40)
1426 READZERO 
1428 DESCRIBE 0,&DD(0)
1430 DESCRIBE 0,DD(0)
1432 IF ZZ(80)<>!220 THEN 1440
1434 IF &DD(5)=2 THEN 1440
1436 LET V:=TRUE
1438 GOTO 1442
1440 LET V:=FALSE
1442 RETURN 
1444 GOSUB 5378
1446 IFN E THEN 1444
1448 GOSUB 1424
1450 GOSUB 90
1452 LET SECTIONS1:=!F000,L:=FALSE,AA(73):=STEP:=0,TIMEOUT:=32300
1454 PPRINT &EE(2860,2906)
1456 IFN GOPARAM1=1 THEN 1460
1458 LET L:=TRUE
1460 IFN NEWTEST THEN 1468
1462 IFN SECTIONS1 AND !C00 THEN 1468
1464 GOTO 5844
1466 PPRINT &EE(14830,14885)
1468 SECTION 1,1644
1470 GOSUB 84
1472 PRINT &EE(2910,2938)
1474 INIT 
1476 ASSIGN EE(1),1,3,4,5,6,7,8,9,!A
1478 ASSIGN FF(1),!C0,!40FF,!FF,!FF,!FE,!FF,!FF,!FFFF,!FFFF
1480 FOR STEP:=1 UNTIL 9
1482 LET F:=0,C:=EE(STEP),E:=FF(STEP)
1484 RIOC C,G
1486 LET D:=-G AND E,B:=D
1488 GOSUB 1238
1490 WIOC C,G
1492 NEXT 1480
1494 LET STEP:=10,C:=!C,D:=DEVICE+8,E:=!FF,F:=1,B:=!80 LSR DEVICE
1496 SMSK !0
1498 IOFF 
1500 GOSUB 1238
1502 WIOC !C,DEVICE
1504 ION 
1506 LET STEP:=11,C:=!F,F:=2,B:=CHANNEL LSL 3+7,E:=!7F
1508 GOSUB 1240
1510 LET STEP:=12,B:=CHANNEL LSL 3+7,F:=2,C:=!D,E:=!7F
1512 GOSUB 1240
1514 LET STEP:=13,B:=%122,C:=!E,E:=!9FFF
1516 IF 5 LE AA(77) LE 7 THEN 1520
1518 LET B:=0
1520 GOSUB 1240
1522 LET STEP:=14,J:=TRUE
1524 RIOC !B,A
1526 IFN A AND !8 THEN 1532
1528 LET AA(78):=14176,AA(100):=14210
1530 GOSUB 1250
1532 RIOC 1,A
1534 IF A AND !8 THEN 1540
1536 LET AA(78):=14212,AA(100):=14261
1538 GOSUB 1250
1540 RIOC !E,A
1542 IFN A AND !4000 THEN 1548
1544 LET AA(78):=14264,AA(100):=14311,AA(78):=47
1546 GOSUB 1250
1548 IF AA(77)<>4 THEN 1558
1550 LET A:=-A
1552 IF A AND !2000 THEN 1564
1554 LET AA(78):=3093,AA(100):=3123
1556 GOTO 1562
1558 IFN A AND !2000 THEN 1564
1560 LET AA(78):=3130,AA(100):=3163
1562 GOSUB 1250
1564 IF J THEN 1568
1566 PAUSE 
1568 LET STEP:=15,J:=TRUE
1570 INIT 
1572 WIOC 15,!88
1574 WIOC 7,!67
1576 FOR I:=0 UNTIL 15
1578 RANDOM EE(I)
1580 LET EE(I):=EE(I) AND !FF
1582 NEXT 1576
1584 WIOC 0,!4027
1586 WIOC 0,!4047
1588 FOR I:=0 UNTIL 15
1590 WIOC 0,EE(I)
1592 NEXT 1588
1594 FOR I:=0 UNTIL 15
1596 RIOC 0,FF(I)
1598 NEXT 1594
1600 CB EE(0),FF(0),16
1602 IF INDEX=-1 THEN 1616
1604 EPRINT *&EE(3170,3202)
1606 FOR I:=INDEX UNTIL 15
1608 IF EE(I)=FF(I) THEN 1612
1610 ERR I,FF(I),EE(I)
1612 NEXT 1606
1614 PAUSE 
1616 LET STEP:=14,G:=DEVICE+8,NORESPONS:=1,H:=IMBNUM LSL 7,Z:=F:=BADINTP:=0
1618 LET H:=CHANNEL LSL 3+DEVICE+H
1620 INIT 
1622 HIOP 
1624 SMSK !7FFF
1626 WIOC 12,G
1628 IF BADINTP=H THEN 1632
1630 EPRINT &EE(3210,3231),0
1632 LET BADINTP:=0
1634 INIT 
1636 LET AA(73):=1
1638 MC 0
1640 PRINT &EE(15560,15576)
1642 LPOFF 
1644 SECTION 2,1732
1646 GOSUB 84
1648 PRINT &EE(3240,3270)
1650 LET STEP:=20
1652 GOSUB 1664
1654 LET STEP:=21
1656 GOSUB 1686
1658 PRINT &EE(3280,3295),0
1660 LPOFF 
1662 GOTO 1732
1664 LET J:=0,AA(73):=1,A:=48
1666 FOR I:=-1 STEP 2 UNTIL 253
1668 LET JJ(J):=I LSL 8+I+1,J:=J+1
1670 NEXT 1666
1672 LOOPBACK 0,1,JJ(0)
1674 IF Z EQ 0 AND XX(A) EQ 0 THEN 1684
1676 LET B:=256-XX(A)
1678 EPRINT *&EE(3300,3315);B;&EE(14929,14958)
1680 GOSUB 242
1682 PAUSE 
1684 RETURN 
1686 LET C:=0
1688 LOOPBACK 0,0,FF(0)
1690 IF Z EQ 0 AND XX(A) EQ 0 THEN 1702
1692 LET B:=256-XX(A)
1694 EPRINT *&EE(3350,3364);B;&EE(14959,14985)
1696 IF Z<>2 THEN 1702
1698 PRINTEX &EE(3400,3422)
1700 GOTO 1724
1702 FOR I:=0 UNTIL 127
1704 IF C=10 THEN 1724
1706 LET G:=FF(I) XOR JJ(I)
1708 IFN G THEN 1720
1710 LET C:=C+1
1712 PRINTEX &EE(3430,3443);I;
1714 ZEROESON 
1716 PRINTEX &EE(3450,3473);%G
1718 ZEROESOFF 
1720 NEXT 1702
1722 IF C EQ 0 AND Z EQ 0 THEN 1728
1724 PAUSE 
1726 LET AA(73):=1
1728 MC 0
1730 RETURN 
1732 SECTION 3,1766
1734 GOSUB 84
1736 LET STEP:=30,AA(78):=14350,AA(100):=14364
1738 PRINT &EE(3480,3508)
1740 UNIT 0,15
1742 IF Z THEN 1754
1744 LET &VV(0,7):="SELFTEST"
1746 LET WW(112):=!3300,WW(113):=!100,WW(114):=0,STEP:=30,P:=4
1748 LET AA(78):=14350,AA(100):=14364,&VV(1,4):="DIAG",&VV(0):=4
1750 GOSUB 702
1752 IFN Z THEN 1756
1754 PAUSE 
1756 LET AA(73):=1
1758 UNIT 0,ZZ(40)
1760 MC 0
1762 PRINT &EE(3540,3555),0
1764 LPOFF 
1766 SECTION 4,1910
1768 LET AA(78):=363,AA(100):=364
1770 GOSUB 84
1772 GOTO 1780
1774 GOSUB 242
1776 PAUSE 
1778 RETURN 
1780 PRINT &EE(3560,3588)
1782 LET STEP:=40,WW(112):=!1800,WW(113):=0,WW(114):=!201,AA(73):=1
1784 GOSUB 90
1786 BSIO XX
1788 WR !5,WW(112),6
1790 WAIT 
1792 RR !E,EE(0),2
1794 WAIT 
1796 DSJ 1798;Z
1798 IN H,1,1
1800 RSIO XX
1802 STATUS 0,PP(0)
1804 IF PP(1) AND !400 THEN 1812
1806 IF PP(2) AND !1 OR PP(4) AND !2000 THEN 1782
1808 EPRINT *&EE(3590,3625)
1810 GOSUB 1774
1812 LET STEP:=41
1814 UNIT 0,3
1816 IF PP(1) AND !200 THEN 1824
1818 IF PP(2) AND !1 OR PP(4) AND !2000 THEN 1814
1820 EPRINT *&EE(3630,3665)
1822 GOSUB 1774
1824 LET STEP:=42,A:=2
1826 IF &DD(5)=2 THEN 1836
1828 SETADDR 0,1,0,!F00,0,0
1830 IF PP(1) AND !100 THEN 1836
1832 IF PP(2) AND !1 OR PP(4) AND !2000 THEN 1828
1834 GOTO 1842
1836 SETADDR 0,0,0,!F00,0,0
1838 IF PP(1) AND !100 THEN 1848
1840 IF PP(2) AND !1 OR PP(4) AND !2000 THEN 1836
1842 RETADMOD 0,0
1844 EPRINT *&EE(3670,3705)
1846 GOSUB 1774
1848 LET STEP:=43,WW(112):=!3E20,WW(113):=!12,P:=9
1850 LET WW(114):=!BB00,WW(115):=WW(116):=0
1852 GOSUB 702
1854 IF PP(1) AND !80 THEN 1862
1856 IF PP(2) AND !1 OR PP(4) AND !2000 THEN 1848
1858 EPRINT *&EE(3710,3747)
1860 GOSUB 1774
1862 LET STEP:=44,WW(112):=!4810,P:=1
1864 GOSUB 702
1866 IF PP(1) AND !40 THEN 1874
1868 IF PP(2) AND !1 OR PP(4) AND !2000 THEN 1862
1870 EPRINT *&EE(3750,3788)
1872 GOSUB 1774
1874 LET STEP:=45,WW(112):=!1800,WW(113):=0,WW(114):=!602
1876 BSIO XX
1878 WR !5,WW(112),6
1880 WAIT 
1882 RR !E,EE(0),6
1884 WAIT 
1886 DSJ 1888;Z
1888 IN H,1,1
1890 RSIO XX
1892 STATUS 0,PP(0)
1894 IF PP(1) AND !20 THEN 1902
1896 IF PP(2) AND !1 OR PP(4) AND !2000 THEN 1874
1898 EPRINT *&EE(3790,3828)
1900 GOSUB 1774
1902 UNIT 0,ZZ(40)
1904 MC 0
1906 PRINT &EE(3870,3885),0
1908 LPOFF 
1910 SECTION 5,2540
1912 GOSUB 84
1914 PRINT &EE(3890,3922)
1916 GOTO 1968
1918 LET X:=DD(15),Y:=DD(16),Z:=DD(17)-8
1920 GOSUB 722
1922 LET A:=FF(5):=P,B:=FF(6):=W,C:=FF(7):=U,D:=0
1924 RETURN 
1926 LET X:=0,Y:=DD(12) LSR 8,I:=DD(12) LSL 8,J:=DD(12) LSR 8,Z:=I OR J
1928 GOSUB 722
1930 LET A:=W,B:=U,FF(5):=B LSR 8,FF(6):=B LSL 8
1932 RANDOM I
1934 LET S:=I AND !FF,T:=DD(13) AND !FF
1936 GOSUB 752
1938 LET C:=S,FF(6):=FF(6) OR C
1940 RANDOM I
1942 LET S:=I AND !FF,T:=DD(14) AND !FF,T:=T-8
1944 GOSUB 752
1946 LET D:=FF(7):=S
1948 RETURN 
1950 LET E:=0
1952 FOR F:=INDEX UNTIL 1023
1954 IF E=11 THEN 1964
1956 IF GG(F)=HH(F) THEN 1962
1958 ERR F,HH(F),GG(F)
1960 LET E:=E+1
1962 NEXT 1952
1964 LET AA(79):=1
1966 RETURN 
1968 LET STEP:=60,AA(73):=1
1970 STATUS 0,PP(0)
1972 IF Z THEN 1986
1974 STATUS 0,PP(0)
1976 IF Z THEN 1986
1978 FOR I:=1 UNTIL 4
1980 IF PP(I) THEN 1986
1982 NEXT 1978
1984 GOTO 2002
1986 IF PP(2) AND 1 THEN 1970
1988 IFN PP(4) AND !2000 THEN 1994
1990 RELEASE 0
1992 GOTO 1970
1994 EPRINT *&EE(3930,3959)
1996 IF Z<>2 THEN 2000
1998 PRINTEX &EE(16550,16573)
2000 PAUSE 
2002 LET STEP:=61,AA(73):=AA(79):=0,AA(78):=13530,AA(100):=13562
2004 LENGTH 0,0,!800
2006 GOSUB 1918
2008 LOCVER 0,0,A,B,C,D
2010 IFN AA(79) THEN 2014
2012 PAUSE 
2014 LET STEP:=62,A:=2
2016 LET AA(78):=13564,AA(100):=13594
2018 IF &DD(5)=2 THEN 2026
2020 GOSUB 1926
2022 LET I:=1
2024 GOSUB 2034
2026 LET I:=0
2028 GOSUB 1918
2030 GOSUB 2034
2032 GOTO 2058
2034 RETADMOD 0,I
2036 LOCRD 0,GG(0),I,A,B,C,D
2038 IF Z THEN 2050
2040 LOCRD 0,HH(0),I,A,B,C,D
2042 IF Z THEN 2050
2044 CB GG(0),HH(0),1024
2046 IF INDEX=-1 THEN 2056
2048 EPRINT *&EE(13564,13594)
2050 LET F:=2048-XX(55)
2052 PRINTEX F;&EE(4070,4098)
2054 PAUSE 
2056 RETURN 
2058 LET STEP:=63,A:=2
2060 LET AA(78):=13596,AA(100):=13627
2062 FOR I:=0 UNTIL 1023
2064 RANDOM GG(I)
2066 NEXT 2062
2068 IF &DD(5)=2 THEN 2076
2070 GOSUB 1926
2072 LET I:=1,AA(79):=0
2074 GOSUB 2084
2076 GOSUB 1918
2078 LET I:=0,AA(79):=0
2080 GOSUB 2084
2082 GOTO 2112
2084 RETADMOD 0,I
2086 LOCRD 0,II(0),I,A,B,C,D
2088 IF Z THEN 2108
2090 LOCWR 0,GG(0),I,A,B,C,D
2092 LET F:=2048-XX(55)
2094 LOCRD 0,HH(0),I,A,B,C,D
2096 CB GG(0),HH(0),1024
2098 IF INDEX=-1 THEN 2104
2100 PRINTEX F;&EE(4140,4170)
2102 GOSUB 1950
2104 LOCWR 0,II(0),I,A,B,C,D
2106 IFN AA(79) THEN 2110
2108 PAUSE 
2110 RETURN 
2112 LET STEP:=64,A:=DD(0),AA(78):=13630,AA(100):=13653
2114 FOR I:=1 UNTIL 15
2116 LET A:=A LSR 1
2118 IFN A AND 1 THEN 2130
2120 UNIT 0,I
2122 IF Z THEN 2126
2124 STATUS 0,PP(0)
2126 LET C:=PP(0) LSR 8,B:=C AND !F
2128 IF I NE B OR Z NE 0 THEN 2136
2130 NEXT 2114
2132 UNIT 0,ZZ(40)
2134 IFN Z THEN 2140
2136 PRINTEX &EE(4210,4223);I;" was ";B
2138 PAUSE 
2140 LET STEP:=65,B:=0,AA(78):=13656,AA(100):=13681
2142 VOLUME 0,0
2144 IF Z THEN 2148
2146 STATUS 0,PP(0)
2148 LET B:=PP(0) LSR 12
2150 IF B EQ 0 AND Z EQ 0 THEN 2156
2152 PRINTEX &EE(4290,4311);B
2154 PAUSE 
2156 LET STEP:=66,A:=2,AA(78):=13683,AA(100):=13709
2158 IF &DD(5)=2 THEN 2166
2160 GOSUB 1926
2162 LET I:=1,AA(79):=0
2164 GOSUB 2174
2166 GOSUB 1918
2168 LET I:=AA(79):=0
2170 GOSUB 2174
2172 GOTO 2194
2174 SETADDR 0,I,A,B,C,D
2176 IF Z THEN 2180
2178 STATUS 0,PP(0)
2180 CB FF(5),PP(5),3
2182 IFN INDEX=-1 THEN 2186
2184 IFN AA(79) THEN 2192
2186 PRINTEX 0,"Expect ";
2188 ADDR FF(5),FF(6),FF(7)
2190 PAUSE 
2192 RETURN 
2194 LET STEP:=67,A:=2,AA(78):=13712,AA(100):=13749
2196 IF &DD(5)=2 THEN 2204
2198 GOSUB 1926
2200 LET I:=1,AA(79):=0
2202 GOSUB 2212
2204 RANDOM C
2206 LET I:=A:=B:=D:=AA(79):=FF(5):=FF(6):=0,FF(7):=C:=C AND !FFF
2208 GOSUB 2212
2210 GOTO 2224
2212 SETADDR 0,I,A,B,C,D
2214 SBLKDISP 0,0,0,1
2216 IF Z THEN 2220
2218 STATUS 0,PP(0)
2220 LET FF(7):=FF(7)+1
2222 GOTO 2180
2224 LET STEP:=68,AA(79):=0
2226 LET AA(78):=13750,AA(100):=13775
2228 RANDOM J
2230 LET J:=J AND !FE+1
2232 LENGTH 0,0,J
2234 LET WW(112):=!3400,G:=2
2236 GOSUB 90
2238 BSIO XX
2240 WR !5,WW(112),G
2242 WAIT 
2244 RR !E,EE(0),J
2246 WAIT 
2248 GOSUB 142
2250 IFN AA(79) THEN 2256
2252 PRINTEX &EE(4420,4438);J,&EE(4440,4463);XX(13)
2254 PAUSE 
2256 LET STEP:=69,AA(79):=0,AA(78):=13806,AA(100):=13830
2258 GOSUB 1918
2260 LOCRD 0,II(0),0,A,B,C,D
2262 IF Z THEN 2300
2264 FOR H:=112 UNTIL 118
2266 LET EE(H):=WW(H)
2268 NEXT 2264
2270 LET E:=P
2272 BURST 0,1
2274 IF Z THEN 2300
2276 LET &VV(0,7):="WRBURST ",G:=1,EE(118):=EE(118) OR 2,&VV(0):=7
2278 GOSUB 2304
2280 GOSUB 682
2282 LET &VV(0,7):="RRBURST ",G:=0,EE(118):=EE(118) AND !FF00,&VV(0):=7
2284 GOSUB 2304
2286 GOSUB 682
2288 CB GG(0),HH(0),1024
2290 IF INDEX=-1 THEN 2294
2292 GOSUB 1950
2294 BURST 0,0
2296 LOCWR 0,II(0),0,A,B,C,D
2298 IFN AA(79) THEN 2328
2300 PAUSE 
2302 GOTO 2328
2304 GOSUB 90
2306 BSIO XX
2308 WR !5,EE(112),E
2310 WAIT 
2312 IF G=1 THEN 2318
2314 RB !E,GG(0),2048,256
2316 GOTO 2320
2318 WB !E,GG(0),2048,256
2320 JUMP 2324
2322 JUMP 2310
2324 WAIT 
2326 GOTO 142
2328 LET STEP:=70,A:=15,AA(79):=0
2330 LET AA(78):=13832,AA(100):=13861
2332 MASKSTAT 0,!100,0,0,0
2334 LET AA(73):=1,J:=DD(A)+1,B:=Z
2336 SETADDR 0,0,J,0,0,0
2338 IFN PP(1) AND !100 THEN 2350
2340 IF B THEN 2344
2342 EPRINT *&EE(4560,4590)
2344 PRINTEX &EE(4600,4645)
2346 PAUSE 
2348 GOTO 2352
2350 IF B THEN 2346
2352 LET AA(73):=0,STEP:=71,A:=2,AA(78):=13863,AA(100):=13893
2354 IF &DD(5)=2 THEN 2362
2356 GOSUB 1926
2358 LET I:=1,J:=AA(79):=0
2360 GOSUB 2370
2362 GOSUB 1918
2364 LET I:=AA(79):=0,J:=0
2366 GOSUB 2370
2368 GOTO 2406
2370 SETADDR 0,I,A,B,C,D
2372 IF Z THEN 2376
2374 STATUS 0,PP(0)
2376 LET EE(5):=PP(5),EE(6):=PP(6),EE(7):=PP(7)
2378 RETADMOD 0,J
2380 RETADMOD 0,I
2382 IF Z THEN 2386
2384 STATUS 0,PP(0)
2386 FOR G:=5 UNTIL 7
2388 IF EE(G)<>PP(G) THEN 2394
2390 NEXT 2386
2392 IF AA(79)=0 THEN 2404
2394 PRINTEX 0,&EE(4690,4698);
2396 ADDR EE(5),EE(6),EE(7)
2398 PRINTEX 0,"Final ";
2400 ADDR PP(5),PP(6),PP(7)
2402 PAUSE 
2404 RETURN 
2406 LET STEP:=73,I:=8,AA(79):=0,AA(78):=14041,AA(100):=14070
2408 RANDOM J
2410 IF J>30000 THEN 2408
2412 IF J<0 THEN 2408
2414 SETRETIM 0,J
2416 IF Z<>0 THEN 2426
2418 GOSUB 1918
2420 LOCRD 0,EE(0),0,A,B,C,D
2422 SETRETIM 0,DD(I)
2424 IFN AA(79) THEN 2428
2426 PAUSE 
2428 LET STEP:=74
2430 BSIO XX
2432 IDENT J
2434 IN H,1,1
2436 RSIO XX
2438 IF J EQ ZZ(80) THEN 2448
2440 EPRINT *&EE(4760,4783)
2442 PRINTEX &EE(4790,4818);!J
2444 PRINTEX &EE(4820,4848);!ZZ(80)
2446 PAUSE 
2448 LET STEP:=75,AA(78):=13895,AA(100):=13917
2450 RELEASE 0
2452 IFN Z THEN 2456
2454 PAUSE 
2456 LET STEP:=76,AA(78):=13919,AA(100):=13948
2458 RELDEN 0
2460 IFN Z THEN 2464
2462 PAUSE 
2464 LET STEP:=80,A:=2,AA(79):=0
2466 IFN &DD(5)=2 THEN 2504
2468 LET AA(78):=13985,AA(100):=14015
2470 GOSUB 1918
2472 LOCRD 0,II(0),0,A,B,C,D
2474 IF Z THEN 2502
2476 LOCWR 0,FF(0),0,A,B,C,D
2478 WFM 0
2480 LET AA(73):=1
2482 LOCRD 0,GG(0),0,A,B,C,D
2484 LET AA(73):=0
2486 IF PP(3) AND !10 THEN 2498
2488 IF AA(79)=1 THEN 2492
2490 EPRINT *&EE(13985,14015)
2492 PRINTEX &EE(5040,5058)
2494 PAUSE 
2496 GOTO 2504
2498 LOCWR 0,II(0),0,A,B,C,D
2500 IFN AA(79) THEN 2504
2502 PAUSE 
2504 LET STEP:=90,A:=2,AA(79):=0
2506 IF &DD(5)=2 THEN 2530
2508 LET AA(78):=14017,AA(100):=14039
2510 RANDOM J
2512 RANDOM I
2514 LET J:=J AND !FE+1,I:=I AND !FE+1
2516 RPS 0,I,J
2518 IF Z THEN 2528
2520 GOSUB 1918
2522 LOCRD 0,GG(0),0,A,B,C,D
2524 RPS 0,0,0
2526 IFN AA(79) THEN 2530
2528 PAUSE 
2530 PRINT &EE(5090,5105),0
2532 LET AA(73):=1
2534 UNIT 0,ZZ(40)
2536 MC 0
2538 LPOFF 
2540 SECTION 6,5370
2542 LET AA(73):=1,AA(98):=0
2544 DB EE,2048,0
2546 LET AA(73):=0,STEP:=0,AA(79):=0
2548 PRINT &EE(5110,5133)
2550 LET A:=ZZ(20),AA(62):=A+64,AA(39):=A+32,B:=1 LSL A,AA(54):=128/B
2552 LET AA(13):=A,AA(9):=AA(25):=AA(59):=AA(3):=AA(4):=AA(5):=0
2554 LET AA(21):=1
2556 PRINT &EE(5140,5155)
2558 LET AA(70):=0,K:=0,&CC(0,10):="           "
2560 INPUT &CC(0,10)
2562 IF &CC(0)="A" THEN 2592
2564 IF &CC(0)="C" THEN 2596
2566 IF &CC(0)="D" THEN 2618
2568 IF &CC(0)="E" THEN 2628
2570 IF &CC(0)="F" THEN 2642
2572 IF &CC(0)="H" THEN 2652
2574 IF &CC(0)="I" THEN 2658
2576 IF &CC(0)="P" THEN 2664
2578 IF &CC(0)="R" THEN 2670
2580 IF &CC(0)="S" THEN 2692
2582 IF &CC(0)="T" THEN 2706
2584 IF &CC(0)="U" THEN 2712
2586 IF &CC(0)="W" THEN 2726
2588 PRINT &EE(5180,5197)
2590 GOTO 2556
2592 CB &CC(0),&EE(111),7
2594 IF INDEX=-1 THEN 3072
2596 CB &CC(0),&EE(0),6
2598 IF INDEX=-1 THEN 2736
2600 CB &CC(0),&EE(8),4
2602 IF INDEX=-1 THEN 3628
2604 CB &CC(0),&EE(14),7
2606 IF INDEX=-1 THEN 2746
2608 CB &CC(0),&EE(23),7
2610 IF INDEX=-1 THEN 2786
2612 CB &CC(0),&EE(32),10
2614 IF INDEX=-1 THEN 2794
2616 GOTO 2588
2618 CB &CC(0),&EE(44),4
2620 IF INDEX=-1 THEN 2840
2622 CB &CC(0),&EE(780),8
2624 IF INDEX=-1 THEN 5658
2626 GOTO 2588
2628 CB &CC(0),&EE(50),6
2630 IF INDEX=-1 THEN 2884
2632 CB &CC(0),&EE(58),7
2634 IF INDEX=-1 THEN 3086
2636 CB &CC(0),&EE(67),4
2638 IF INDEX=-1 THEN 3178
2640 GOTO 2588
2642 CB &CC(0),&EE(73),9
2644 IF INDEX=-1 THEN 3186
2646 CB &CC(0),&EE(258),6
2648 IF INDEX=-1 THEN 2944
2650 GOTO 2588
2652 CB &CC(0),&EE(84),4
2654 IF INDEX=-1 THEN 3248
2656 GOTO 2588
2658 CB &CC(0),&EE(90),10
2660 IF INDEX=-1 THEN 2944
2662 GOTO 2588
2664 CB &CC(0),&EE(102),6
2666 IF INDEX=-1 THEN 3204
2668 GOTO 2588
2670 CB &CC(0),&EE(121),7
2672 IF INDEX=-1 THEN 3216
2674 CB &CC(0),&EE(130),3
2676 IF INDEX=-1 THEN 3232
2678 CB &CC(0),&EE(135),9
2680 IF INDEX=-1 THEN 3330
2682 CB &CC(0),&EE(146),6
2684 IF INDEX=-1 THEN 3652
2686 CB &CC(0),&EE(154),7
2688 IF INDEX=-1 THEN 3272
2690 GOTO 2588
2692 CB &CC(0),&EE(163),7
2694 IF INDEX=-1 THEN 3368
2696 CB &CC(0),&EE(172),5
2698 IF INDEX=-1 THEN 3384
2700 CB &CC(0),&EE(179),5
2702 IF INDEX=-1 THEN 3404
2704 GOTO 2588
2706 CB &CC(0),&EE(186),6
2708 IF INDEX=-1 THEN 3488
2710 GOTO 2588
2712 CB &CC(0),&EE(194),4
2714 IF INDEX=-1 THEN 3538
2716 CB &CC(0),&EE(200),6
2718 IF INDEX=-1 THEN 3564
2720 CB &CC(0),&EE(208),7
2722 IF INDEX=-1 THEN 3580
2724 GOTO 2588
2726 CB &CC(0),&EE(217),8
2728 IF INDEX=-1 THEN 3606
2730 CB &CC(0),&EE(227),7
2732 IF INDEX=-1 THEN 3666
2734 GOTO 2588
2736 LET AA(78):=14366,AA(100):=14371
2738 GOSUB 5412
2740 CANCEL 0
2742 GOSUB 4234
2744 GOTO 2556
2746 LET AA(78):=14374,AA(100):=14385
2748 GOSUB 5412
2750 LPOFF 
2752 PRINT &EE(5230,5252),&EE(5260,5269);ZZ(10),&EE(5270,5278);ZZ(20)
2754 IF AA(77)<>4 THEN 2758
2756 PRINT &EE(5280,5292);ZZ(90)
2758 PRINT &EE(5300,5339)
2760 GOSUB 3956
2762 IF K THEN 2784
2764 IFN F THEN 2768
2766 GOSUB 1350
2768 GOSUB 84
2770 GOSUB 1664
2772 IFN Z EQ 0 AND XX(A) EQ 0 THEN 2776
2774 PRINT &EE(5340,5371)
2776 GOSUB 1686
2778 IFN Z EQ 0 AND C EQ 0 THEN 2782
2780 PRINT &EE(5380,5410)
2782 LET A:=11
2784 GOTO 2742
2786 LET AA(78):=14388,AA(100):=14394
2788 GOSUB 5412
2790 MC 0
2792 GOTO 2742
2794 LET AA(78):=14397,AA(100):=14406
2796 GOSUB 5412
2798 LPOFF 
2800 PRINT &EE(5440,5481),&EE(5490,5512)
2802 GOSUB 4252
2804 IF K THEN 2838
2806 IFN INPUTLEN=3 THEN 2816
2808 CB &CC(0),&EE(236),3
2810 IF INDEX=-1 THEN 2824
2812 CB &CC(0),&EE(149),3
2814 IF INDEX=-1 THEN 2828
2816 LET AA(98):=0
2818 GOSUB 4164
2820 PRINT &EE(5520,5536)
2822 GOTO 2800
2824 LET B:=0
2826 GOTO 2830
2828 LET B:=1
2830 LET &BB(0):=!30,&BB(1):=!CD,&BB(2):=B
2832 LET P:=3,&VV(0):=10,&VV(1,10):="CLEAR LOGS"
2834 GOSUB 84
2836 GOSUB 4280
2838 GOTO 2742
2840 LET AA(78):=14410,AA(100):=14428
2842 GOSUB 5412
2844 LPOFF 
2846 LET C:=127,AA(70):=0
2848 IFN ZZ(80)=!270 THEN 2852
2850 LET C:=255
2852 PRINT &EE(5590,5615);C
2854 GOSUB 4176
2856 IF K THEN 2882
2858 LET WW(1):=D
2860 PRINT &EE(5560,5587)
2862 LET C:=32767,AA(70):=1
2864 GOSUB 4176
2866 IF K THEN 2882
2868 LET AA(0):=D,D:=WW(1)
2870 GOSUB 84
2872 PRINT &EE(5650,5664);D;&EE(5620,5646);AA(0)
2874 LET B:=ZZ(40),&BB(0):=!20 OR B,&BB(1):=!33,&BB(2):=AA(0) LSR 8
2876 LET &BB(3):=AA(0) MOD 256,&BB(4):=D,P:=5,&VV(0):=4,&VV(1,4):="DIAG"
2878 GOSUB 4280
2880 UNIT 0,B
2882 GOTO 2742
2884 LET AA(78):=14432,AA(100):=14449
2886 GOSUB 5412
2888 LPOFF 
2890 IF !210 LE ZZ(80) LE !23F THEN 4352
2892 IF &DD(5)=2 THEN 2904
2894 PRINT &EE(5690,5745)
2896 LET &LL(0):=2,&LL(1,2):="CP"
2898 INAME 
2900 IF K THEN 2942
2902 GOTO 2906
2904 LET WW(0):=0
2906 LET &BB(0):=!32,&BB(1):=!C1,&BB(2):=WW(0),AA(74):=256
2908 LET P:=3,&VV(0):=6,&VV(1,6):="ERRSUM"
2910 GOSUB 84
2912 GOSUB 4292
2914 IF Z THEN 2942
2916 PRINT &EE(5750,5771),0,&EE(5810,5831)
2918 LET C:=0
2920 GOSUB 5304
2922 IFN WW(0) THEN 2942
2924 PRINT &EE(5840,5864)
2926 LET C:=1
2928 GOSUB 5304
2930 PRINT &EE(5870,5894)
2932 LET C:=2
2934 GOSUB 5304
2936 PRINT &EE(5900,5924)
2938 LET C:=3
2940 GOSUB 5304
2942 GOTO 2742
2944 LET AA(78):=14452,AA(100):=14461
2946 GOSUB 5412
2948 LPOFF 
2950 GOSUB 3944
2952 IF K THEN 2984
2954 IFN F THEN 2556
2956 IF &DD(5)=2 THEN 2988
2958 PRINT &EE(5940,5971),&EE(5980,6010),&EE(6020,6050)
2960 PRINT "      or",&EE(6060,6100)," ",&EE(15519,15535)
2962 LET &LL(0):=3,&LL(1,3):="BPI"
2964 INAME 
2966 IF K THEN 2984
2968 PRINT &EE(6110,6141)," ",&EE(15540,15555)
2970 LET C:=32
2972 GOSUB 4176
2974 IF K THEN 2984
2976 LPOFF 
2978 PRINT &EE(6150,6198)
2980 GOSUB 84
2982 FMT 0,WW(0),D
2984 GOSUB 4234
2986 GOTO 2556
2988 PRINT &EE(6200,6240),&EE(6242,6253)
2990 GOSUB 3956
2992 IF K THEN 2984
2994 IFN F THEN 3000
2996 LET WW(0):=5,D:=0
2998 GOTO 2980
3000 LET &BB(0):=!32,&BB(1):=!C5,&BB(2):=0,P:=3,AA(74):=4096
3002 LET &VV(0):=7,&VV(1,7):="Run Log"
3004 GOSUB 84
3006 GOSUB 4292
3008 LPOFF 
3010 IF EE(1)=1 THEN 3028
3012 IF EE(1)=2 THEN 3028
3014 IF EE(1)=4 THEN 3028
3016 PRINT &EE(6400,6429)
3018 IFN L THEN 3024
3020 LPON 
3022 PRINT &EE(6400,6429)
3024 LET WW(0):=0,D:=0
3026 GOTO 2976
3028 PRINT &EE(9890,9937)
3030 IFN L THEN 3024
3032 LPON 
3034 PRINT &EE(9890,9937)
3036 GOTO 3024
3038 LET N:=0
3040 PRINT &EE(6260,6279);
3042 IF EE(1) AND !FF=0 THEN 3054
3044 IF EE(1) AND !FF=1 THEN 3058
3046 IF EE(1) AND !FF=2 THEN 3062
3048 IF EE(1) AND !FF=4 THEN 3066
3050 PRINT &EE(6280,6302)
3052 GOTO 3070
3054 PRINT &EE(6320,6332)
3056 GOTO 3070
3058 PRINT &EE(6340,6351)
3060 GOTO 3068
3062 PRINT &EE(6360,6371)
3064 GOTO 3068
3066 PRINT &EE(6380,6399)
3068 LET N:=1
3070 RETURN 
3072 LET AA(78):=14915,AA(100):=14925
3074 GOSUB 5412
3076 LET &VV(0):=7,&VV(1,7):="AMCLEAR",ZZ(70):=0
3078 GOSUB 90
3080 BSIO XX
3082 GOSUB 174
3084 GOTO 2742
3086 LET AA(78):=14890,AA(100):=14912,&VV(1,7):="ERT LOG"
3088 GOSUB 5412
3090 LET &BB(1):=!C6
3092 IFN &DD(5)=2 THEN 3278
3094 LET &BB(0):=!32,&BB(2):=0,AA(74):=776,P:=3
3096 LET &VV(0):=7,&VV(1,7):="ERT LOG"
3098 GOSUB 4292
3100 .IF Z THEN 4800
3102 PRINT 0,&EE(6460,6479),0
3104 LET Y:=0,Z:=EE(0) LSR 8*3+20/2
3106 GOSUB 5014
3108 LET B:=&FF(5) LSL 8 OR &FF(6),C:=&FF(7) LSL 8 OR &FF(8),D:=B+C
3110 LET E:=&FF(9),F:=&FF(10)
3112 PRINT &EE(6480,6501);"   ";
3114 LET W:=&FF(1) LSL 8 OR &FF(2),Y:=&FF(3) LSL 8 OR &FF(4)
3116 BCDCNVT 0,W,Y
3118 PRINT 0,&EE(6510,6539);D,&EE(6540,6569);B,&EE(6570,6599);C
3120 GOSUB 3124
3122 GOTO 3128
3124 PRINT &EE(6600,6629);E,&EE(13220,13246);"   ";F,0
3126 RETURN 
3128 LET E:=13
3130 GOSUB 3134
3132 GOTO 3176
3134 LET B:=&FF(E) AND !40=!40,C:=&FF(E) AND !80=!80,H:=0
3136 IFN &FF(0) THEN 3182
3138 PRINT "LOGICAL",&EE(6650,6679)
3140 FOR I:=1 UNTIL &FF(0)
3142 LET B:=&FF(E) AND !40=!40
3144 LET C:=&FF(E) AND !80=!80,H:=H OR B OR C
3146 LET D:=E-1,F:=E-2,G:=&FF(F) LSL 8 OR &FF(D)
3148 IFN B AND C THEN 3154
3150 PRINT !G;7;&EE(273,284);"AND ";&EE(291,303)
3152 GOTO 3170
3154 PRINT !G;
3156 IFN B THEN 3162
3158 PRINT &EE(6710,6729)
3160 GOTO 3170
3162 IFN C THEN 3168
3164 PRINT &EE(6730,6749)
3166 GOTO 3170
3168 PRINT 
3170 LET E:=E+3
3172 NEXT 3140
3174 RETURN 
3176 GOTO 2742
3178 PRINT &EE(6750,6779),&EE(6780,6809)
3180 END 
3182 PRINT &EE(6810,6849),0
3184 GOTO 3176
3186 LET AA(78):=14474,AA(100):=14482
3188 LET &VV(0):=9,&VV(1,9):="Fault log"
3190 GOSUB 5412
3192 IF &DD(5)=2 THEN 4352
3194 LET &BB(0):=!32,&BB(1):=!C7,P:=2,AA(74):=2048
3196 GOSUB 4292
3198 IF Z THEN 3202
3200 GOSUB 4770
3202 GOTO 2742
3204 LET AA(78):=14484,AA(100):=14495
3206 LET &VV(0):=12,&VV(1,12):="Preset Drive"
3208 GOSUB 5412
3210 LET &BB(0):=!30,&BB(1):=!CE,P:=2
3212 GOSUB 4280
3214 GOTO 2742
3216 LET AA(78):=14498,AA(100):=14511,&VV(0):=6,&VV(1,6):="Status"
3218 GOSUB 5412
3220 STATUS 0,GG(0)
3222 FOR I:=0 UNTIL 9
3224 LET PP(I):=GG(I)
3226 NEXT 3222
3228 GOSUB 242
3230 GOTO 2742
3232 LET AA(78):=14514,AA(100):=14533,&VV(0):=3,&VV(1,3):="REV"
3234 GOSUB 5412
3236 IF ZZ(80)=!220 THEN 4352
3238 LET &BB(0):=!32,&BB(1):=!C3,P:=2,AA(74):=22
3240 GOSUB 4292
3242 IF Z THEN 3246
3244 GOSUB 4844
3246 GOTO 2742
3248 LET AA(78):=14536,AA(100):=14539
3250 GOSUB 5412
3252 PRINT &EE(6850,6868),&EE(6920,6950),&EE(6960,6976),&EE(6980,7004)
3254 PRINT &EE(7010,7042);" utility",&EE(7050,7080),&EE(7250,7284)
3256 PRINT &EE(7090,7118),&EE(13120,13150),&EE(7120,7152),&EE(7160,7208)
3258 PRINT &EE(13160,13180);&EE(13190,13217),&EE(7210,7240)
3260 PRINT &EE(7300,7325),&EE(7330,7379),&EE(7380,7409),&EE(7410,7439)
3262 PRINT &EE(7440,7462),&EE(7470,7495);" utility",&EE(7500,7531)
3264 PRINT &EE(7540,7576),&EE(7580,7608),&EE(7610,7632),&EE(7640,7656)
3266 PRINT &EE(7660,7691),&EE(7700,7712);" utility",&EE(7720,7737);" utility"
3268 PRINT &EE(7740,7769),&EE(7770,7808),&EE(7810,7836)
3270 GOTO 2742
3272 LET AA(78):=14542,AA(100):=14548,&VV(1,7):="RUN LOG",&BB(1):=!C5
3274 LET &VV(0):=7,&VV(1,7):="Run Log"
3276 GOSUB 5412
3278 IFN &DD(5)=2 THEN 3284
3280 LET I:=J:=0
3282 GOTO 3296
3284 LPOFF 
3286 GOSUB 4304
3288 IF K THEN 3328
3290 LET J:=H,I:=H
3292 IFN H=-1 THEN 3296
3294 LET J:=&DD(27),I:=0
3296 FOR D:=I UNTIL J
3298 LET &VV(0):=7,&BB(0):=!32,&BB(2):=D,P:=3,AA(74):=4096
3300 GOSUB 84
3302 GOSUB 4292
3304 IF Z THEN 3328
3306 IF &DD(5)=2 THEN 3312
3308 GOSUB 4594
3310 GOTO 3326
3312 LET E:=EE(0) AND !FF,F:=EE(1) LSR 8,Y:=0,Z:=500
3314 GOSUB 5014
3316 PRINT 6;&EE(7850,7869),0
3318 GOSUB 3124
3320 GOSUB 3038
3322 LET E:=6
3324 GOSUB 3134
3326 NEXT 3296
3328 GOTO 2742
3330 LET AA(78):=14550,AA(100):=14565
3332 GOSUB 5412
3334 LPOFF 
3336 IF V THEN 4352
3338 GOSUB 4348
3340 PRINT &EE(7890,7929)
3342 LET C:=32767,AA(70):=1
3344 GOSUB 4176
3346 IF K THEN 3366
3348 LET AA(80):=D
3350 GOSUB 3426
3352 IF K THEN 3366
3354 FOR AA(81):=1 UNTIL AA(80)
3356 GOSUB 84
3358 RFSI 0,EE(0)
3360 IF AA(79) THEN 3366
3362 GOSUB 4932
3364 NEXT 3354
3366 GOTO 2742
3368 LET AA(78):=14568,AA(100):=14588,B:=!20 OR DEVICE
3370 LET &VV(0):=7,&VV(1,7):="SDCLEAR"
3372 GOSUB 5412
3374 BSIO XX
3376 CHP !5E,B,!4,!BF
3378 GOSUB 140
3380 GOSUB 684
3382 GOTO 2742
3384 LET AA(78):=14592,AA(100):=14603
3386 LET &VV(0):=5,&VV(1,5):="SENSE"
3388 GOSUB 5412
3390 GOSUB 4348
3392 LET &BB(0):=!32,&BB(1):=!C2,P:=2,AA(74):=5
3394 GOSUB 4292
3396 GOSUB 84
3398 IF Z THEN 3402
3400 GOSUB 4880
3402 GOTO 2742
3404 LET AA(78):=14606,AA(100):=14616
3406 GOSUB 5412
3408 LPOFF 
3410 IF &DD(5)=2 THEN 3464
3412 PRINT &EE(8100,8139)
3414 GOSUB 3956
3416 IF K THEN 3476
3418 LET F:=NOT F AND 1
3420 GOSUB 3426
3422 IF K THEN 3476
3424 GOTO 3450
3426 PRINT &EE(8140,8199)
3428 GOSUB 4360
3430 IF K THEN 3448
3432 IF G THEN 3438
3434 GOSUB 4408
3436 GOTO 3446
3438 GOSUB 4368
3440 IF K THEN 3448
3442 GOSUB 84
3444 SETADDR 0,G,0,AA(9),AA(25),AA(59)
3446 LPOFF 
3448 RETURN 
3450 LET AA(98):=1,AA(99):=1
3452 GOSUB 84
3454 IF AA(79) THEN 3476
3456 SPAREBLK 0,F
3458 STATUS 0,PP(0)
3460 GOSUB 242
3462 GOTO 3476
3464 PRINT &EE(8200,8249)
3466 LET &LL(0):=2,&LL(1,2):="SJ"
3468 INAME 
3470 IF K THEN 3476
3472 LET F:=WW(0)*4+1,G:=0
3474 GOTO 3482
3476 GOSUB 4234
3478 LET AA(98):=0
3480 GOTO 2556
3482 GOSUB 3434
3484 IF K THEN 3476
3486 GOTO 3450
3488 LET AA(78):=14620,AA(100):=14636,&VV(0):=6,&VV(1,6):="TABLES"
3490 GOSUB 5412
3492 LPOFF 
3494 PRINT &EE(8270,8293),&EE(8300,8336),&EE(8340,8371),&EE(8380,8416)
3496 PRINT &EE(8420,8457),&EE(8460,8497),&EE(8500,8523)
3498 LET C:=11,AA(70):=1
3500 GOSUB 4176
3502 IF K THEN 3530
3504 IF 6 LE D LE 9 THEN 3494
3506 LET &BB(0):=!32,&BB(1):=!C4,&BB(2):=D,P:=3,AA(74):=512
3508 IFN &DD(5) EQ 2 THEN 3512
3510 IF D LT 10 THEN 4352
3512 IFN &DD(5) EQ 1 THEN 3516
3514 IF D GT 3 THEN 4352
3516 IFN &DD(5) EQ 0 THEN 3522
3518 IF !210 LE ZZ(80) LE !215 THEN 3534
3520 IF D GT 1 THEN 4352
3522 GOSUB 84
3524 GOSUB 4292
3526 IF Z THEN 3530
3528 GOSUB 5024
3530 GOSUB 4234
3532 GOTO 2556
3534 IF D GT 3 THEN 4352
3536 GOTO 3522
3538 LET AA(78):=14638,AA(100):=14652
3540 GOSUB 5412
3542 LPOFF 
3544 PRINT &EE(8550,8569)
3546 GOSUB 4176
3548 IF K THEN 3562
3550 GOSUB 84
3552 UNIT 0,D
3554 STATUS 0,PP(0)
3556 GOSUB 242
3558 LET ZZ(40):=PP(0) LSR 8 AND !F
3560 DESCRIBE 0,&DD(0)
3562 GOTO 2742
3564 LET AA(78):=14656,AA(100):=14676
3566 LET &VV(0):=6,&VV(1,6):="Unload"
3568 GOSUB 5412
3570 IFN &DD(5)=2 THEN 4352
3572 LET P:=1,&BB(0):=!4A
3574 GOSUB 4280
3576 GOSUB 4234
3578 GOTO 2556
3580 LET AA(78):=14680,AA(100):=14697
3582 GOSUB 5412
3584 IFN &DD(5)=2 THEN 4352
3586 LET &BB(0):=!32,&BB(1):=!C7,P:=2,AA(74):=2048
3588 LET &VV(0):=7,&VV(1,7):="Use Log"
3590 GOSUB 4292
3592 IF Z THEN 3604
3594 PRINT &EE(8630,8639);
3596 BCDCNVT 0,0,EE(0)
3598 PRINT 0,&EE(8640,8662);
3600 BCDCNVT 0,EE(1),EE(2)
3602 PRINT 0
3604 GOTO 2742
3606 LET AA(78):=14700,AA(100):=14714
3608 GOSUB 5412
3610 LPOFF 
3612 IFN &DD(5)=2 THEN 4352
3614 GOSUB 3944
3616 IF K THEN 3626
3618 IFN F THEN 2556
3620 GOSUB 4408
3622 GOSUB 84
3624 WFM 0
3626 GOTO 2742
3628 LET AA(78):=14716,AA(100):=14744
3630 GOSUB 5412
3632 LPOFF 
3634 IFN &DD(5)=2 THEN 4352
3636 GOSUB 3944
3638 IF K THEN 3626
3640 IFN F THEN 2556
3642 LET P:=1,O:=2,B:=1,&BB(0):=!30,&BB(1):=!C8
3644 LET &BB(3):=2,&BB(4):=2
3646 GOSUB 3890
3648 IF K THEN 3626
3650 GOTO 3792
3652 LET AA(78):=14746,AA(100):=14770
3654 GOSUB 5412
3656 LPOFF 
3658 LET B:=0,P:=1,&BB(0):=!30,O:=0
3660 GOSUB 3890
3662 IF K THEN 3626
3664 GOTO 3684
3666 LET AA(78):=14772,AA(100):=14802
3668 GOSUB 5412
3670 LPOFF 
3672 LET B:=1,P:=1,&BB(0):=!30,O:=1
3674 GOSUB 3944
3676 IF K THEN 3626
3678 IFN F THEN 2556
3680 GOSUB 3890
3682 IF K THEN 3626
3684 IF &DD(5)=2 THEN 3748
3686 IFN B THEN 3690
3688 GOTO 3704
3690 LET F:=0
3692 PRINT &EE(8790,8829)
3694 GOSUB 3956
3696 IF K THEN 3626
3698 LET &BB(1):=-F*3+!C9,AA(72):=&BB(1)
3700 IFN F THEN 3718
3702 GOTO 3724
3704 PRINT &EE(8930,8959),&EE(8960,8980),&EE(8990,9012)
3706 IF V THEN 3710
3708 PRINT &EE(9020,9033)
3710 PRINT &EE(9040,9069)
3712 GOSUB 4026
3714 IF K THEN 3626
3716 IF F THEN 3724
3718 GOSUB 3994
3720 IF K THEN 3626
3722 IF AA(79) THEN 3230
3724 LET &BB(3):=0
3726 IF V THEN 3782
3728 PRINT &EE(9070,9109)
3730 GOSUB 3956
3732 IF K THEN 3626
3734 IFN F THEN 3782
3736 PRINT &EE(9110,9149)
3738 LET AA(70):=-127,C:=127
3740 GOSUB 4176
3742 IF K THEN 3626
3744 LET &BB(3):=-F*D
3746 GOTO 3782
3748 GOSUB 4072
3750 IF K THEN 3626
3752 LET &BB(4):=F,&BB(1):=!C8
3754 IF F THEN 3776
3756 GOSUB 4408
3758 IF K THEN 3626
3760 LET Y:=32767,Q:=1
3762 PRINT &EE(9150,9189)
3764 GOSUB 4312
3766 IF K THEN 3626
3768 LET Y:=0
3770 IFN H=-1 THEN 3774
3772 LET Y:=-1
3774 LENGTH 0,Y,H
3776 LET F:=0
3778 IFN O=0 THEN 3782
3780 IF &DD(5)=2 THEN 3878
3782 IFN B THEN 3808
3784 IFN V THEN 3792
3786 PRINT &EE(9190,9220),&EE(9230,9260)
3788 PRINT &EE(9510,9547),&EE(9270,9308),&EE(9340,9359)
3790 GOTO 3796
3792 PRINT &EE(9190,9220),&EE(9230,9260),&EE(9270,9308)
3794 PRINT &EE(9310,9339),&EE(9340,9359)
3796 GOSUB 4096
3798 IF K THEN 3626
3800 IFN F=1 THEN 3808
3802 GOSUB 4486
3804 IF K THEN 3626
3806 IF AA(79) THEN 3230
3808 IF &DD(5)=2 THEN 3878
3810 PRINT &EE(9360,9379),&EE(9380,9406)
3812 PRINT &EE(9440,9466),&EE(9470,9485)
3814 GOSUB 5208
3816 IF K THEN 3626
3818 LET &BB(4):=0
3820 IF F=2 THEN 3824
3822 LET &BB(0):=!32,&BB(4):=F
3824 LET AA(74):=1000,P:=6
3826 GOSUB 84
3828 IFN &BB(1)=!C8 THEN 3834
3830 LET P:=7
3832 GOTO 3838
3834 IFN &BB(1)=!CC THEN 3838
3836 LET P:=5
3838 IFN &BB(0)=!30 THEN 3846
3840 GOSUB 3886
3842 GOSUB 4280
3844 GOTO 3862
3846 GOSUB 3886
3848 GOSUB 4292
3850 LET D:=1000-XX(55)
3852 IF D=1 THEN 3862
3854 IF Z THEN 3862
3856 GOSUB 5286
3858 LET &BB(2):=0
3860 GOTO 3846
3862 GOSUB 4234
3864 IF &DD(5)=2 THEN 3868
3866 GOTO 2556
3868 PRINT &EE(10000,10039)
3870 GOSUB 3956
3872 IF K THEN 3626
3874 IF F THEN 3086
3876 GOTO 2556
3878 LET &BB(5):=F,P:=6,&BB(3):=O
3880 GOSUB 3940
3882 GOSUB 3886
3884 GOTO 3840
3886 LET &VV(0):=3,&VV(1,3):="ERT"
3888 RETURN 
3890 PRINT &EE(10040,10060),&EE(10070,10093)
3892 GOSUB 4252
3894 IF K THEN 3904
3896 CB &CC(0),&EE(244),3
3898 IFN INDEX=-1 THEN 3906
3900 IFN INPUTLEN=3 THEN 3916
3902 LET &BB(2):=255,AA(72):=2
3904 RETURN 
3906 LET Z:=INPUTLEN-1
3908 FOR I:=0 UNTIL Z
3910 IFN "0" LE &CC(I) LE "9" THEN 3916
3912 NEXT 3908
3914 GOTO 3920
3916 GOSUB 4164
3918 GOTO 3890
3920 CONVERT 0
3922 IFN 1 LE AA(71) LE 254 THEN 3916
3924 LET &BB(2):=AA(71),P:=2
3926 RETURN 
3928 FUNCTION CONVERT VALUE1
3930 LET AA(71):=0,Z:=INPUTLEN-1
3932 FOR I:=VALUE1 UNTIL Z
3934 LET AA(71):=AA(71)*10-48+&CC(I)
3936 NEXT 3932
3938 ENDF 
3940 PRINT &EE(10100,10127)
3942 RETURN 
3944 PRINT &EE(10130,10159),"data.",&EE(10160,10178)
3946 GOSUB 3956
3948 IF K THEN 3954
3950 IF F THEN 3954
3952 PRINT &EE(10520,10556)
3954 RETURN 
3956 GOSUB 4252
3958 IF K THEN 3970
3960 IF INPUTLEN>3 THEN 3988
3962 IFN INPUTLEN=3 THEN 3972
3964 CB &CC(0),&EE(239),3
3966 IFN INDEX=-1 THEN 3988
3968 LET F:=-1
3970 RETURN 
3972 IFN INPUTLEN=2 THEN 3982
3974 CB &CC(0),&EE(242),2
3976 IFN INDEX=-1 THEN 3988
3978 LET F:=0
3980 RETURN 
3982 IFN INPUTLEN=1 THEN 3988
3984 IF &CC(0)="Y" THEN 3968
3986 IF &CC(0)="N" THEN 3978
3988 GOSUB 4164
3990 PRINT &EE(10180,10201)
3992 GOTO 3956
3994 GOSUB 4368
3996 IF K THEN 4024
3998 SETADDR 0,1,0,AA(9),AA(25),AA(59)
4000 PRINT &EE(10210,10232),&EE(10240,10273)
4002 IFN V THEN 4008
4004 LET &LL(0):=3,&LL(1,5):="STV"
4006 GOTO 4012
4008 LET &LL(0):=5,&LL(1,5):="STCHV"
4010 PRINT &EE(10280,10305)
4012 INAME 
4014 LET F:=WW(0)
4016 LET &BB(5):=F
4018 IFN V THEN 4024
4020 IFN F=2 THEN 4024
4022 LET WW(0):=4,F:=4,&BB(5):=4
4024 RETURN 
4026 GOSUB 4252
4028 IF K THEN 4040
4030 IFN INPUTLEN=2 THEN 4060
4032 LET AA(72):=&BB(0)
4034 CB &CC(0),&EE(247),2
4036 IFN INDEX=-1 THEN 4042
4038 LET F:=0,&BB(1):=!C8
4040 RETURN 
4042 CB &CC(0),&EE(249),2
4044 IFN INDEX=-1 THEN 4050
4046 LET F:=1,&BB(1):=!CB
4048 RETURN 
4050 IF V THEN 4060
4052 CB &CC(0),&EE(251),2
4054 IFN INDEX=-1 THEN 4060
4056 LET F:=2,&BB(1):=!CA
4058 RETURN 
4060 GOSUB 4164
4062 IFN V THEN 4068
4064 PRINT &EE(10310,10317);&EE(10322,10328)
4066 IF V THEN 4070
4068 PRINT &EE(10310,10328)
4070 GOTO 4026
4072 PRINT &EE(10330,10353),&EE(10360,10378)
4074 PRINT &EE(10380,10398),&EE(10400,10414)
4076 LET &LL(0):=3,&LL(1,3):="CSE"
4078 INAME 
4080 IF K THEN 4094
4082 LET F:=WW(0)
4084 IFN F=1 THEN 4094
4086 LET AA(70):=0,C:=15
4088 PRINT &EE(10420,10437)
4090 GOSUB 4176
4092 LET F:=D LSL 4 OR 1
4094 RETURN 
4096 GOSUB 4252
4098 IF K THEN 4140
4100 IFN INPUTLEN=2 THEN 4152
4102 CB &CC(0),&EE(247),2
4104 IFN INDEX=-1 THEN 4110
4106 LET F:=0
4108 GOTO 4136
4110 IFN V THEN 4122
4112 CB &CC(0),&EE(9558),2
4114 IFN INDEX=-1 THEN 4130
4116 GOSUB 5642
4118 RETURN 
4120 IFN INDEX=-1 THEN 4130
4122 CB &CC(0),&EE(253),2
4124 IFN INDEX=-1 THEN 4130
4126 LET F:=1
4128 GOTO 4136
4130 CB &CC(0),&EE(249),2
4132 IFN INDEX=-1 THEN 4152
4134 LET F:=2
4136 IFN &BB(1)=!C8 THEN 4142
4138 LET &BB(6):=F
4140 RETURN 
4142 IFN &BB(1)=!CB THEN 4148
4144 LET &BB(5):=F
4146 RETURN 
4148 IF &BB(1)=!CA THEN 4144
4150 RETURN 
4152 GOSUB 4164
4154 IFN V THEN 4160
4156 PRINT &EE(9554,9568)
4158 GOTO 4096
4160 PRINT &EE(10440,10458)
4162 GOTO 4096
4164 PRINT &EE(10460,10492)
4166 RETURN 
4168 LET &CC(0):=0
4170 GOSUB 4252
4172 IFN INPUTLEN=0 THEN 4180
4174 RETURN 
4176 LET &CC(0):=0
4178 GOSUB 4252
4180 IF K THEN 4210
4182 IF &CC(0)="-" THEN 4194
4184 FOR I:=0 UNTIL Z
4186 IFN "0" LE &CC(I) LE "9" THEN 4212
4188 NEXT 4184
4190 CONVERT 0
4192 GOTO 4204
4194 FOR I:=1 UNTIL Z
4196 IFN "0" LE &CC(I) LE "9" THEN 4212
4198 NEXT 4194
4200 CONVERT 1
4202 LET AA(71):=-AA(71)
4204 LET D:=AA(71)
4206 IF C=-1 THEN 4210
4208 IFN AA(70) LE D LE C THEN 4212
4210 RETURN 
4212 IF C=-1 THEN 4220
4214 GOSUB 4164
4216 PRINT AA(70);" to ";C
4218 GOTO 4176
4220 GOSUB 4164
4222 LET D:=AA(78)
4224 IF &EE(D)="I" THEN 4230
4226 PRINT "0 to 65535"
4228 GOTO 4176
4230 PRINT "1 to 65535"
4232 GOTO 4176
4234 IF K THEN 4244
4236 GOSUB 84
4238 IF AA(79) THEN 4244
4240 GOSUB 710
4242 PRINT 0,&EE(W,A);&EE(10500,10517),0
4244 LPOFF 
4246 LET AA(79):=0
4248 GOSUB 718
4250 RETURN 
4252 INPUT &CC(0,7)
4254 LET Z:=INPUTLEN-1
4256 IF INPUTLEN=0 THEN 4272
4258 FOR I:=0 UNTIL Z
4260 IFN 97 LE &CC(I) LE 122 THEN 4264
4262 LET &CC(I):=&CC(I)-32
4264 NEXT 4258
4266 IFN INPUTLEN=4 THEN 4272
4268 CB &CC(0),&EE(67),4
4270 IF INDEX=-1 THEN 4274
4272 RETURN 
4274 PRINT &EE(10520,10556)
4276 LET K:=1
4278 RETURN 
4280 BSIO XX
4282 WR 5,&BB(0),P
4284 WAIT 
4286 GOSUB 142
4288 GOSUB 682
4290 RETURN 
4292 BSIO XX
4294 WR 5,&BB(0),P
4296 WAIT 
4298 RR !E,EE(0),AA(74)
4300 WAIT 
4302 GOTO 4286
4304 PRINT &EE(10560,10581)
4306 LET Y:=&DD(27),Q:=0
4308 GOSUB 4312
4310 RETURN 
4312 GOSUB 4252
4314 IF K THEN 4324
4316 IFN INPUTLEN=3 THEN 4326
4318 CB &CC(0),&EE(236),3
4320 IFN INDEX=-1 THEN 4326
4322 LET H:=-1
4324 RETURN 
4326 LET Z:=INPUTLEN-1
4328 FOR I:=0 UNTIL Z
4330 IFN "0" LE &CC(I) LE "9" THEN 4342
4332 NEXT 4328
4334 CONVERT 0
4336 IFN Q LE AA(71) LE Y THEN 4342
4338 LET H:=AA(71)
4340 RETURN 
4342 GOSUB 4164
4344 PRINT Q;" to ";Y;", ALL or EXIT"
4346 GOTO 4312
4348 IFN !210 LE ZZ(80) LE !215 THEN 4352
4350 RETURN 
4352 GOSUB 84
4354 PRINT &EE(10590,10620),&EE(10630,10661)
4356 LPOFF 
4358 GOTO 2556
4360 LET &LL(0):=2,&LL(1,2):="BV"
4362 INAME 
4364 LET G:=WW(0)
4366 RETURN 
4368 PRINT &EE(10670,10698),&EE(10700,10722),&EE(10730,10747),0
4370 PRINT &EE(10750,10767);AA(9)
4372 LET C:=&DD(25) LSL 8+&DD(26),AA(70):=0
4374 GOSUB 4168
4376 IF K THEN 4406
4378 IFN INPUTLEN THEN 4382
4380 LET AA(9):=D
4382 PRINT &EE(10770,10784);AA(25)
4384 LET C:=&DD(27)
4386 GOSUB 4168
4388 IF K THEN 4406
4390 IFN INPUTLEN THEN 4394
4392 LET AA(25):=D
4394 PRINT &EE(10790,10806);AA(59)
4396 LET C:=&DD(28) LSL 8+&DD(29)
4398 GOSUB 4168
4400 IF K THEN 4406
4402 IFN INPUTLEN THEN 4406
4404 LET AA(59):=D
4406 RETURN 
4408 PRINT "Current ";
4410 LET ZZ(70):=0
4412 ADDR AA(3),AA(4),AA(5)
4414 PRINT &EE(10810,10837),&EE(10840,10870)
4416 PRINT &EE(10880,10909),&EE(10910,10933)
4418 GOSUB 4252
4420 IF K THEN 4480
4422 IFN INPUTLEN THEN 4474
4424 LET W:=INPUTLEN-1
4426 FOR X:=0 UNTIL W
4428 IFN "0" LE &CC(X) LE "9" THEN 4460
4430 LET Y:=W-X,&FF(Y):=&CC(X)-48
4432 NEXT 4426
4434 DTOHEX W
4436 LET AA(3):=NN(0),AA(4):=NN(1),AA(5):=NN(2)
4438 LET S:=AA(3),T:=&DD(30) LSL 8 OR &DD(31)
4440 GOSUB 752
4442 IFN S=AA(3) THEN 4460
4444 LET S:=AA(4),T:=&DD(32) LSL 8 OR &DD(33)
4446 GOSUB 752
4448 IFN S=AA(4) THEN 4460
4450 IFN S=T THEN 4458
4452 LET S:=AA(5),T:=&DD(34) LSL 8 OR &DD(35)
4454 GOSUB 752
4456 IFN S=AA(5) THEN 4460
4458 GOTO 4474
4460 GOSUB 4164
4462 PRINT "0 - ";
4464 LET AA(3):=AA(4):=AA(5):=0,Z:=&DD(30) LSL 8 OR &DD(31)
4466 LET Y:=&DD(32) LSL 8 OR &DD(33),W:=&DD(34) LSL 8 OR &DD(35)
4468 BCDCNVT Z,Y,W
4470 PRINT " "
4472 GOTO 4418
4474 GOSUB 84
4476 SETADDR 0,0,AA(3),AA(4),AA(5)
4478 LPOFF 
4480 RETURN 
4482 LET &FF(0):=J:=0
4484 RETURN 
4486 PRINT &EE(10940,10969),&EE(10970,10987)
4488 GOSUB 4252
4490 IF K THEN 4574
4492 IFN INPUTLEN THEN 4482
4494 LET Z:=INPUTLEN-1
4496 FOR I:=0 UNTIL Z
4498 IF "0" LE &CC(I) LE "F" THEN 4502
4500 IFN "A" LE &CC(I) LE "F" THEN 4576
4502 NEXT 4496
4504 LET I:=INPUTLEN-1,J:=-1
4506 IF I=-1 THEN 4534
4508 LET J:=J+1
4510 IFN "0" LE &CC(I) LE "9" THEN 4516
4512 LET &FF(J):=&CC(I)-48
4514 GOTO 4518
4516 LET &FF(J):=&CC(I)-55
4518 LET I:=I-1
4520 IF I=-1 THEN 4534
4522 IFN "0" LE &CC(I) LE "9" THEN 4528
4524 LET &FF(J):=&CC(I)-48 LSL 4+&FF(J)
4526 GOTO 4530
4528 LET &FF(J):=&CC(I)-55 LSL 4+&FF(J)
4530 LET I:=I-1
4532 GOTO 4506
4534 LET J:=INPUTLEN+1/2,W:=J,X:=J-1
4536 FOR I:=0 UNTIL X
4538 LET Z:=X-I,&CC(I):=&FF(Z)
4540 NEXT 4536
4542 FOR I:=0 UNTIL X
4544 LET &FF(I):=&CC(I)
4546 NEXT 4542
4548 FOR I:=1 UNTIL 63
4550 LET Z:=I*W
4552 FOR J:=0 UNTIL X
4554 LET Y:=Z+J,&FF(Y):=&FF(J)
4556 NEXT 4552
4558 NEXT 4548
4560 LET WW(112):=!31D1,P:=2,Z:=2,WW(110):=64
4562 GOTO 4572
4564 FUNCTION UP NAME1
4566 LET &VV(0):=16,&VV(1,16):="SET USER PATTERN"
4568 GOSUB 676
4570 ENDF 
4572 UP &FF(0)
4574 RETURN 
4576 GOSUB 4164
4578 PRINT &EE(11010,11031)
4580 GOTO 4486
4582 IFN ZZ(70) THEN 4590
4584 LET B:=AA(9) LSR 8,C:=AA(9) LSL 8 OR AA(25)
4586 ADDR B,C,AA(59)
4588 GOTO 4592
4590 ADDR AA(3),AA(4),AA(5)
4592 RETURN 
4594 PRINT 0,&EE(11040,11048);D,&EE(11050,11070);
4596 LET Z:=EE(0) AND !FF,I:=EE(1),Y:=EE(2)
4598 BCDCNVT Z,I,Y
4600 IF V THEN 4604
4602 PRINT 0,&EE(11080,11103);EE(3)
4604 LET Z:=EE(4) LSR 8
4606 IF V THEN 4612
4608 PRINT &EE(11110,11135);Z
4610 GOTO 4614
4612 PRINT 0,"No. of errors = ";Z
4614 LET I:=EE(0) LSR 8
4616 PRINT &EE(11140,11164);I
4618 LET C:=0,B:=EE(0) LSR 8-1
4620 IF B=-1 THEN 4690
4622 FOR C:=0 UNTIL B
4624 GOSUB 4628
4626 GOTO 4678
4628 LET E:=C*5+4,F:=E+1,G:=E+2,EE(0):=EE(E) LSL 8
4630 LET EE(0):=EE(F) LSR 8+EE(0),EE(1):=EE(F) LSL 8
4632 LET EE(1):=EE(G) LSR 8+EE(1),E:=E+2,F:=E+1,G:=E+2,EE(2):=EE(E) LSL 8
4634 LET EE(2):=EE(F) LSR 8 OR EE(2),EE(3):=EE(F) LSL 8
4636 LET EE(3):=EE(G) LSR 8 OR EE(3),E:=E+2,F:=E+1,EE(4):=EE(E) LSL 8
4638 LET EE(4):=EE(F) LSR 8 OR EE(4)
4640 GOSUB 4644
4642 RETURN 
4644 GOSUB 4692
4646 IF 0 LE EE(0) THEN 4654
4648 LET X:=EE(0) AND !7FFF
4650 PRINT "CYL";6;X;"*";7;
4652 GOTO 4656
4654 PRINT "CYL";6;EE(0);7;
4656 IF 0 LE EE(2) THEN 4664
4658 LET X:=EE(2) AND !7FFF
4660 PRINT X;"*"
4662 GOTO 4666
4664 PRINT EE(2)
4666 LET X:=EE(1) LSR 8,Y:=EE(3) LSR 8
4668 PRINT "HEAD";5;X;9;Y
4670 LET X:=EE(1) AND !FF,Y:=EE(3) AND !FF
4672 PRINT "SECT";5;X;9;Y
4674 LET X:=EE(4) LSR 8,Y:=EE(4) AND !FF
4676 RETURN 
4678 IF V THEN 4684
4680 PRERS X
4682 GOTO 4686
4684 PRNIERS X
4686 PRINT &EE(11170,11188);Y
4688 NEXT 4622
4690 RETURN 
4692 PRINT 0,&EE(11190,11213),&EE(11220,11243)
4694 RETURN 
4696 FUNCTION PRERS VALUE1
4698 IFN VALUE1 AND 3=0 THEN 4702
4700 PRINT &EE(11250,11281)
4702 IFN VALUE1 AND 3=1 THEN 4706
4704 PRINT &EE(11290,11324)
4706 IFN VALUE1 AND 3=2 THEN 4710
4708 PRINT &EE(11330,11356)
4710 IF VALUE1 AND 4=0 THEN 4716
4712 PRINT &EE(11360,11381)
4714 GOTO 4718
4716 PRINT &EE(11390,11409)
4718 IF VALUE1 AND 8=0 THEN 4724
4720 PRINT &EE(11410,11435)
4722 GOTO 4726
4724 PRINT &EE(11440,11458)
4726 IF VALUE1 AND 16=0 THEN 4732
4728 PRINT &EE(11460,11515)
4730 GOTO 4734
4732 PRINT &EE(11520,11548)
4734 IF VALUE1 AND 32=0 THEN 4740
4736 PRINT &EE(11550,11592)
4738 GOTO 4742
4740 PRINT &EE(11600,11619)
4742 IF VALUE1 AND 64=0 THEN 4748
4744 PRINT &EE(11620,11653)
4746 GOTO 4750
4748 PRINT &EE(11660,11687)
4750 IF VALUE2=1 THEN 4764
4752 LET W:=AA(78)+1
4754 IF &EE(W)="U" THEN 4764
4756 IF VALUE1 AND 128=0 THEN 4762
4758 PRINT &EE(11690,11702)
4760 GOTO 4764
4762 PRINT &EE(11710,11736)
4764 ENDF 
4766 PRINT 0,&EE(11740,11761),&EE(11770,11792)
4768 RETURN 
4770 LET B:=EE(0) LSR 8
4772 IF B THEN 4778
4774 PRINT &EE(11800,11824)
4776 RETURN 
4778 PRINT &EE(11830,11855);B
4780 LET D:=-10,E:=B*11+1,I:=0
4782 IFN B THEN 4776
4784 LET D:=D+11,I:=D/2
4786 IF D/2*2-D=-1 THEN 4796
4788 LET EE(0):=EE(I),F:=I+1,G:=I+2,H:=I+3,EE(1):=EE(F),EE(2):=EE(G)
4790 LET EE(3):=EE(H),F:=I+4,G:=EE(F) LSR 8,H:=EE(F) AND !FF,F:=I+5
4792 LET J:=EE(F) LSR 8
4794 GOTO 4806
4796 LET F:=I+1,G:=I+2,H:=EE(I) LSL 8,EE(0):=EE(F) LSR 8 OR H
4798 LET H:=EE(F) LSL 8,EE(1):=EE(G) LSR 8 OR H,F:=I+3,H:=EE(G) LSL 8
4800 LET EE(2):=EE(F) LSR 8 OR H,G:=I+4,H:=EE(F) LSL 8
4802 LET EE(3):=EE(G) LSR 8 OR H,G:=EE(G) AND !FF,F:=I+5,H:=EE(F) LSR 8
4804 LET J:=EE(F) AND !FF
4806 GOSUB 4766
4808 GOSUB 4646
4810 LET Z:=G,Y:=8
4812 IF V THEN 4832
4814 PRINT &EE(11860,11893);
4816 GOSUB 5236
4818 PRINT " binary"
4820 IF J=0 THEN 4826
4822 PRINT &EE(11900,11925);H
4824 GOTO 4828
4826 PRINT &EE(11930,11954);H
4828 LET B:=B-1
4830 GOTO 4782
4832 PRINT "FAULT CODE = ";!G
4834 IF H=0 THEN 4838
4836 PRINT "SUBTEST =";!H
4838 IF J=0 THEN 4828
4840 PRINT "STATUS = ";!J
4842 GOTO 4828
4844 LET I:=EE(0) LSR 8
4846 PRINT &EE(11960,11979),&EE(11980,11996),&EE(12000,12018)
4848 FOR J:=1 UNTIL I
4850 LET B:=J/2
4852 IF J/2*2-J=-1 THEN 4858
4854 LET &FF(J):=EE(B) LSR 8
4856 GOTO 4860
4858 LET &FF(J):=EE(B) AND !FF
4860 NEXT 4848
4862 FOR J:=1 UNTIL I
4864 LET B:=J-1
4866 IFN &FF(J)=!F3 THEN 4872
4868 PRINT 1;B;10;"NONE"
4870 GOTO 4876
4872 LET B:=J-1,C:=&FF(J) LSR 4,D:=&FF(J) MOD 4
4874 PRINT " ";B;"          ";C;" - ";D
4876 NEXT 4862
4878 RETURN 
4880 LET B:=EE(0) LSR 8
4882 IFN B THEN 5282
4884 LET C:=EE(0) AND !FF
4886 PRINT &EE(12020,12037);
4888 IF C THEN 4894
4890 PRINT "GOOD"
4892 GOTO 4896
4894 PRINT "BAD"
4896 LET C:=EE(1) LSR 8
4898 PRINT &EE(12040,12057);
4900 IFN C THEN 4906
4902 PRINT "BAD"
4904 GOTO 4908
4906 PRINT "GOOD"
4908 LET C:=EE(1) AND !FF
4910 PRINT &EE(12060,12078);C;&EE(12080,12093)
4912 LET C:=EE(2) LSR 8
4914 PRINT &EE(12100,12120);C;&EE(12080,12093)
4916 LET W:=EE(2) AND !FF,Y:=8
4918 PRINT &EE(15580,15600);
4920 GOSUB 5236
4922 LET W:=EE(3) LSR 8,Y:=8
4924 PRINT " binary",&EE(15601,15623);
4926 GOSUB 5236
4928 PRINT " binary"
4930 RETURN 
4932 PRINT 0,&EE(12150,12158)
4934 GOSUB 4582
4936 LET B:=EE(0) LSR 8,C:=EE(0) AND !FF,D:=EE(1) LSR 8,E:=EE(1) AND !FF
4938 LET E:=EE(2) AND !FF00 OR E,F:=EE(2) AND !FF
4940 PRINT &EE(12160,12168);B,&EE(12170,12189);C,&EE(13370,13387);D
4942 PRINT &EE(12200,12221);E,&EE(12230,12244);F,&EE(12250,12262),0
4944 LET Z:=130,Y:=3
4946 GOSUB 5014
4948 FOR I:=0 UNTIL 31
4950 LET J:=I*8+1
4952 PRINT "  ";J;
4954 FOR H:=0 UNTIL 7
4956 LET J:=I*8+H,Z:=&FF(J),Y:=2
4958 PRINT " ";
4960 GOSUB 612
4962 NEXT 4954
4964 PRINT " "
4966 NEXT 4948
4968 PRINT "CRC = ";
4970 LET Z:=EE(131) LSR 8,Y:=8
4972 GOSUB 5236
4974 PRINT "  ";
4976 LET Z:=EE(131) AND !FF,Y:=8
4978 GOSUB 5236
4980 PRINT " ","ECC = ";
4982 LET Z:=EE(132) LSR 8,Y:=8
4984 GOSUB 5236
4986 PRINT "  ";
4988 LET Z:=EE(132) AND !FF,Y:=8
4990 GOSUB 5236
4992 PRINT "  ";
4994 LET Z:=EE(133) LSR 8,Y:=8
4996 GOSUB 5236
4998 PRINT " "
5000 LET Z:=EE(133) AND !FF,Y:=8
5002 GOSUB 5236
5004 PRINT "  ";
5006 LET Z:=EE(134) LSR 8,Y:=8
5008 GOSUB 5236
5010 PRINT " "
5012 RETURN 
5014 FOR I:=Y UNTIL Z
5016 LET H:=Y*2,H:=I*2-H,J:=Y*2-1,J:=I*2-J,&FF(H):=EE(I) LSR 8
5018 LET &FF(J):=EE(I) AND !FF
5020 NEXT 5014
5022 RETURN 
5024 LET B:=Y:=0,C:=&DD(27),Z:=150
5026 GOSUB 5014
5028 IFN D=1 THEN 5068
5030 PRINT &EE(12270,12286)
5032 FOR E:=0 UNTIL C
5034 LET Y:=&FF(B)
5036 PRINT 1,&EE(12290,12303);Y
5038 LET F:=B+1,G:=B+2,H:=&FF(F) LSL 8+&FF(G)
5040 PRINT &EE(12310,12335);H
5042 LET F:=B+3,Y:=&FF(F)
5044 PRINT &EE(12340,12358);Y
5046 LET F:=B+4,G:=&FF(F)
5048 PRINT &EE(12360,12388);G
5050 LET B:=B+5
5052 IFN G THEN 5064
5054 FOR F:=1 UNTIL G
5056 LET H:=B+1,I:=&FF(B) LSL 8+&FF(H),J:=B+2,Y:=&FF(J)
5058 PRINT "CYL = ";I;&EE(12390,12400);Y
5060 LET B:=B+3
5062 NEXT 5054
5064 NEXT 5032
5066 RETURN 
5068 IFN D=2 THEN 5106
5070 FOR E:=0 UNTIL C
5072 PRINT 0,&EE(12410,12437);E
5074 GOSUB 5260
5076 LET B:=B+6
5078 NEXT 5070
5080 LET B:=78
5082 FOR E:=0 UNTIL C
5084 PRINT 0,&EE(12440,12462);E
5086 GOSUB 5260
5088 LET B:=B+6
5090 NEXT 5082
5092 LET B:=156
5094 PRINT 0,&EE(12470,12498)
5096 FOR E:=0 UNTIL C
5098 LET F:=B+E,I:=&FF(F) LSL 8 ASR 8
5100 PRINT "head ";E;" = ";I
5102 NEXT 5096
5104 RETURN 
5106 IFN D=3 THEN 5172
5108 PRINT 0,&EE(12500,12526),&EE(12530,12548);
5110 LET Z:=EE(0),Y:=EE(1)
5112 BCDCNVT 0,Z,Y
5114 LET E:=&FF(4),F:=&FF(15),G:=&FF(16)
5116 PRINT " ",&EE(12550,12570);E,&EE(12580,12597);F,&EE(12600,12617);G
5118 LET I:=&FF(5) LSL 8+&FF(6)
5120 PRINT &EE(12620,12634);I,&EE(12640,12656);
5122 LET Z:=EE(3) AND !FF,Y:=2
5124 GOSUB 612
5126 FOR I:=4 UNTIL 6
5128 LET Z:=EE(I),Y:=4
5130 GOSUB 612
5132 NEXT 5126
5134 LET Z:=EE(7) LSR 8,Y:=2
5136 GOSUB 612
5138 PRINT " ",&EE(12660,12679);
5140 LET I:=&FF(17)
5142 GOSUB 5250
5144 PRINT &EE(12680,12698);
5146 LET I:=&FF(18)
5148 GOSUB 5250
5150 PRINT &EE(12700,12717);
5152 LET Z:=&FF(19),Y:=8
5154 GOSUB 5236
5156 PRINT " ",&EE(12720,12736);
5158 GOSUB 5250
5160 PRINT &EE(12740,12764);
5162 IF &FF(21) THEN 5168
5164 PRINT "BLOCK"
5166 RETURN 
5168 PRINT "VECTOR"
5170 RETURN 
5172 IFN D=10 THEN 5182
5174 PRINT &EE(12770,12795),0,&EE(12800,12815);&FF(2,8),&EE(12820,12843);
5176 PRINT &FF(11,14),&EE(12850,12867),0,&FF(17,32),&FF(34,56),0
5178 PRINT &EE(12870,12890);&FF(59,64),&EE(12900,12910);&FF(65,76)
5180 RETURN 
5182 LET I:=&FF(0)*3
5184 PRINT &EE(12920,12941),0
5186 IFN I THEN 5204
5188 PRINT &EE(12950,12977)
5190 FOR J:=1 STEP 3 UNTIL I
5192 LET E:=J+1,B:=&FF(J) LSL 8 OR &FF(E),E:=J+2,C:=&FF(E),F:=J/3+1
5194 PRINT 3;F;8;C;8;
5196 BCDCNVT 0,0,B
5198 PRINT 0
5200 NEXT 5190
5202 RETURN 
5204 PRINT "No spares."
5206 RETURN 
5208 GOSUB 4252
5210 IF K THEN 5220
5212 IFN INPUTLEN=3 THEN 5230
5214 CB &CC(0),&EE(9380),3
5216 IFN INDEX=-1 THEN 5222
5218 LET F:=1
5220 RETURN 
5222 CB &CC(0),&EE(38),3
5224 IFN INDEX=-1 THEN 5230
5226 LET F:=2
5228 RETURN 
5230 GOSUB 4164
5232 PRINT &EE(12980,12996)
5234 GOTO 5208
5236 LET W:=Z
5238 IFN Y THEN 5202
5240 LET X:=Y-1
5242 LET Q:=W LSR X LSL 1 LSR 1 AND 1
5244 PRINT Q;
5246 LET Y:=Y-1
5248 GOTO 5238
5250 IF I=1 THEN 5256
5252 PRINT "OFF"
5254 RETURN 
5256 PRINT "ON"
5258 RETURN 
5260 LET Z:=&FF(B) LSL 8 ASR 8
5262 PRINT "OD    = ";Z
5264 LET Z:=B+1,Z:=&FF(Z) LSL 8 ASR 8
5266 PRINT "MI-OD = ";Z
5268 LET Z:=B+2,Z:=&FF(Z) LSL 8 ASR 8
5270 PRINT "MI    = ";Z
5272 LET Z:=B+3,Z:=&FF(Z) LSL 8 ASR 8
5274 PRINT "ID-MI = ";Z
5276 LET Z:=B+4,Z:=&FF(Z) LSL 8 ASR 8
5278 PRINT "ID    = ";Z
5280 RETURN 
5282 PRINT &EE(13010,13025)
5284 RETURN 
5286 LET Z:=EE(4) AND !FF
5288 PRINT 0,"Loop Count = ";Z
5290 GOSUB 4644
5292 LET Z:=EE(4) LSR 8
5294 IFN V THEN 5300
5296 PRNIERS Z
5298 GOTO 5302
5300 PRERS Z
5302 RETURN 
5304 LET Y:=C*32,Z:=C+1*32-1,D:=0
5306 GOSUB 5014
5308 FOR I:=0 UNTIL 63
5310 IFN &FF(I) THEN 5326
5312 LET D:=1,F:=256
5314 FOR G:=0 UNTIL 7
5316 LET F:=F/2
5318 IFN F AND &FF(I) THEN 5324
5320 LET H:=I*8+G
5322 PRINT !H;",";
5324 NEXT 5314
5326 NEXT 5308
5328 IF D THEN 5332
5330 PRINT &EE(13100,13115)
5332 PRINT " "
5334 RETURN 
5336 FUNCTION INAME VALUE1
5338 GOSUB 4252
5340 IF K THEN 5356
5342 IFN INPUTLEN=1 THEN 5358
5344 LET WW(0):=-1
5346 FOR VALUE1:=1 UNTIL &LL(0)
5348 IFN &CC(0)=&LL(VALUE1) THEN 5352
5350 LET WW(0):=VALUE1-1
5352 NEXT 5346
5354 IF WW(0)=-1 THEN 5358
5356 ENDF 
5358 GOSUB 4164
5360 FOR VALUE1:=1 UNTIL &LL(0)
5362 PRINT &LL(VALUE1);", ";
5364 NEXT 5360
5366 PRINT "or EXIT"
5368 GOTO 5338
5370 BUMP
5372 LOOPTO 1468
5374 IF SECTIONS1 AND !C00 THEN 1450
5376 END 
5378 LET E:=TRUE
5380 LET CHANNEL:=ZZ(10),DEVICE:=ZZ(20),IMBNUM:=ZZ(90)
5382 INIT 
5384 LET U:=0,ZZ(40):=15,ZZ(70):=0
5386 CANCEL 0
5388 STATUS 0,PP(0)
5390 DESCRIBE 0,GG(0)
5392 IF GG(0) EQ !8001 THEN 5408
5394 PRINT &EE(15630,15659)
5396 INPUT U
5398 IFN -1 LT U LT 16 THEN 5408
5400 LET U:=1 LSL U
5402 IF U AND GG(0) THEN 5408
5404 PRINT &EE(15670,15689)
5406 LET E:=FALSE
5408 LET ZZ(40):=U
5410 RETURN 
5412 GOSUB 84
5414 GOSUB 710
5416 PRINT 0,&EE(W,A);" Utility"
5418 GOSUB 718
5420 RETURN 
5422 IF PP(0) AND !F00=!F00 THEN 5434
5424 IF &DD(5)=2 THEN 5438
5426 IF &DD(5)=1 THEN 5442
5428 IF &DD(5)=0 THEN 5442
5430 PRINTEX "Unkown ";
5432 GOTO 5444
5434 PRINTEX "Controller ";
5436 GOTO 5444
5438 PRINTEX "Tape ";
5440 GOTO 5444
5442 PRINTEX "Disc ";
5444 PRINTEX &EE(15700,15717)
5446 RETURN 
5448 FUNCTION BCDCNVT VALUE1,VALUE2,VALUE3,VALUE4
5450 IF VALUE1 OR VALUE2 THEN 5458
5452 IF VALUE3<0 THEN 5458
5454 PRINT VALUE3;
5456 ENDF 
5458 LET VALUE4:=VALUE3 AND !FFF,Q:=VALUE2 LSL 4 AND !FF0
5460 LET VALUE3:=VALUE3 LSR 12 OR Q,Q:=VALUE1 AND !F LSL 8
5462 LET VALUE2:=VALUE2 LSR 8 OR Q,VALUE1:=VALUE1 LSR 4
5464 LET NN(0):=NN(1):=NN(2):=NN(3):=0
5466 FOR NN(5):=1 UNTIL 48
5468 FOR X:=0 UNTIL 3
5470 LET Q:=NN(X) LSR 8 AND !F
5472 IF Q<=4 THEN 5476
5474 LET NN(X):=NN(X)+!300 AND !FFF
5476 LET Q:=NN(X) LSR 4 AND !F
5478 IF Q<=4 THEN 5482
5480 LET NN(X):=NN(X)+!30 AND !FFF
5482 LET Q:=NN(X) AND !F
5484 IF Q<=4 THEN 5488
5486 LET NN(X):=NN(X)+3 AND !FFF
5488 NEXT 5468
5490 LET Q:=NN(1) LSR 11,NN(0):=NN(0) LSL 1+Q AND !FFF
5492 LET Q:=NN(2) LSR 11,NN(1):=NN(1) LSL 1+Q AND !FFF
5494 LET Q:=NN(3) LSR 11,NN(2):=NN(2) LSL 1+Q AND !FFF
5496 LET Q:=VALUE1 LSR 11,NN(3):=NN(3) LSL 1+Q AND !FFF
5498 LET Q:=VALUE2 LSR 11,VALUE1:=VALUE1 LSL 1+Q AND !FFF
5500 LET Q:=VALUE3 LSR 11,VALUE2:=VALUE2 LSL 1+Q AND !FFF
5502 LET Q:=VALUE4 LSR 11,VALUE3:=VALUE3 LSL 1+Q AND !FFF
5504 LET VALUE4:=VALUE4 LSL 1 AND !FFF
5506 NEXT 5466
5508 LET &NN(0):=NN(0) LSR 8 AND !F+!30,&NN(1):=NN(0) LSR 4 AND !F+!30
5510 LET &NN(2):=NN(0) AND !F+!30,&NN(3):=NN(1) LSR 8 AND !F+!30
5512 LET &NN(4):=NN(1) LSR 4 AND !F+!30,&NN(5):=NN(1) AND !F+!30
5514 LET &NN(6):=NN(2) LSR 8 AND !F+!30,&NN(7):=NN(2) LSR 4 AND !F+!30
5516 LET &NN(8):=NN(2) AND !F+!30,&NN(9):=NN(3) LSR 8 AND !F+!30
5518 LET &NN(10):=NN(3) LSR 4 AND !F+!30,&NN(11):=NN(3) AND !F+!30
5520 FOR Q:=0 UNTIL 11
5522 IF &NN(Q) NE "0" THEN 5526
5524 NEXT 5520
5526 FOR X:=Q UNTIL 11
5528 PRINT &NN(X);
5530 NEXT 5526
5532 ENDF 
5534 LET J:=0
5536 FOR I:=17000 UNTIL 18500
5538 LET X:=&EE(I)-48
5540 IF X<10 THEN 5544
5542 LET X:=X-7
5544 LET I:=I+1,Y:=&EE(I)-48
5546 IF Y<10 THEN 5550
5548 LET Y:=Y-7
5550 LET &HH(J):=Y LSL 4 OR X,J:=J+1
5552 NEXT 5536
5554 RETURN 
5556 FUNCTION DTOHEX VALUE1,VALUE2,VALUE3,VALUE4,VALUE5,VALUE6
5558 FOR VALUE2:=0 UNTIL 5
5560 LET &NN(VALUE2):=0
5562 NEXT 5558
5564 LET VALUE2:=0
5566 FOR VALUE3:=0 UNTIL VALUE1
5568 LET VALUE4:=&FF(VALUE3),VALUE2:=VALUE4*6+VALUE2,VALUE5:=0
5570 FOR Y:=0 UNTIL 5
5572 LET VALUE6:=VALUE2+Y,X:=&NN(Y)+&HH(VALUE6)+VALUE5,VALUE5:=X LSR 8
5574 LET &NN(Y):=X AND !FF
5576 NEXT 5570
5578 LET VALUE2:=10-VALUE4*6+VALUE2
5580 NEXT 5566
5582 LET NN(0):=&NN(5) LSL 8 OR &NN(4),NN(1):=&NN(3) LSL 8 OR &NN(2)
5584 LET NN(2):=&NN(1) LSL 8 OR &NN(0)
5586 ENDF 
5588 IFN &FF(0) OR &FF(1) OR &FF(2) THEN 5602
5590 PRINTEX &EE(15720,15738)
5592 LET W:=&FF(0)
5594 PRINTEX "FAULT CODE = ";!W
5596 IFN &FF(1) THEN 5602
5598 LET W:=&FF(1)
5600 PRINTEX "STATUS = ";!W
5602 RETURN 
5604 FUNCTION PRNIERS VALUE1
5606 IFN VALUE1 AND 2=0 THEN 5610
5608 PRINT &EE(16602,16623)
5610 IFN VALUE1 AND 4=0 THEN 5614
5612 PRINT &EE(16625,16649)
5614 IFN VALUE1 AND 8=0 THEN 5618
5616 PRINT &EE(16650,16672)
5618 IFN VALUE1 AND 16=0 THEN 5622
5620 PRINT &EE(16674,16697)
5622 IFN VALUE1 AND 32=0 THEN 5626
5624 PRINT &EE(11390,11409)
5626 IFN VALUE1 AND 64=0 THEN 5630
5628 PRINT &EE(11360,11381)
5630 IFN VALUE1 AND 128=0 THEN 5636
5632 PRINT &EE(16700,16718)
5634 GOTO 5640
5636 IFN VALUE1=0 THEN 5640
5638 PRINT &EE(16720,16758)
5640 ENDF 
5642 PRINT &EE(9570,9592),&EE(9600,9613),&EE(9620,9633)
5644 PRINT "3 = DA","4 = 17","5 = AA","6 = FF","7 = 0"
5646 PRINT &EE(9690,9720);
5648 LET AA(70):=1,C:=7
5650 GOSUB 4176
5652 IF K THEN 5656
5654 LET F:=0,&BB(6):=D
5656 RETURN 
5658 LET AA(78):=780,AA(100):=787
5660 GOSUB 5412
5662 GOSUB 1424
5664 IF Z THEN 5670
5666 GOSUB 5674
5668 GOTO 2742
5670 PRINT &EE(8050,8097)
5672 GOTO 2742
5674 LET Y:=16,Z:=DD(0)
5676 PRINT &EE(15800,15846);
5678 GOSUB 5236
5680 PRINT " ",&EE(15850,15873);DD(1);&EE(15873,15890)
5682 LET D:=&DD(4)
5684 PRINT &EE(15900,15928);
5686 IF D=1 THEN 5694
5688 IF D=2 THEN 5698
5690 PRINT &EE(15929,15939)
5692 GOTO 5700
5694 PRINT &EE(15940,15949)
5696 GOTO 5700
5698 PRINT &EE(15950,15959)
5700 PRINT &EE(15960,15973);
5702 LET D:=&DD(5)
5704 IF D=1 THEN 5712
5706 IF D=2 THEN 5716
5708 PRINT &EE(15974,15983)
5710 GOTO 5718
5712 PRINT &EE(15985,16013)
5714 GOTO 5718
5716 PRINT " TAPE"
5718 LET Z:=&DD(7) LSL 4 AND !F0,&DD(6):=&DD(6) LSL 4
5720 LET &DD(7):=&DD(7) LSR 4,D:=&DD(7) AND !F OR &DD(6) LSL 8
5722 LET D:=D OR Z AND !FFF0,Z:=&DD(8) LSR 4,D:=D OR Z
5724 PRINT &EE(16020,16036);!D
5726 LET D:=&DD(9) LSL 8 OR &DD(10)
5728 PRINT &EE(16040,16067);D
5730 LET D:=&DD(11)
5732 PRINT &EE(16070,16110);D
5734 LET D:=&DD(12)
5736 PRINT &EE(16120,16144);D
5738 LET D:=&DD(13) LSL 8 OR &DD(14)
5740 PRINT &EE(16150,16171);D;&EE(16171,16183)
5742 LET D:=&DD(15) LSL 8 OR &DD(16)
5744 PRINT &EE(16190,16213);D;&EE(15873,15890)
5746 LET D:=&DD(17) LSL 8 OR &DD(18)
5748 PRINT &EE(16220,16240);D;&EE(16240,16260)
5750 LET D:=&DD(19) LSL 8 OR &DD(20)
5752 PRINT &EE(16264,16293);D;&EE(16240,16260)
5754 LET D:=&DD(21)
5756 PRINT &EE(16300,16327);D
5758 LET Z:=&DD(22),Y:=8
5760 IF Z=0 THEN 5768
5762 PRINT &EE(16330,16386);
5764 GOSUB 5236
5766 PRINT 
5768 LET Z:=&DD(23),Y:=8
5770 IF Z=0 THEN 5778
5772 PRINT &EE(16390,16420);&EE(16357,16386);
5774 GOSUB 5236
5776 PRINT 
5778 IF &DD(5)=2 THEN 5796
5780 LET D:=&DD(25) LSL 8 OR &DD(26)
5782 LET DD(12):=DD(12) LSR 8
5784 PRINT &EE(16430,16447),&EE(16447,16460);
5786 BCDCNVT 0,DD(12),D,VALUE4
5788 LET D:=&DD(27)
5790 PRINT " HEAD = ";D;
5792 LET D:=&DD(28) LSL 8 OR &DD(29)
5794 PRINT &EE(16461,16470);D
5796 PRINT &EE(16472,16503);
5798 BCDCNVT DD(15),DD(16),DD(17),VALUE4
5800 LET D:=&DD(36)
5802 PRINT " ",&EE(16510,16537);D
5804 RETURN 
5806 PRINT 
5808 PRINT 
5810 PRINT 
5812 PRINT &EE(18250,18307)
5814 PRINT &EE(18308,18365)
5816 PRINT &EE(18366,18423)
5818 PRINT &EE(18424,18481)
5820 PRINT &EE(18482,18539)
5822 PRINT &EE(18540,18597)
5824 PRINT &EE(18598,18655)
5826 PRINT &EE(18656,18713)
5828 PRINT &EE(18714,18771)
5830 PRINT &EE(18772,18829)
5832 PRINT &EE(18830,18887)
5834 PRINT &EE(18888,18945)
5836 PRINT 
5838 PRINT 
5840 PPRINT &EE(18950,18988)
5842 RETURN 
5844 IF ZZ(80) NE !204 THEN 5848
5846 GOTO 5878
5848 IF ZZ(80) NE !20A THEN 5852
5850 GOTO 5878
5852 IF ZZ(80) NE !220 THEN 5856
5854 GOTO 5878
5856 IF ZZ(80) NE !205 THEN 5860
5858 GOTO 5878
5860 IF ZZ(80) NE !208 THEN 5864
5862 GOTO 5878
5864 IF ZZ(80) NE !209 THEN 5868
5866 GOTO 5878
5868 IF ZZ(80) NE !260 THEN 5872
5870 GOTO 5878
5872 IF ZZ(80) NE !212 THEN 5876
5874 GOTO 5878
5876 IF ZZ(80) NE !240 THEN 5880
5878 GOTO 1466 .A VALID CS80 DEVICE
5880 PRINT 
5882 PRINT 
5884 PRINT &EE(18250,18307)
5886 PRINT &EE(18989,19046)
5888 PRINT &EE(18482,18539)
5890 PRINT &EE(19047,19104)
5892 PRINT &EE(18482,18539)
5894 PRINT &EE(18772,18829)
5896 PRINT &EE(18830,18887)
5898 PRINT &EE(18888,18945)
5900 PRINT 
5902 PRINT 
5904 PPRINT &EE(18950,18988)
5906 PRINT 
5908 PRINT 
5910 GOTO 44 .A NONSUPORTED DEVICE
