0 rem ******************************** 1 rem * writen by: david c. anderson * 2 rem ******************************** 3 gosub68:gosub69 4 scnclr:poke205,8:print:print" to move position left or right, use" 5 print" appropriate cursor key.":print: 6 print" to fire, press 'f'.":print:print" to end, press 'e'." 7 poke205,22:print:printtab(8)"press return to start" 8 getkeyk$ 9 ifk$=chr$(13)then10:else8 10 scnclr:color0,1,1:color4,9,0 11 graphic1,1:c=18:r=23:gun$=cg$ 12 char1,c,r,gun$ 13 color1,2,7 14 gosub58 15 getz$:ifz$=""thengosub35 16 ifz$=chr$(157)thengosub21 17 ifz$=chr$(29)thengosub24 18 ifz$="f"thenbu=c+1:gosub27:gosub35 19 ifz$="e"thengosub68:graphic0:list:stop 20 goto15 21 ifc=<1thenchar0,c,r," ":c=39:else22 22 char0,c,r,gun$:c=c-1:char1,c,r,gun$ 23 return 24 ifc=>39thenchar0,c,r," ":c=0:else25 25 char0,c,r,gun$:c=c+1:char1,c,r,gun$ 26 return 27 vol8:fors=1023to800step-40:sound1,s,1:next 28 color1,7,3:fori=22toshipstep-8:char1,bu,i,c3$:next 29 fori=22toshipstep-8:char0,bu,i,c3$ 30 next:color1,2,7 31 color1,2,7:ifi=1then32 32 ifbu=xorbu=x+1orbu=x+2orbu=x+3orbu=x+4thengosub65:else34 33 de=de+1:graphic1,1:gosub58 34 return 35 deffna(x)=int(x*rnd(1)+1) 36 z=fna(34) 37 char0,x,1,c1$:char0,x,2,c2$ 38 ifz=xthencn=0 39 ifcn=1then42 40 ifz<33thenx=x+1:goto43 41 ifz>33thencn=1 42 x=x-1:ifx=0thenx=34 43 ifx=<0thenx=39:x=x-2 44 ifx>=35thenx=0:x=x+2 45 char1,x,1,c1$:char1,x,2,c2$ 46 ifx>c+8orx10then50:elsereturn 50 vol8:fors=1023to800step-40:sound1,s,1:next:deffnz(x)=int(x*rnd(1)+1) 51 bl=x+fnz(3) 52 color1,7,3:fori=3to23step8:char1,bl,i,c3$:next 53 fori=3to23step8:char0,bl,i,c3$:next:color1,2,7 54 ifbl=corbl=c+1orbl=c+2thengosub65:else56 55 in=in+1:scnclr:gosub58 56 return 57 return 58 sc$="invader- /defence- " 59 in$=str$(in):de$=str$(de) 60 mid$(sc$,9,3)=in$:mid$(sc$,22,3)=de$ 61 char1,5,24,sc$ 62 char1,c,r,gun$ 63 char1,x,1,c1$:char1,x,2,c2$ 64 return 65 vol8:fors=8to1step-1:vols:sound3,600,11:color0,2,s-1:scnclr:next 66 color0,1,1:scnclr:return 67 resumenext 68 color0,6,4:color1,6,0:color4,9,0:return 69 cg$=chr$(213)+chr$(177)+chr$(201) 70 c1$=chr$(213)+chr$(206)+chr$(163)+chr$(205)+chr$(201) 71 c2$=chr$(202)+chr$(178)+chr$(178)+chr$(178)+chr$(203) 72 c3$=chr$(194) 73 return ready.