0 poke59459,0:gosub1:goto15 1 poke59468,12 2 zg=60:rty=.9:rtl=.99 3 poke59467,16:poke59466,15 4 poke59464,255 5 ee=200 6 ms$=" {down} {left}{left} O{up}{left} {CBM-@}{CBM-I}{CBM-@} {left}{down}{CBM-T}{left}{left}{left}{left}{left}{down}{left} {CBM-T}{up}{CBM-@}{CBM-@}{CBM-@}{down}{CBM-T} {left}{up}{left} {left}P {left}{down}{left}{left}{left}{left}{CBM-V} {CBM-C}" 7 sc=0:gu=0:nm=0 10 deffnc(sc)=5+sc+(5-int((int(ss)-32768)/80-2))*5 14 return 15 print"{clr} space invaders" 20 print" {CBM-U}{CBM-U}{CBM-U}{CBM-U}{CBM-U}{CBM-U}{CBM-U}{CBM-U}{CBM-U}{CBM-U}{CBM-U}{CBM-U}{CBM-U}{CBM-U}" 21 print"{down}{down}{down}{down}{down}{down}{rght}{rght}{rght}{rght}{rght}{rght}{rght}{rght}{rght}{rght}{rght}{rght}{rght}{rght}{rght}by d.j.wylie{down}{down}{down}{down}{down}" 22 print"{down}{down}{down}{down}" 30 print"{down}{down} press {CBM-C}space{CBM-V} to start," 40 print" or {CBM-C}return{CBM-V} for instructions" 50 geta$:ifa$=chr$(13)then5000 60 ifa$=" "thenpoke59464,100:goto70 65 goto50 70 print"{home}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}type difficulty rating-(1-9)":getdr$:dr=val(dr$) 71 ifdr<1then70 72 ifdr>9then70 73 dr=1*(10^(dr+2)) 74 poke59468,12 75 poke59464,200 80 ti$="000000" 90 gu$=" ] {left}{left}{down}{left}{left}{left} {CBM-+} " 100 print"{clr}" 101 print"{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}" 102 print" {rvon} {rvof} {rvon} {rvof} {rvon} {rvof} {rvon} " 103 print" {rvon} {rvof} {rvon} {rvof} {rvon} {rvof} {rvon} " 104 print" {rvon} {rvof} {rvon} {rvof} {rvon} {rvof} {rvon} " 105 print" {rvon} {rvof} {rvon} {rvof} {rvon} {rvof} {rvon} " 106 p$="":print"{home}":fora=1to6step2 110 a$(a)=" A X A X A X A X A X " 120 a$(a+1)=" X A X A X A X A X A " 121 next 122 print"{home} " 123 print"{home}{down} " 124 print"{home}{down}{down}{down} " 125 forg=1to17 126 poke59464,250 130 print"{home} score ="sc" energy "ee"{left} {home}":poke59464,0 131 ifzg=0then2005 140 print"{down}{down}" 150 fora=1to6 155 ifee<=0then9000 180 printtab(g)a$(a) 190 print 195 getn$:ifn$<>""thenp$=n$ 200 next 210 gosub400:p$="":ifol=1thenol=0:goto3000 215 ifrnd(ti)>rtlthenp$="":gosub10000 220 next 230 forg=17to1step-1 235 poke59464,250 240 print"{home} score ="sc" energy "ee"{left} {home}":poke59464,0 241 ifzg=0then2005 245 print"{down}{down}" 250 fora=1to6 255 ifee<=0then9000 280 printtab(g)a$(a) 290 print 295 getn$:ifn$<>""thenp$=n$ 300 next 305 gosub400:p$="":ifol=1thenol=0:goto3000 306 ifrnd(ti)>rtlthenp$="":gosub10000 310 next 320 goto125 400 ee=ee-3 405 ifsc>=9999oree>=9999then60000 410 ifpeek(151)=41thengu=gu+1:ee=ee-1 416 ifgu>38thengu=38 418 ifpeek(151)=42thengu=gu-1:ee=ee-1 419 ifgu<0thengu=0 420 print"{home}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}"tab(gu)gu$:poke151,255:forx1=0to10:next 421 ifpeek(151)=41thengu=gu+1:ee=ee-1 422 ifgu>38thengu=38 423 ifpeek(151)=42thengu=gu-1:ee=ee-1 424 ifgu<0thengu=0 430 print"{home}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}"tab(gu)gu$ 440 ifpeek(152)<>1thenp$="":goto486 441 p$="" 445 ee=ee-10 450 forss=33570+guto32848step-40:ifpeek(ss)=32then469 451 ifpeek(ss)=160orpeek(ss)=224thenpoke59459,255:poke59459,0:goto475 452 ifpeek(ss)=65orpeek(ss)=88thensc=fnc(sc):ee=fnc(ee):ee=ee+20 455 ifpeek(ss)<>65andpeek(ss)<>88then469 456 pokess,42:poke59459,255:poke59459,0:xz=(int(ss)-32768)/80-1:xy=int(int(gu-g)+2) 458 s$=a$(xz) 459 c$=left$(s$,xy)+" "+right$(s$,21-xy):zg=zg-1 460 a$(xz)=c$ 468 goto475 469 pokess,93:poke59464,(ss-32768)/4: 470 next 475 forsp=33570+gutossstep-40 480 pokesp,32 485 next 486 ifsc*dr65andpeek(cc)<>88then500 489 fordd=cc+40to33767step40:ifpeek(dd)<>32andpeek(dd)<>65andpeek(dd)<>88then600 490 ifpeek(151)<>255then493 491 pokedd,93:poke59464,(dd-32768)/4:next 493 forff=cc+40toddstep40:ifpeek(ff+40)=102thennm=nm+1:gosub1000:ifnm=>3thenol=1:return 494 pokeff,32:next 500 getp$:p$="":return 600 poke59459,255:poke59459,0:goto493 999 end 1000 poke59459,255:poke59459,0:return 2000 forsp=33570+gutossstep-40 2001 pokesp,32 2002 next 2005 print"{home}you have destroyed all the aliens!! ":zg=60 2010 print" well done." 2020 print"{down}{rght}{rght}{rght}press {CBM-C}space{CBM-V}to continue":print" or {CBM-C}return{CBM-V} to restart" 2025 forrr=1to20:geta$:next 2030 geta$:ifa$=""then2030 2040 ifa$=" "thenzg=60:gosub20000:goto106 2045 ifa$=chr$(13)thengosub1:goto70 2050 fora=32768to33767:pokea,224:poke59464,(a-32768)/4:next:print"{clr}":fora=1to1000:next 2055 fora=1to20 2056 poke59464,200 2060 print"{home}{down}{CBM-+}{CBM-+}{CBM-+}{CBM-+}{CBM-+}{CBM-+}{up}" 2065 poke59464,100 2070 print"ready.":next:clr:print"{home}";:poke59466,0:poke59467,0:poke59464,0:end 3000 print"{home}you are zapped!!-you scored "sc"{left} ": 3001 fornn=0to2:fornp=1to21:readno,nm:pokeno+ff,nm:poke59464,nm 3002 poke59459,255:poke59459,0:next:restore:next:nm=0 3005 ifsc>1000thenprint"excellent." 3006 ifsc>500andsc<=1000thenprint"very good" 3007 ifsc>100andsc<=500thenprint"good" 3008 ifsc<=100andsc>50thenprint"rather poor" 3009 ifsc<=50andsc>0thenprint"poor" 3010 ifsc=0thenprint"you're rubbish aren't you!!" 3020 goto2020 4000 data39,64,41,64,80,93,40,224,40,32,40,81,40,42,40,32,0,93 4010 data-1,77,1,78,79,78,81,77 4020 data39,32,41,32,80,32,-1,32,1,32,79,32,81,32,0,32 5000 print"{clr}":poke59468,14 5001 print" INSTRUCTIONS" 5002 print" {CBM-T}{CBM-T}{CBM-T}{CBM-T}{CBM-T}{CBM-T}{CBM-T}{CBM-T}{CBM-T}{CBM-T}{CBM-T}{CBM-T}" 5003 print"{down}{rght}{rght}THIS{$a0}IS{$a0}A{$a0}GAME{$a0}IN{$a0}WHICH{$a0}ALIENS{$a0}ARE" 5005 print"{rght}ATTACKING{$a0}YOU. 5007 print"{down}{rght}{rght}YOU{$a0}HAVE{$a0}ONE{$a0}WEAPON,A{$a0}HIGH{$a0}POWERED" 5009 print"{rght}DISRUPTER{$a0}BEAM." 5010 print"{rght}{down}THIS{$a0}WEAPON{$a0}WILL{$a0}DESTROY{$a0}ONLY{$a0}ONE{$a0}ALIEN{$a0}AT{$a0}ONCE." 5012 print"{down} YOU{$a0}HAVE{$a0}4{$a0}BLOCK{$a0}HOUSES{$a0}WHICH{$a0}YOU{$a0}MAY{$a0} HIDE{$a0}BEHIND." 5014 print" {rvon}but{rvof} :--" 5015 print"{down}{rght}{rght}{rght}{rght}{rght}THE{$a0}ALIENS{$a0}ALSO{$a0}HAVE{$a0}WEAPONS!!!" 5017 print"{down}{rght}THEIR{$a0}FIRE{$a0}POWER{$a0}IS{$a0}SIMILAR{$a0}TO{$a0}YOURS, BUT{$a0}YOU{$a0}CAN{$a0}STAND{$a0}3{$a0}HITS." 5020 print"{down}{rght}{rght}{rght}{rght}{rght}{rght}{rght}PRESS{$a0}ANY{$a0}KEY{$a0}TO{$a0}CONTINUE.." 5030 forgg=1to20:geta$:next 5040 geta$:ifa$=""then5040 5050 print"{clr}" 5060 print" EVERY{$a0}SO{$a0}OFTEN{$a0}THE{$a0}{CBM-C}MOTHER SHIP{CBM-V}" 5070 print" WILL{$a0}APPEAR{$a0}AT{$a0}THE{$a0}TOP{$a0}OF{$a0}THE{$a0}SCREEN." 5080 print"{down}IF{$a0}THIS{$a0}IS{$a0}SHOT{$a0}1000 WILL{$a0}BE{$a0}ADDED{$a0}TO {$a0}YOUR SCORE." 5090 print"{down}{down}BE{$a0}WARNED!{down}YOUR{$a0}ENERGY{$a0}WILL{$a0}RUN{$a0}OUT {$a0}VERY{$a0}FAST-" 5100 print" THE{$a0}ONLY{$a0}WAY{$a0}TO{$a0}GET{$a0}MORE{$a0}IS{$a0}TO HIT "; 5105 print"ALIENS-SO{$a0}SHOOT{$a0}SOME{$a0}AS{$a0}SOON{$a0}" 5110 print" AS{$a0}YOU{$a0}CAN,AND{$a0}MAKE{$a0}SURE{$a0}YOU{$a0}HIT{$a0}ONE!." 5120 print"{down}{down}THE{$a0}DIFFICULTY{$a0}RATING{$a0}ONLY{$a0}AFFECTS THE{$a0}NUMBER{$a0}OF{$a0}TIMES{$a0}THE{$a0}ALIENS 5130 print"FIRE." 5131 print"{down}{rght}{rght}{rght}{rght}{rght}{rght}{rght}PRESS{$a0}ANY{$a0}KEY{$a0}TO{$a0}CONTINUE.." 5132 forgg=1to20:geta$:next 5133 geta$:ifa$=""then5133 5134 print"{clr} TO{$a0}MOVE{$a0}YOUR{$a0}WEAPON{$a0}LEFT{$a0}USE{$a0}THE{$a0}" 5135 print" {CBM-C}4{CBM-V}KEY.TO{$a0}MOVE{$a0}IT{$a0}RIGHT{$a0}USE{$a0}THE" 5136 print" {CBM-C}6{CBM-V}KEY.TO{$a0}FIRE{$a0}PRESS{$a0}THE {CBM-C}shift{CBM-V} KEY." 5137 print" {down}THESE{$a0}KEYS{$a0}SHOULD{$a0}NOT{$a0}BE{$a0}JABBED{$a0}AT,BUT{$a0}{$a0}PRESSED{$a0}FIRMLY." 5138 print" {down}THEIR{$a0}ACTION{$a0}WILL{$a0}AUTOMATICALLY{$a0}REPEAT{$a0}{$a0}{$a0}IF{$a0}THEY{$a0}ARE{$a0}HELD{$a0}DOWN" 5150 print"{down}{rght}{rght}{rght}{rght}{rght}{rght}{down}PRESS{$a0}A{$a0}KEY TO{$a0}START" 5990 forgg=1to20:geta$:next 6000 geta$:ifa$=""then6000 6001 print"{home}" 6002 goto70 7000 pokess,42:xz=(int(ss)-32768)/80-1:xy=int(int(gu-g)+2) 7001 poke59459,255:poke59459,0 7005 s$=a$(xz) 7010 c$=left$(s$,xy)+" "+right$(s$,21-xy):zg=zg-1 7020 a$(xz)=c$ 7030 return 9000 print"{home} out of energy!!!!! you scored "sc:ee=100 9010 goto3005 10000 fortt=0to30:print"{home}{down}"tab(tt);ms$ 10002 p$="" 10005 ee=ee-1 10006 poke59464,100 10011 print"{home} score ="sc" energy "ee"{left} ":poke59464,0 10018 ifpeek(151)=255andpeek(152)=0thennext:goto10140 10019 ifpeek(151)=41thengu=gu+1:ee=ee-1 10020 ifgu>38thengu=38 10030 ifpeek(151)=42thengu=gu-1:ee=ee-1 10040 ifgu<0thengu=0 10050 print"{home}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}"tab(gu)gu$ 10060 ifpeek(152)<>1thenforty=1to20:next:next:goto10140 10065 forss=33570+guto32848step-40 10066 cd=peek(ss) 10070 ee=ee-1 10100 pokess,93:poke59464,(ss-32768)/4:ifcd=32then10120 10105 ifcd=65orcd=88thensc=fnc(sc):ee=fnc(ee):ee=ee+20:gosub7000:goto10130 10107 ifcd=160orcd=224thenpoke59459,255:poke59459,0:goto10130 10110 ifcd=99orcd=124orcd=126orcd=100thenm$="":sc=sc+1000:ee=ee+200:goto30000 10120 next 10130 forlp=33570+gutossstep-40:pokelp,32:next:nexttt 10140 print"{home} " 10141 print"{home}{down} " 10142 print"{home}{down}{down} " 10143 print"{home}{down}{down}{down} " 10144 print"{home}" 10145 p$="h" 10150 return 16930 forlp=33570+gutossstep-40:pokelp,32:next:goto10140 20000 print"{home}":fords=1to15:print" ":next 20005 print"{home}" 20010 return 30000 poke59459,255:poke59459,0 30010 goto16930 59999 end 60000 print"{home} you win a replay!!!! " 60005 print"{home}{down}" 60010 fora=1to9 60020 print" "; 60030 next 60040 foryyy=0to3000:next:run