8-Bit Software Online Conversion

SumVaders - Listing

10IFPAGE<>&1900:PAGE=&1900:CHAIN"SUMV ADE" 20A%=0:X%=&FF:F%=USR&FFF4 DIV&100 AND 7:IF F%>2 ?&FE34=&18:FORJ%=0TO31:K%=J%* 640:P%=(2*J%)+&C375:[OPT2:EQUB K% DIV 25 6:EQUB K% AND 255:]:NEXT 30MODE2 40A$="123456789" 50VDU23;8202;0;0;0; 60HIMEM=&2E00 70a=&2E00 80b=&2E57:c=&2E17 90*L.SPRITE1 100*L.SPRITE2 110*L.SPRCODE 120FOR I=0 TO &FF 130?(&E00+I)=?(&3000+I) 140NEXT 150FOR I=0 TO &70 160?(&F00+I)=?(&880+I) 170NEXT 180ONERROR VDU7 190PROCd 200CLS 210REPEAT 220COLOUR4 230PRINT'''''''''" SUMVADERS II" 240COLOUR6 250PRINT'''"Best Score:";H% 260PRINT"By ";$&1000 270COLOUR10 280PRINT''''"Press SPACE to start"; 290REPEAT 300IF INKEY(-36)ANDINKEY(-35)ANDINKEY( -66)ANDINKEY(-83)ANDINKEY(-85) PROCe 310UNTIL INKEY(-99) 320CLS 330PROCf 340GCOL0,5 350MOVE0,0 360DRAW0,1023 370DRAW1279,1023 380DRAW1279,0 390DRAW0,0 400PROCg 410PROCh 420MOVE0,80 430DRAW1279,80 440MOVE0,928:DRAW1279,928 450PROCi 460REPEAT 470REPEAT 480PROCj 490PROCk 500IF?&86=1 PROCl 510IF?&86=0 PROCm 520UNTIL G%=11 OR ?&85=0 530IF G%=11 G%=1:PROCn 540UNTIL?&85=0 550PROCo 560UNTIL0 570DEFPROCf 580D%=1 590E%=36 600F%=50 610G%=1 620I%=0 630?&85=3 640ENDPROC 650DEFPROCg 660COLOUR3 670PRINTTAB(1,30);"SC:";I% 680PRINTTAB(10,30);"LEV:";D% 690ENDPROC 700DEFPROCh 710FORJ%=1 TO ?&85 720K%=(J%*4)-4 730PROCp(K%+146,23,&E0,&E,4,8) 740NEXT 750ENDPROC 760DEFPROCe 770CLS 780COLOUR1 790PRINT"Max addition=";B% 800PRINT"Max subtraction=";C% 810PRINT"Selected:"; 820IF?&83=0 AND ?&84=0 ?&83=1 830IF?&83=1 AND ?&84=0 PRINT;"Addition " 840IF?&83=0 AND ?&84=1 PRINT;"Subtract ion" 850IF?&83=1 AND ?&84=1 PRINT;"Both" 860FORZ=1TO1000:NEXT 870*FX20,1 880*FX138,0,21 890INPUT"Addition max="B% 900IF B%<2 B%=10 910INPUT"Subtraction max="C% 920IF C%<2 C%=10 930PRINT"Addition?(Y/N)" 940REPEAT:G$=GET$:UNTIL INSTR("yYnN",G $)>0 950IF INSTR("yY",G$)>0 PRINT"Addition on":?&83=1 ELSE PRINT "Addition off":?&8 3=0 960PRINT"Subtraction?(Y/N)" 970REPEAT:G$=GET$:UNTIL INSTR("yYnN",G $)>0 980IF INSTR("yY",G$)>0 PRINT"Addition on":?&84=1 ELSE PRINT "Addition off":?&8 4=0 990COLOUR9 1000PRINT"Press SPACE to start" 1010ENDPROC 1020DEFPROCd 1030q=&F81 1040ENVELOPE1,130,1,-3,-5,10,10,30,0,0, 0,-127,100,0 1050FOR N%=1 TO 5 1060q?N%=(N%-1)*15+6:q?(10+N%)=210 1070q?(N%+5)=(N%-1)*15+6:q?(15+N%)=230 1080NEXT 1090H%=20 1100$&1000="Adrian" 1110?&83=1 1120?&84=0 1130B%=10 1140C%=10 1150ENDPROC 1160DEFPROCp(A,B,C,D,E,F) 1170X%=A:Y%=B:CALL b 1180*FX19 1190c?1=C:c?2=D:X%=E:Y%=F:CALL a 1200ENDPROC 1210DEFPROCj 1220PRINTTAB(1,1);" " 1230*FX21,0 1240IF?&83=1 AND ?&84=1 N%=RND(2):IF N% =1 PROCr ELSE IF ?&83=1 AND ?&84=1 PROCs 1250IF?&83=1 AND ?&84=0 PROCr 1260IF?&83=0 AND ?&84=1 PROCs 1270ENDPROC 1280DEFPROCr 1290J%=RND(B%+(2*D%-2)) 1300K%=RND(B%+(2*D%-2)) 1310L%=J%+K% 1320B$=STR$(J%)+"+"+STR$(K%) 1330PRINTTAB(1,1);J%;"+";K%;"="; 1340PROCz 1350IF L%=M% ?&86=1 ELSE ?&86=0 1360ENDPROC 1370DEFPROCs 1380J%=RND(C%+(2*D%-2)) 1390K%=RND(C%+(2*D%-2)) 1400IF J%<K% N%=K%:K%=J%:J%=N% 1410L%=J%-K% 1420B$=STR$(J%)+"-"+STR$(K%) 1430PRINTTAB(1,1);J%;"-";K%;"="; 1440PROCz 1450IF L%=M% ?&86=1 ELSE ?&86=0 1460ENDPROC 1470DEFPROCi 1480FOR t%=1 TO 5 1490SOUND1,-10,50,3 1500PROCp(q?t%,q?(t%+10),&0,&F,7,16) 1510FOR I=1TO503:NEXT:SOUND1,-10,50,3 1520PROCp(q?(t%+5),q?(t%+15),0,&F,7,16) 1530FOR I=1TO503:NEXT 1540NEXT 1550SOUND1,-10,150,3 1560PROCp(E%,F%,&70,&A,7,16) 1570ENDPROC 1580DEFPROCk 1590GOSUB 2800 1600IF B%<36 PROCu 1610IF B%>36 PROCv 1620ENDPROC 1630DEFPROCu 1640PROCp(36,F%,&70,&A,7,16) 1650FOR N%=35 TO B%+1 STEP -1 1660PROCp(N%,F%,&70,&A,7,16) 1670PROCp(N%,F%,&70,&A,7,16) 1680NEXT 1690PROCp(N%,F%,&70,&A,7,16) 1700ENDPROC 1710DEFPROCv 1720PROCp(36,F%,&70,&A,7,16) 1730FOR N%=37 TO B%-1 1740PROCp(N%,F%,&70,&A,7,16) 1750PROCp(N%,F%,&70,&A,7,16) 1760NEXT 1770PROCp(N%,F%,&70,&A,7,16) 1780ENDPROC 1790DEFPROCl 1800GOSUB2800 1810SOUND0,1,1,5 1820FOR O%=53 TO C%-16 STEP3 1830PROCp(B%+1,O%,&00,&E,4,8) 1840PROCp(B%+1,O%,&00,&E,4,8) 1850NEXT 1860SOUND1,1,150,5 1870PROCp(B%,C%,0,&F,7,16) 1880PROCp(B%,C%,&F0,8,8,16) 1890FORZ%=0TO200:NEXT 1900PROCp(B%,C%,&F0,8,8,16) 1910PROCp(B%,C%,&70,&9,8,16) 1920FORZ%=0TO200:NEXT 1930PROCp(B%,C%,&70,&9,8,16) 1940PROCp(B%,C%,&F0,&9,8,16) 1950FORZ%=0TO200:NEXT 1960PROCp(B%,C%,&F0,&9,8,16) 1970G%=G%+1 1980I%=I%+10:PROCg 1990IF B%<36 PROCw 2000IF B%>36 PROCx 2010ENDPROC 2020DEFPROCw 2030PROCp(B%,F%,&70,&A,7,16) 2040FORZ%=B%+1 TO 35 2050PROCp(Z%,F%,&70,&A,7,16) 2060PROCp(Z%,F%,&70,&A,7,16) 2070NEXT 2080PROCp(E%,F%,&70,&A,7,16) 2090ENDPROC 2100DEFPROCx 2110PROCp(B%,F%,&70,&A,7,16) 2120FORZ%=B%-1 TO 37 STEP-1 2130PROCp(Z%,F%,&70,&A,7,16) 2140PROCp(Z%,F%,&70,&A,7,16) 2150NEXT 2160PROCp(E%,F%,&70,&A,7,16) 2170ENDPROC 2180DEFPROCm 2190GOSUB2800 2200FOR Z%=C%-16 TO 66 STEP-3 2210PROCp(B%,Z%,&E0,&A,6,16) 2220PROCp(B%,Z%,&E0,&A,6,16) 2230NEXT 2240PROCp(B%,66,&80,&E,6,16) 2250SOUND0,-15,4,5 2260FORW%=1TO100:NEXT 2270PROCp(B%,66,&80,&E,6,16) 2280PROCp(B%,66,&20,&E,6,16) 2290FORW%=1TO100:NEXT 2300PROCp(B%,66,&20,&E,6,16) 2310PROCp(B%,66,&80,&E,6,16) 2320FORW%=1TO100:NEXT 2330PROCp(B%,66,&80,&E,6,16) 2340FORW%=1TO1000:NEXT 2350PROCp(B%,50,&70,&A,7,16) 2360PROCp(B%,50,&40,&B,7,16) 2370FORW%=1TO100:NEXT 2380PROCp(B%,50,&40,&B,7,16) 2390PROCp(B%,50,&B0,&B,7,16) 2400FORW%=1TO100:NEXT 2410PROCp(B%,50,&B0,&B,7,16) 2420PROCp(B%,50,&20,&C,7,16) 2430FORW%=1TO100:NEXT 2440PROCp(B%,50,&20,&C,7,16) 2450PROCp(B%,50,&90,&C,7,16) 2460FORW%=1TO1000:NEXT 2470PROCp(B%,50,&90,&C,7,16) 2480PROCy 2490PROCg 2500IF ?&85>0 PROCp(E%,F%,&70,&A,7,16) 2510ENDPROC 2520DEFPROCy 2530PROCp((?&85*4)+142,23,&E0,&E,4,8) 2540?&85=?&85-1 2550ENDPROC 2560DEFPROCo 2570CLS 2580PRINT''''''''''" SCORE:";I% 2590IF I%<=H% GOTO 2660 2600COLOUR12 2610PRINT"A NEW HIGH SCORE!" 2620COLOUR1 2630*FX21,0 2640INPUT"What is your name?"'$&1000 2650H%=I% 2660COLOUR10 2670PRINT" Press SPACE" 2680REPEAT UNTIL INKEY(-99) 2690CLS 2700ENDPROC 2710DEFPROCn 2720PROCp(E%,F%,&70,&A,7,16) 2730FOR Z%=F%+3 TO 230 STEP 3 2740PROCp(E%,Z%,&70,&A,7,16) 2750PROCp(E%,Z%,&70,&A,7,16) 2760NEXT 2770PROCi 2780I%=I%+20*D%:D%=D%+1:PROCg 2790ENDPROC 2800LOCALB%,C% 2810B%=q?G%:C%=q?(G%+10) 2820RETURN 2830DEFPROCz 2840M%=0:A$="" 2850REPEAT:A%=GET-48 2860IF A%=79 IF A$<>"" VDU8,32,8:A$=LEF T$(A$,LEN(A$)-1) 2870IF A%<10 IF A%>-1 A$=A$+STR$(A%):VD UA%+48 2880UNTILA%=-35 OR LENA$>8 2890M%=VALA$ 2900ENDPROC