ZX81 Listing for am.p


ZX81 program listing for Asteroid £ Metor

SYSTEM VARIABLES

PROG  : 16509
D-FILE: 18757
VARS  : 19550
E-LINE: 19551
STKBOT: 19551
STKEND: 19551


LEGEND

9999 means line number
PRINT means treat as KEYWORD P


PROGRAM LISTING

  10 REM ASTEROID£METOR*SLR/1984
  15 LET S=0
  20 DIM A$(4,4)
  30 LET A$(2)=" ³²"
  40 LET A$(3)="  ÷"
  50 DIM B$(2,2)
  60 LET B$(1)="±²"
  70 LET B$(2)="´÷"
  80 LET SP=5
  90 LET O1=INT (4*RND+1)
  95 CLS
 100 LET O2=INT (4*RND+1)
 110 IF O2=O1 THEN GOTO 100
 115 LET B=11
 116 LET B1=-1
 117 PRINT AT 11,11;B$(1);AT 12,
11;B$(2)
 120 FOR A=0 TO 6
 130 IF O1=1 OR O2=1 THEN PRINT
AT 10,A;A$(1);AT 11,A;A$(2);AT 1
2,A;A$(3);AT 13,A;A$(4)
 140 IF O2=2 OR O1=2 THEN PRINT
AT A,10;A$(1);AT A+1,10;A$(2);
AT A+2,10;A$(3);AT A+3,10;A$(4)
 150 IF O1=3 OR O2=3 THEN PRINT
AT 10,20-A;A$(1);AT 11,20-A;A$(2
);AT 12,20-A;A$(3);AT 13,20-A;A$
(4)
 160 IF O2=4 OR O1=4 THEN PRINT
AT 22-A-(3 AND A=0),10;A$(4);AT
22-A-1,10;A$(3);AT 22-A-2,10;A$(
2);AT 2-A-3,10;A$(1)
 170 FOR O=1 TO SP
 190 IF INKEY$<>"" THEN GOSUB 40
0
 195 IF B<>11 THEN GOSUB 430
 200 IF B<=A AND O1=B1 THEN LET
O1=0
 210 IF B<=A AND O2=B1 THEN LET
O2=0
 220 NEXT O
 230 NEXT A
 240 IF O1=0 AND O2=0 THEN LET S
=S+100
 250 IF O1<>0 OR O2<>0 THEN
GOTO 280
 260 LET SP=SP-(SP>1)
 270 GOTO 90
 280 CLS
 290 PRINT "YOU WERE HIT BY AN A
STEROID £   METOR.YOU SCORED ";S
;" POINTS"
 300 PRINT AT 11,11;"ö¶";AT 12,1
1;"¶ö"
 310 PRINT AT 11,11;"¶ö";AT 12,1
1;"ö¶"
 320 PRINT AT 11,11;"¶¶";AT 12,1
1;"öö"
 330 PRINT AT 11,11;"öö";AT 12,1
1;"¶¶"
 340 PRINT AT 11,11;"·ô";AT 12,1
1;"òñ"
 350 PRINT AT 11,11;"ñò";AT 12,1
1;"ô·"
 360 PRINT AT 11,11;")(";AT 12,1
1;")("
 370 PRINT AT 11,11;"  ";AT 12,1
1;"  "
 380 PRINT "BOOM"
 390 PAUSE 4E4
 395 RUN
 410 LET B1=1+(INKEY$="7")+(2
AND INKEY$="8")+(3 AND INKEY$="
6")
 420 LET B=7
 430 IF B1=1 THEN PRINT AT 11,B;
"³ ";AT 12,B;"ó "
 440 IF B1=2 THEN PRINT AT B,11;
"  ";AT B+1,11;"  "
 450 IF B1=3 THEN PRINT AT 11,20
-B;" ³";AT 12,20-B;" ó"
 460 IF B1=4 THEN PRINT AT 22-B-
1,11;"  ";AT 22-B,11;"  "
 465 REM PRINT AT 0,0;"B=";B;" A
=";A;
 470 LET B=B-1
 480 IF B=0 THEN LET B=11
 490 RETURN
 500 SAVE "AM"
 510 RUN