start tok64 d64-Zis4cl 4 FOR x=248 TO 251:POKE x,0:NEXT x:REM clear rs-232 pointers 5 POKE 643,255:POKE 644,127 10 POKE55,255:POKE56,127:CLR:OPEN 11,2,0,CHR$(1)+CHR$(0):v=53248 20 POKE v+17,11:rs=659 100 GOSUB 40000 120 GOSUB 45000 130 GOSUB 46000 140 DIMbr(10):FOR x=1 TO 10:READ br(x):NEXT x 150 br=8 200 REM ds=device 210 ds=0:REM keyboard 300 PRINT"{home}{down}{right*11}{blue}"de$(ds)"{black}, or press SPACE{space*3}" 330 GOTO 500 400 REM flash in blue 410 REM 420 POKE v+39+ds,6:REM reg. x,y & blue 430 REM 440 FOR a=1 TO 20:GETa$ 450 IF a$=" "THEN 600 460 IF a$=CHR$(13)THEN900 465 IF a$="t" THEN tf=1:GOSUB 12000:GOTO 960 470 NEXT 500 REM flash gray 510 REM 520 POKE v+39+ds,15 530 REM 540 FOR a=1 TO 20:GETa$ 550 IF a$=" "THEN 600 560 IF a$=CHR$(13)THEN900 565 IF a$="t" THEN tf=1:GOSUB 12000:GOTO 960 570 NEXT 580 GOTO 400 600 REM next device 610 POKEv+39+ds,0 620 ds=ds+1:IF ds=8 THEN ds=0 630 GOTO 300 900 REM select: first, move 905 PRINT"{black}"; 910 REM poke v+21,255-2{^}ds:rem turn off 920 POKE v+2*ds,x(ds):POKEv+1+2*ds,y(ds):POKE v+39+ds,1:REM reg. x,y & white 930 REM poke v+21,2{^}ds:rem turn on 931 POKE v+27,255:REM priority 932 x=v+2*ds:FOR xp=x(ds)TO40STEP-.3:POKEx,xp:NEXT xp 940 tf=0:REM autotest := false 945 POKE v+21,0:POKEv+27,0:REM priority 955 ON ds+1 GOSUB 1000,1500,3000,2000,4000,5000,6000,7000 960 POKEv+21,0:GOSUB 45000:GOSUB 46000:FORa=1TO10:GETa$:NEXT:GOTO 300 1000 PRINT"{clear}Keyboard Test - How To Use{down}" 1010 PRINT"A representation of the keyboard will be" 1020 PRINT"shown on the screen. The first time you" 1030 PRINT"{down}press a key, its counterpart should" 1040 PRINT"{down}become underlined. Subsequent pressings" 1041 PRINT"{down}should flash the key on and off. Do not" 1050 PRINT"{down}test the RUN/STOP key.{space*2}Press the SPACE" 1060 PRINT"{down}BAR to end the test." 1070 GOSUB 8000:IF ab$="e"THENRETURN 1075 ch$(0)="C" 1080 PRINT"{clear}{down*4}" 1090 PRINT"{arrow left} 1 2 3 4 5 6 7 8 9 0 + - {pound} {reverse on}s{reverse off} {reverse on}t{reverse off}{space*2}f1" 1100 PRINT"{down}{space*2}Q W E{sh space}R{sh space}T{sh space}Y{sh space}U I O{sh space}P @ * ^{space*6}f3" 1110 PRINT"{down}{space*2}A{sh space}S{sh space}D{sh space}F{sh space}G{sh space}H{sh space}J{sh space}K{sh space}L : ; = {reverse on}r{reverse off}{space*6}f5" 1120 PRINT"{down}{space*2}Z{sh space}X{sh space}C{sh space}V{sh space}B{sh space}N{sh space}M , . /{space*3}{reverse on}^{reverse off} {reverse on}{arrow left}{reverse off}{space*6}f7" 1121 a$="{reverse on}":FOR a=1 TO 40:a$=a$+" ":NEXT 1122 PRINT"{home}{red}"a$"{yellow}"a$"{green}"a$"{blue}"a$ 1123 PRINT"{down*8}{blue}"a$"{green}"a$"{yellow}"a$"{red}"a$ 1124 PRINT"{black}{reverse on}s{reverse off} : CLR / HOME key{space*4}{reverse on}^{reverse off} : CRSR UP/DN" 1125 PRINT"{black}{reverse on}t{reverse off} : INST / DEL key{space*4}{reverse on}{arrow left}{reverse off} : CRSR LEFT/RT" 1126 PRINT"{black}{reverse on}r{reverse off} : RETURN key" 1127 PRINT"{down}Keys not shown are not tested. " 1128 PRINT"{down}{blue}PRESS{sh space}SPACE BAR{sh space}TO{sh space}EXIT.{home}" 1129 PRINT"{home}{down*20}{right*19}ASCII:" 1130 a=PEEK(197):IF a=64 THEN 1130 1131 IF a=60 THEN RETURN 1132 GETa$:IFa$<>""THEN PRINT"{up}{right*25}"ASC(a$) 1135 po=32968+pl(a):p0=po+40:p1=pl(a)+55536 1136 IF PEEK(p0)=32 THEN POKE p0,119:POKEp1,0:GOTO1150 1140 p2=PEEK(po):p2=(p2AND127)OR(128-(p2AND128)):POKE po,p2 1150 IF PEEK(197)=a THEN1150 1155 PRINT"{up}{right*25}{space*6}":FORa=1 TO 10:GETa$:NEXT 1160 GOTO1130 1500 REM *** cassette test 1510 PRINT"{clear}Cassette Test - How To Use{down}" 1515 PRINT"This test requires that you insert a" 1520 PRINT"{down}blank or scratch cassette into the deck" 1525 PRINT"{down}and that you operate the tape controls" 1530 PRINT"{down}as directed by the program." 1540 PRINT"{down}The screen will 'blank out' during the{space*2}{down}cassette operations." 1590 GOSUB 8000:IF ab$="e" THEN RETURN 1600 PRINT"{clear}Cassette Test - IN PROGRESS" 1605 PRINT"{down*2}Insert and rewind the scratch tape, then" 1610 PRINT"press Record and Play, then{down}":GOSUB 1990:GOSUB 1996:GOSUB 1997 1611 ti$="{0*6}":er$(1)="Device Not Responding" 1612 IF ti>600 THEN 1800 1613 IFPEEK(1)AND32THEN 1612 1615 OPEN 1,1,1,"cds-test":IF st<>0 THEN 1800 1618 er$(1)="Write Error" 1620 FOR x=1 TO 255:PRINT#1,CHR$(x);:PRINT"Now Writing "x"{up}" 1623 NEXT x 1625 PRINT#1:CLOSE1 1627 PRINT"{space*26}" 1630 PRINT"{up}Rewind tape and press Play, then{down}":GOSUB 1990:GOSUB 1996 1636 ti$="{0*6}":er$(1)="Device Not Responding" 1637 IF ti>600 THEN 1800 1638 IFPEEK(1)AND32THEN 1637 1640 OPEN 1,1,0,"cds-test":er$(1)="Read Error" 1650 FOR x=1 TO 255:GET#1,a$:IF a$<>CHR$(x) THEN 1800 1655 IF st<>0 THEN 1800 1657 PRINT"Now Reading "x"{up}" 1660 NEXT x:er$(1)="O.K.":ch$(7)="{sh @}":CLOSE 1 1661 PRINT"{clear}{down}Cassette unit has PASSED the performance{down}test.{down}":GOSUB1990 1670 RETURN 1800 CLOSE1:PRINT"{clear}{down}Cassette Unit Failure:{down}":PRINTer$(1)"{down}" :GOSUB 1990 1810 ch$(7)="F":RETURN 1990 PRINT"Press 'C' to continue.{up}" 1992 GET a$:IF a$<>"c"THEN 1992 1995 PRINT"{space*30}":RETURN 1996 PRINT"{up*3}{space*31}{sh space*6}":RETURN 1997 PRINT"{up*3}{space*31}{sh space*6}{space*3}":RETURN 2000 PRINT"{clear}Printer Test - How to Use" 2005 PRINT"{down}This routine tests the printer for" 2010 PRINT"{down}'handshaking' and data transmission." 2015 PRINT"{down}Your printer should be plugged in and" 2020 PRINT"{down}connected via cable to the computer or" 2025 PRINT"{down}disk drive (which must be ON)." 2030 PRINT"{down}Switch the printer ON and ONLINE (if" 2035 PRINT"{down}necessary) and check the paper.{space*2}The" 2040 PRINT"{down}printer sould print all the ASCII" 2045 PRINT"{down}characters three times on your printer." 2090 GOSUB 8000:IF ab$="e" THEN RETURN 2095 PRINT"{clear}Printer Test - IN PROGRESS" 2097 IF tf THEN dn=pd:GOTO 2110 2100 dn=4:IF ab$="B" THEN GOSUB 8500 2105 IF dn=2 THEN PRINT"{clear}Printer Test - IN{sh space}PROGRESS" 2110 IF dn<>2 THEN POKE 2,dn:SYS 49280:IF PEEK(2)<>0 THEN 2900 2115 IF dn=2 THEN CMD11:GOTO 2130 2120 OPEN 1,dn:CMD1 2130 FOR x=1 TO 3 2140 FOR y=32 TO 64:PRINTCHR$(y);:NEXT y:PRINT 2150 FOR y=65 TO 127:PRINTCHR$(y);:NEXT y:PRINT 2160 NEXT x 2170 IF dn<>2THENPRINT#1:CLOSE1 2175 IF dn=2 THEN PRINT#11 2180 er$(3)="O.K.":ch$(2)="{sh @}":t$="{left} and PASSED." 2181 IF dn=2 THEN er$(3)="Complete":ch$(2)="C":t$="" 2182 PRINT"{clear}{down}Performance test completed."t$"{down}" 2183 IF tf<>1 THEN GOSUB 1990 2184 RETURN 2900 ch$(2)="F":er$(3)="Device Not Responding" 2910 PRINT"{clear}{down}Printer Test FAILED - No Response from{space*2}{down}printer.{down}" 2920 IF tf<>1 THEN GOSUB 1990 2930 RETURN 3000 PRINT"{clear}Disk Test - How To Use" 3005 PRINT"{down}This test requires that the disk drive" 3010 PRINT"{down}be switched ON and connected to the 64" 3015 PRINT"{down}and that a scratch diskette be inserted" 3020 PRINT"{down}into the drive.{down}" 3090 GOSUB 8000:IF ab$="e" THEN RETURN 3092 IF tf THEN dn=dd:GOTO 3100 3095 dn=8:IF ab$="B" THEN PRINT"{clear}{down}":GOSUB8500 3100 PRINT"{reverse off}{clear}Disk Test - In Progress{down*2}" 3110 POKE 2,dn:SYS 49280 3120 IF PEEK(2)<>0 THEN er$(2)="Disk Not Responding":GOTO 3900 3130 OPEN 1,dn,15,"n:cds test,01" 3135 PRINT"{down}Clearing the disk." 3140 GOSUB 3800:IF ef THEN 3990 3145 PRINT"{down}Now Testing 'SAVE' Function." 3150 SAVE "cds",dn:GOSUB 3800:IF ef THEN 3990 3160 PRINT"{down}Now checking the Save." 3165 OPEN 2,dn,0,"cds,p,r":GET#2,a$:GOSUB 3800:CLOSE2:IF ef THEN 3990 3170 POKE2,dn:SYS49328:IF(PEEK(2)<>0)OR(st<>64)THENef=1:em$="Verify error":GOTO3990 3175 GOSUB 3800:IF ef THEN 3990 3180 PRINT"{down}Now Checking DOS internal functions" 3190 PRINT#1,"s:cds":GOSUB 3800:IF ef THEN 3990 3200 OPEN 4,dn,4,"#":GOSUB 3800:IF ef THEN 3990 3210 PRINT#1,"b-p";4;0:GOSUB 3800:IF ef THEN 3990 3220 t$="":FOR x=1 TO 255:t$=t$+CHR$(x):NEXT x 3230 PRINT#4,t$; 3240 PRINT:FOR tr=1 TO 35:PRINT"Writing Track "tr"{up}" 3250 PRINT#1,"u2:";4;0;tr;(trAND15):GOSUB 3800:IF ef THEN 3990 3260 NEXT tr 3270 FOR tr=1 TO 35:PRINT"Retrieving Track "tr"{up}" 3280 PRINT#1,"u1:";4;0;tr;(trAND15):GOSUB 3800:IF ef THEN 3990 3290 NEXT tr 3300 CLOSE4:CLOSE1 3780 ch$(1)="{sh @}":er$(2)="O.K." 3781 PRINT"{clear}{down}Disk unit has PASSED{sh space}the performance{space*4}{down}test.{down}" 3782 IF tf<>1THEN GOSUB 1990 3783 RETURN 3790 RETURN 3800 INPUT#1,en,em$,et,es:ef=0 3810 IF en<2 THEN RETURN 3900 ch$(1)="F":ef=1 3912 RETURN 3990 er$(2)=em$:CLOSE1:CLOSE4 3991 PRINT"{clear}{down}Disk unit has FAILED{sh space}the performance{space*4}{down}test due to: "er$(2) 3992 PRINT: IF tf<>1THEN GOSUB 1990 3993 RETURN 4000 PRINT"{clear}Video Test Pattern - How To Use." 4010 PRINT"{down}A gray scale, a blue scale, and a " 4020 PRINT"{down}spectrum will be drawn on the screen." 4030 PRINT"{down}Adjust the fine tuning, tint (Hue)," 4040 PRINT"{down}brightness, color, and picture controls" 4050 PRINT"{down}on your TV or monitor (if you have them)" 4060 PRINT"until the colors look right to you" 4070 GOSUB 8000:IF ab$="e"THENRETURN 4080 ch$(3)="C" 4100 POKE 53280,0:POKE 53281,0 4110 PRINT"{clear}{down*2}"; 4120 co$="BLACK{space*4}{black}GRAY 1{space*3}{dark gray}GRAY 2{space*3}{gray}GRAY 3{space*3}{light gray}WHITE{space*4}{white}":GOSUB4900 4130 PRINT:co$="BLUE{space*5}{blue}LITE{sh space}BLUE{light blue}CYAN{space*5}{cyan}WHITE{space*4}{white}":GOSUB4900 4140 PRINT:co$="RED{space*6}{red}ORANGE{space*3}{orange}YELLOW{space*3}{yellow}GREEN{space*4}{green}BLUE{space*5}{blue}PURPLE{space*3}{156}" 4150 GOSUB 4900 4160 PRINT"{down}{white}Press SPACE to change background color;" 4170 PRINT"{down}{white}Press E to exit the test." 4180 co=0 4190 POKE 53280,co:POKE53281,co 4200 GET a$:IF a$="e"THEN v=53248:GOTO960 4210 IF a$<>" "THEN4200 4220 co=co+1:IF co=16 THEN co=0 4230 IF co=1 THEN co=2 4240 GOTO 4190 4900 FOR co=1TO LEN(co$)STEP10:PRINT"{reverse off}{white}"MID$(co$,co,10)"{reverse on}"; 4910 PRINT"{space*30}":NEXT:RETURN 5000 PRINT"{clear}Audio Test - How To Use" 5010 PRINT"{down}This test plays a scale through each of" 5020 PRINT"{down}the computer's three "CHR$(34)"voices"CHR$(34)". Since it" 5030 PRINT"{down}is very unlikely that the actual S.I.D." 5040 PRINT"{down}sound device inside the 64 is malfunc-" 5050 PRINT"{down}tioning, if you do not hear the beeps," 5060 PRINT"{down}check the following:" 5070 PRINT"{down}* Fine Tuning on TV set" 5080 PRINT"{down}* Volume on TV or monitor" 5090 PRINT"{down}* Cable to TV or especially monitor" 5100 PRINT"{down}* MUTE switches, etc." 5110 GOSUB 8000 5120 IF ab$="e" THEN RETURN 5125 ch$(4)="C" 5130 PRINT"{clear}Sound Test - IN PROGRESS{down}" 5140 PRINT"{red}Voice 1:":PRINT"{white}Voice 2:":PRINT"{blue}Voice 3:{black}":s=v+1024:tw=EXP(LOG(2)/12) 5145 GOSUB 5900:REM scale 5150 vl=54296:hi(1)=54273:lo(1)=54272:wa(1)=54276:ad(1)=54277:sr(1)=54278 5160 hi(2)=54280:lo(2)=54279:wa(2)=54283:ad(2)=54284:sr(2)=54286 5170 hi(3)=54287:lo(3)=54286:wa(3)=54290:ad(3)=54291:sr(3)=54292 5175 FOR x=0 TO 24:POKE s+x,0:NEXT x:REM turn off all sound 5180 a$(1)="{down*2}{right*9} Press 'E' to exit" 5190 a$(2)="{down}"+a$(1) 5200 a$(3)="{down*2}"+a$(1) 5300 FOR vs=1 TO 3 5310 PRINT"{home}"a$(vs) 5320 POKE vl,15:POKE ad(vs),51:POKE wa(vs),33:POKE sr(vs),51:GOSUB 5500 5340 PRINT"{up}{right*9}{space*30}" 5345 IF ef THENPOKEvl,0:RETURN 5350 NEXT vs:POKE vl,0:POKE v+21,1:REM turn off sound 5360 GOTO5110 5500 REM scales 5505 POKE v+2,50:POKE v+3,119:POKE v+21,3 5510 no=1072:mn=8583:ef=0 5515 POKE wa(vs)-2,0:POKE wa(vs)-1,4:REM pulse width 5520 POKE lo(vs),no-INT(no/256)*256:POKE hi(vs),INT(no/256) 5530 POKE wa(vs),2^(3+vs)+1:ti$="{0*6}" 5532 IF ti<15 THEN 5532 5535 GET a$:IF a$="e" THEN ef=1:RETURN 5540 POKE wa(vs),0 5545 dp=PEEK(v+3)-4:POKEv+2,PEEK(v+2)+5 5547 IF dp<103 THEN dp=135 5549 POKE v+3,dp 5550 no=no*tw:IF INT(no)" "THEN 6097 6099 jn=1-jn:GOTO6095 6100 REM 6101 POKE v+32,6:POKE v+33,6:PRINT"{clear}"CHR$(142)CHR$(8) 6110 POKE 33784,26:POKE 33785,26:POKE v+39,14:POKE v+40,1 6120 POKE v,164:POKE v+1,150:POKE v+2,80:POKE v+3,90 6130 POKE v+23,0:POKE v+29,0 6140 ch$(5)="C" 6141 PRINT"{clear}{white}joystick test - in progress." 6142 IF jn=0 THEN PRINT"{down}testing joystick #2" 6143 IF jn=1 THEN PRINT"{down}testing joystick #1" 6150 PRINT"{space*4}{white}{down}{space*3}U{sh asterisk}I 6151 PRINT"{space*7}{sh -} {sh -} 6152 PRINT"{space*7}J{sh asterisk}K{space*3}{cm p*3}{space*2}NM{space*2}{cm p*3} 6153 PRINT"{space*12}{cm n}{space*2}N N{space*2}M M{space*2}{cm h} 6154 PRINT"{space*12}{cm n}{space*2}M {cm y}{cm j}{cm l}{cm y} N{space*2}{cm h} 6155 PRINT"{space*12}{cm n}NM M {cm j}{cm l} N NM{cm h} 6156 PRINT"{space*15}M M{cm j}{cm l}N N 6157 PRINT"{space*13}N{cm h} M{sh space}{space*3}N {cm l}M 6158 PRINT"{space*12}N {cm y*3}{space*4}{cm y*3} M 6159 PRINT"{space*12}M {cm p*3}{space*4}{cm p*3} N 6160 PRINT"{space*13}M{cm h} N{space*4}M {cm l}N{sh space} 6161 PRINT"{space*15}N N{cm j}{cm l}M M {sh space*2} 6162 PRINT"{space*12}{cm n}MN N {cm j}{cm l} M MN{cm h} 6163 PRINT"{space*12}{cm n}{space*2}N {cm p}{cm j}{cm l}{cm p} M{space*2}{cm h} 6164 PRINT"{space*12}{cm n}{space*2}M M{space*2}N N{space*2}{cm h} 6165 PRINT"{space*13}{cm y*3}{space*2}MN{space*2}{cm y*3} 6166 PRINT" 6168 PRINT"{down}press 'e' to exit." 6169 PRINT"{down}press 'b' to test other joystick.{home}" 6170 POKE v+21,1 6200 js=(NOTPEEK(56320+jn)) 6210 IF jsAND16THENPOKE v+21,3:GOTO 6230 6220 POKE v+21,1 6230 xp=164+(42*((4ANDjs)>0))-(42*((8ANDjs)>0)) 6240 yp=150+(42*((1ANDjs)>0))-(42*((2ANDjs)>0)) 6250 POKE v,xp:POKE v+1,yp 6260 GET a$:IF a$<>"e" ANDa$<>"b" THEN 6200 6265 IF a$="b"THEN jn=1-jn:GOTO6142 6270 PRINT"{clear}"CHR$(14)CHR$(8):RETURN 6900 jn=0 6910 RETURN 6999 PRINT"{home}":END 7000 PRINT"{clear}Comprehensive RAM Test - How To Use" 7010 PRINT"{down}This program includes a machine-language"; 7020 PRINT"memory test which, without disturbing" 7030 PRINT"the system, can test over 50,{0*3} bytes" 7040 PRINT"(most of the available RAM) in under" 7050 PRINT"15 seconds.{space*2}Because this is faster than"; 7060 PRINT"the TV/Monitor scan rate, you may see" 7070 PRINT"flickers across the screen.{space*2}This is" 7080 PRINT"normal." 7090 PRINT"{down}Some RAM errors manifest themselves" 7100 PRINT"seemingly at random. For this reason, we"; 7110 PRINT"have included a way of testing the RAM" 7120 PRINT"repeatedly, which allows overnight test-"; 7130 PRINT"ing (we advise you to turn off your TV" 7140 PRINT"or monitor for overnight testing," 7145 PRINT"then turn it on later to see results)." 7150 PRINT"{down}An error message will be displayed in" 7160 PRINT"the case of RAM failure." 7170 GOSUB 8000 7175 IF tf THEN sc=1:GOTO 7300 7180 IF ab$="e" THEN RETURN 7190 PRINT"{clear}{down*5}Press SPACE{sh space}BAR to select between" 7200 PRINT"{down}{reverse on}SINGLE{reverse off} and CONTINUOUS testing." 7210 PRINT"{down}Press RETURN to begin testing.{up*2}" 7220 sc=1 7230 IF sc=1 THEN PRINT"{up}{reverse on}SINGLE{reverse off} and CONTINUOUS":GOTO 7250 7240 PRINT"{up}SINGLE and {reverse on}CONTINUOUS" 7250 GET a$:IF a$=CHR$(13)THEN7300 7260 IF a$<>" "THEN 7250 7270 sc=1-sc:GOTO7230 7300 POKE v+32,0:POKE v+33,0 7310 PRINT"{clear}{white}RAM Test - In Progress {down}":ln=0 7320 SYS 49152:IF PEEK(2)=255 THEN 7500 7325 IF sc THENer$(4)="O.K.":GOTO 7600 7327 PRINT"{clear}{white}RAM{sh space}Test - In Progress {down}" 7330 ln=ln+1:PRINTln,"Successful Pass";:IF ln>1 THEN PRINT"es"; 7335 PRINT 7340 PRINT"{down}Next pass in 5 seconds." 7350 PRINT"Press 'E' to exit{up*2}" 7360 ti$="{0*6}" 7365 GET a$:IF a$="e" THEN ch$(6)="{sh @}":RETURN 7370 tl=5-VAL(ti$):PRINT"Next pass in"tl"second";:IF tl<>1 THEN PRINT"s"; 7380 PRINT". {up}" 7385 IF ti$<>"{0*5}5" THEN 7365 7390 PRINT"{space*36}" 7395 PRINT"{space*36}{up*4}":GOTO 7320 7500 ch$(6)="F":er$(4)="RAM Failure" 7510 PRINT"{clear}{down}*** RAM{sh space}Failure Detected ***" 7520 PRINT"{down}Press 'E' to exit.":IF tf THEN 7540 7530 GET a$:IF a$<>"e" THEN 7530 7540 RETURN 7600 PRINT"{clear}{down}RAM{sh space}Test successfully completed":ch$(6)="{sh @}":GOTO 7520 8000 REM abort ??? 8005 IF tf THEN ab$="b":RETURN 8010 PRINT"{down}>Press B to begin test or E to exit.{home}" 8020 GET ab$:IFab$="b"OR ab$="B"OR ab$="e"THENRETURN 8030 GOTO8020 8500 IF dn=4 THEN ld=2:hd=5 8502 IF dn=8 THEN ld=8:hd=9 8505 PRINT"{down}Enter device number or press RETURN {reverse on}"RIGHT$(STR$(dn),1)"{left}"; 8510 GET a$:IF(VAL(a$)hd)AND(a$<>CHR$(13))THEN8510 8520 IF a$=CHR$(13)THENPRINT:GOTO 8550 8530 dn=VAL(a$):PRINT"{reverse on}"a$"{left}"; 8540 GOTO 8510 8550 IF dn<>2 THEN RETURN 8560 r=PEEK(214):c=PEEK(211):POKE 648,136:PRINT"{clear}"; 8565 POKE v+24,PEEK(v+24)OR32 8570 PRINT"{clear}{down*2} 50":PRINT" 75":PRINT" 110":PRINT" 134.5":PRINT" 150":PRINT" 300":PRINT" 600" 8575 br =PEEK(659)AND15 8580 PRINT" 1200":PRINT" 1800":PRINT" 2400":PRINT"{down}Press 'SPACE' to move and 'RETURN'" 8585 PRINT"to Select BAUD rate" 8590 PRINT"{home}":FORx3=1 TO br:PRINT"{down}";:NEXTx3:PRINT">{left}"; 8600 GET a$:IF a$<>CHR$(13) AND a$<>" " THEN 8600 8610 IF a$=CHR$(13) THEN 8700 8620 br=(PEEK(659)AND15)+1:IF br>10 THEN br=1 8630 POKE 659,(PEEK(659)AND240)OR br 8640 PRINT" ":GOTO 8590 8700 PRINT"{clear}{down*3}Number of Stop Bits: {reverse on}1{left}"; 8710 la$="1" 8720 GET a$:IF a$<>"1" AND a$<>"2" AND a$<>CHR$(13)THEN 8720 8730 IF a$=CHR$(13) THEN 8750 8740 la$=a$:PRINTa$"{left}";:GOTO 8720 8750 POKE 659,(PEEK(659)AND127)OR(128*(VAL(la$)-1)) 8760 PRINT:PRINT"{clear}{down*3}Handshake Type (3 or X): {reverse on}3{left}"; 8770 la$="3" 8780 GET a$:IF a$<>"3" AND a$<>"x" AND a$<>CHR$(13)THEN 8780 8790 IF a$=CHR$(13) THEN 8850 8800 IF a$="x" THEN a$="X" 8810 la$=a$:PRINTa$"{left}";:GOTO 8780 8850 tb=0:IF la$="X" THEN tb=128 8860 POKE 660,(PEEK(660)AND127)ORtb 8900 PRINT:PRINT"{clear}{down*3}Now Setting RS-232 Options" 8905 cn=55296:cr=PEEK(646):FOR x=0TO1023:POKEx+cn,cr:NEXTx 8910 SYS 62493 8920 POKE 648,128:POKE v+24,PEEK(v+24)AND15:POKE 214,r:POKE 211,c:PRINT"{up}{down}"; 8930 RETURN 8999 END 12000 POKE v+21,0:GOSUB 12500 12005 PRINT"{clear}AutoTest - How To Use" 12010 PRINT"{down}This will automatically test the Disk," 12015 PRINT"{down}RAM Memory, and Printer. You must mount" 12020 PRINT"{down}a blank diskette in the drive and ready" 12025 PRINT"{down}the printer for printing. Both devices" 12030 PRINT"{down}must be switched ON." 12035 PRINT"{down*2}You will see the Pass/Fail results on" 12040 PRINT"{down}the main screen when the test finishes," 12045 PRINT"{down}and for more detailed results, press T" 12050 PRINT"{down}again.{down}" 12090 tf=0:GOSUB 8000:IF ab$="e" THEN RETURN 12100 tf=1 12105 IF ab$="b" THEN dd=8:pd=4:tc=0:GOTO 12147 12110 PRINT"{clear}{down*2}Select Disk Device":dn=8 12120 GOSUB 8500:dd=dn 12130 PRINT"{down}Select Printer Device":dn=4 12140 GOSUB 8500:pd=dn 12145 GOSUB 12900:REM test cassette 12147 FOR x=1 TO 4:er$(x)="Not Tested":NEXT x 12150 IF tc THEN ds=1:GOSUB 1500 12160 ds=2:GOSUB 3000 12170 ds=3:GOSUB 2000 12180 ds=7:GOSUB 7000 12185 er$(0)="{sh @}" 12190 RETURN 12500 IF er$(0)="" THEN RETURN 12515 PRINT"{clear}{down}Results of last Device Test{down*2}" 12520 PRINT"Cassette:",er$(1) 12530 PRINT"{down}Disk:",er$(2) 12540 PRINT"{down}Printer:",er$(3) 12550 PRINT"{down}Memory:",er$(4) 12560 PRINT:GOSUB 1990:RETURN 12900 PRINT"{down}Test Cassette Unit (Y/N)? {reverse on}N{left}"; 12905 la$="n" 12910 GET a$:IF a$<>"y" AND a$<>"n" AND a$<>CHR$(13) THEN 12910 12920 IF a$=CHR$(13) THEN tc=(la$="y"):PRINT:RETURN 12925 la$=a$ 12930 PRINTCHR$(ASC(a$)+32)"{left}";:GOTO 12910 20000 PRINT"open 1,8,15,"CHR$(34)"s:cds"CHR$(34)":close1:sA"; 20010 PRINTCHR$(34)"cds"CHR$(34)",8:vE"CHR$(34)"cds"CHR$(34)",8" 20020 END 21000 OPEN 1,8,15:INPUT#1,a$,b$,c$,d$:CLOSE1:PRINTb$:END 39999 END 40000 REM initialization 40002 POKEv+24,5:POKE648,128:POKE56576,149:REM set screen 40003 FOR a=1 TO 4:er$(a)="Not Tested":NEXT 40010 POKE 53280,15:POKE 53281,15 40015 FOR de=0 TO 7:ch$(de)="N":NEXT de 40020 PRINT"{clear}{black}{down}64 Doctor Diagnostic Sequence{space*9}"CHR$(14)CHR$(8) 40030 PRINT"{down}{space*38}" 40040 PRINT"{down}{space*13}PUBLIC DOMAIN SOFTWARE{space*4}" 40050 PRINT"{blue}{-*40}" 40060 PRINT"Not for detection of 'soft' errors." 40070 PRINT"Passing a test means only that a device" 40080 PRINT"performed this program's operations" 40090 PRINT"correctly." 40100 PRINT"{down}{black}{-*40}"; 40110 PRINT"INITIALIZING{down}" 40115 POKE v+17,27 40120 GOSUB 50000 40130 PRINT"{clear}":RETURN 45000 POKE v+17,PEEK(v+17)AND239 45005 PRINT"{clear}":POKE53280,15:POKE53281,15 45010 POKE v+21,0:FOR de=0TO7:POKE v+2*de,x(de):POKEv+2*de+1,y(de):NEXT 45020 FORlo=v+37 TO v+46:POKE lo,0:NEXT 45030 POKEv+28,0 45040 FOR lo=0 TO 7:POKE33784+lo,16+lo:NEXT 45050 POKE v+23,16:POKEv+29,29 45070 POKEv+21,255:RETURN 46000 POKE v+17,PEEK(v+17)AND239 46001 PRINT"{black}{home}{down*6}" 46002 PRINT"{black}{reverse on}{right}{space*38}{reverse off}" 46005 :co$="{red}{orange}{yellow}{green}{blue}{156}{red}":FORco=1TOLEN(co$) 46010 PRINTMID$(co$,co,1)"{reverse on}{right}{space*10}{right*18}{space*10}" 46020 NEXT 46030 PRINT"{black}{reverse on}{right}{space*10}{reverse off}{cm d*18}{reverse on}{space*10}{reverse off}" 46040 PRINT"{home}{red}{right}{reverse on}{cm d}{cm i*7}{cm f}":FORco=1TO5:PRINT"{right}{reverse off}{cm k}{right*7}{reverse on}{cm k}":NEXT 46050 PRINT"{right}{reverse on}{cm i*9}" 46060 PRINT"{home}{right*11}{black}Press RETURN to test the" 46070 PRINT"{right*11}Keyboard, or press SPACE" 46080 PRINT"{right*11}to select the next device." 46085 PRINT"{right*11}{down}Press T for AUTOTEST." 46090 PRINT"{down*11}{right}{blue}{space*4}Performance test result chart:" 46110 PRINT"{down} Keyboard{space*4}: "ch$(0)"{space*9}Disk Drive : "ch$(1) 46120 PRINT" Video{space*7}: "ch$(3)"{space*9}Printer{space*4}: "ch$(2) 46125 PRINT" Audio{space*7}: "ch$(4)"{space*9}RAM Memory : "ch$(6) 46130 PRINT" Joystick(s) : "ch$(5)"{space*9}Cassette{space*3}: "ch$(7) 46150 PRINT"{down} N=Not Tested{space*12}N=Not Tested" 46160 PRINT" C=Complete{space*14}{sh @}=Pass F=Fail{home}" 46170 PRINT"{gray}{right*2}{reverse on}{cm d}{cm i}{cm f}{right}{reverse off}{cm k}{right}{reverse on}{cm k}" 46171 PRINT"{right*2}{reverse on}{cm c}{reverse off}{cm i}{reverse off}{cm i}{reverse on}{right}{cm c}{reverse off}{cm i}{reverse on}{cm v}" 46172 PRINT"{right*2}{cm k} {reverse on}{cm k}{right*3}{cm k}" 46173 PRINT"{right*2}{reverse on}{cm i*3}{right*3}{reverse off}{cm c}" 46174 PRINT"{right*2}{white}Doctor." 46200 POKE v+17,PEEK(v+17)OR16 46999 RETURN 50000 REM sprite initialization 50010 REM poked into blk. 249-255 50020 REM named de$(0-7) 50030 REM and put into proper x,y coordinates 50040 v=53248 50050 FOR device= 0 TO 7 50060 READ de$(de) 50065 FORlo=1TOLEN(de$(de)):PRINTMID$(de$(de),lo,1);:ti$="{0*6}" 50066 IF ti<2 THEN 50066 50068 NEXT lo:PRINT 50070 READ x(de),y(de):REM x,y coords 50075 ba=33792+64*de 50080 FOR loc = 0 TO 62 50090 READ a:POKE ba+loc,a 50100 NEXT loc 50110 NEXT de 50200 DATA "Keyboard",150,150 50210 DATA 2,1,0,2,1,0,2,1,0,2,1,0,255,255,255,128,0,1,191,128,25,128,0,1,159 50220 DATA 255,237,128,0,1,159,255,237 50230 DATA 128,0,1,191,255,205,128,0,1,191,255,205,128,0,1,135,255,13,128,0,1 50240 DATA 255,255,255,0,0,0,0,0,0 50245 DATA "Cassette",120,146 50250 DATA 0,0,0,0,0,0,127,255,254,192,0,3,207,255,243,204,0,51,217,60,155,219 50260 DATA 189,219,217,0,155,216,0,27,216,0,27,223,255,251,192,0,3,199,255,227 50270 DATA 207,255,243,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 50300 DATA "Disk Drive",128,131 50310 DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,255,224,8,0,32,9,255,32,9,255,32,8 50320 DATA 56,32,8,0,32,15,255,224,0,0,64,0,0,64,0,0,64,0,0,64,0,0,64,0,0,64,0 50330 DATA 0,64,0,0,64,0,0,64 50440 DATA "Printer",120,118 50450 DATA 0,0,0,0,0,0,0,0,0,63,255,252,40,0,20,59,240,28,43,252,20,56,0,28,43 50460 DATA 254,20,57,240,28,232,0,23,185,128,29,128,0,1,191,255,253,128,0,1 50470 DATA 255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 50500 DATA "Video",173,116 50510 DATA 0,193,0,0,50,0,0,12,0,255,255,255,128,0,1,159,255,1,160,0,153,160 50520 DATA 24,189,174,216,153,160,0,129,161,228,153,161,228,189,170 50530 DATA 0,153,160,0,129,159,255,1,128,0,1,255,255,255,0,0,0,0,0,0,0,0,0,0,0 50540 DATA 0 50600 DATA "Audio",222,120 50610 DATA 0,0,0,0,0,0,0,0,0,0,0,0,1,128,0,7,128,2,13,128,254,27,128,254,247 50620 DATA 184,254,61,128,252,57,128,192,63,128,192,63,184,192,57,128,192,61 50630 DATA 131,192,247,135,192,27,135,192,13,187,128,7,128,0,1,128,0,0,0,0 50700 DATA"Joystick(s)",222,153 50710 DATA 0,24,0,0,24,0,0,24,0,0,24,0,0,24,0,0,24,0,0,126,0,29,255,128,63,255 50720 DATA 252,127,255,254,127,255,254,127,255,254,127,255,254,63,255,252,15 50730 DATA 0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 50800 DATA "RAM(Memory)",200,153 50810 DATA 63,255,0,240,3,192,55,243,0,246,27,192,55,243,0,246,51,192,54,27,0 50820 DATA 240,3,192,49,227,0,246,27,192,55,251,0,246,27,192,54,27,0,240,3,192 50830 DATA 54,27,0,247,59,192,55,251,0,246,219,192,54,27,0,240,3,192,63,255,0 50850 REM setup keyboard scan table 50860 DIM plus(64):FOR ky=0 TO 62:READ plus(ky):NEXT 50870 DATA 30,186,266,274,34,114,194,264,6,84,162,8,242 50880 DATA 164,86,0,10,88,166,12,246,168,90,244,14 50890 DATA 92,170,16,250,172,94,248,18,96,174,20,254 50900 DATA 176,98,252,22,100,178,24,258,180,102,256,26 50910 DATA 104,182,28,0,184,106,260,2,0,0,4,0,0,82 51000 DATA 0,7,0,0,13,128,0,24,192 51010 DATA 0,25,128,0,27,0,0,28,0 51020 DATA 0,120,0,1,216,0,7,28,0 51030 DATA 14,127,0,28,219,128,28,217,192 51040 DATA 14,89,192,7,24,192,1,217,128 51050 DATA 0,127,0,0,24,0,1,216,0 51060 DATA 3,240,0,1,224,0,0,192,0 51070 DATA 0,4,0,0,6,0,0,7,0 51080 DATA 0,7,128,0,6,192,0,6,96 51090 DATA 0,6,48,0,6,16,0,6,16 51100 DATA 0,6,32,0,6,64,0,6,128 51110 DATA 0,6,0,0,6,0,0,62,0 51120 DATA 0,126,0,0,124,0,0,48,0 51130 DATA 0,0,0,0,0,0,0,0,0 51200 FOR de=8 TO 9:ba=33792+64*de:FOR lo=0 TO 62 51210 READ a:POKE ba+lo,a 51220 NEXT lo:NEXT de:ba=12*4096 51230 de=10:ba=33792+64*de:FOR lo=0 TO 62:POKE ba+lo,0:NEXT lo 51240 FOR lo=1 TO 19 STEP 3:POKE ba+lo,255:NEXT lo 51250 POKE ba+1,126:POKE ba+19,126 51300 DATA8,120,160,3,185,2,0,72,136,208,249,173,110,192,10,170 51310 DATA202,202,16,15,169,0,133,2,160,3,104,153,2,0,136,208 51320 DATA249,40,96,169,0,133,2,189,111,192,133,3,189,112,192,133 51330 DATA4,160,0,177,2,133,5,152,145,2,209,2,208,32,56,42 51340 DATA144,246,165,5,145,2,164,3,169,46,153,144,129,153,144,217 51350 DATA230,2,208,2,230,3,165,3,197,4,208,213,240,178,165,2 51360 DATA141,0,4,165,3,141,1,4,169,255,133,2,208,170,2,193 51370 DATA208,1,160,4,170,177,145,179,34,0,0,0,255,4,255,0 51380 DATA169,1,160,192,162,161,32,189,255,169,1,160,15,166,2,32 51390 DATA186,255,32,192,255,176,2,169,0,133,2,169,1,32,195,255 51400 DATA96,32,0,255,0,255,0,255,0,255,0,255,0,255,0,255 51410 DATA166,2,169,1,160,0,32,186,255,169,3,162,210,160,192,32 51420 DATA 189,255,169,1,166,43,164,44,32,213,255,176,2,169,0,133 51430 DATA 2,96,67,68,83,0,0,0,0,0,0,0,0,0,0,0 51500 ba=12*4096:FOR x=0 TO 223:READ a:POKE ba+x,a:NEXT x 51510 RETURN 52000 DATA 50,75,110,134.5,150,300,600,1200,1800,2400 stop tok64 (bastext 1.0)