ZX81 Listing for mmaze.p


ZX81 program listing for **MONKEY MAZE**SLR/1993

SYSTEM VARIABLES

PROG  : 16509
D-FILE: 18585
VARS  : 19378
E-LINE: 19379
STKBOT: 19379
STKEND: 19379


LEGEND

9999 means line number
PRINT means treat as KEYWORD P


PROGRAM LISTING

  10 REM **MONKEY MAZE**SLR/1983
  20 LET H=0
  30 LET S=0
  35 LET Z=1000
  50 LET X=19
  60 LET Y=0
  70 LET X1=X
  80 LET Y1=Y
  90 LET V=1
 100 LET M=1
 110 LET C=0
 120 LET D=19
 130 LET E=0
 140 LET N=-1
 150 LET G=19
 160 LET A$=" "
 165 LET B=Z
 166 FOR A=0 TO 20
 167 LET X=19
 168 LET Y=0
 170 PRINT AT 20,A;"X";AT 15,A;"
X";AT 10,A;"X";AT 5,A;"X"
 180 NEXT A
 190 FOR A=15 TO 18
 200 PRINT AT A,15;"H";AT A,10;"
H"
 210 NEXT A
 220 FOR A=10 TO 13
 230 PRINT AT A,5;"H";AT A,19;"H
"
 240 NEXT A
 250 FOR A=5 TO 8
 260 PRINT AT A,2;"H";AT A,12;"H
"
 270 NEXT A
 280 PRINT AT 4,19;" ";AT 4,20;"
¸";AT 1,16;" ";AT 2,15;"  ";AT 3
,16;" ";AT 4,16;" "
 290 PRINT AT X,Y;"!";AT X1,Y1;A
$ AND (X1<>X OR Y1<>Y);AT 4,C;" 
O ";AT 9,D;" O ";AT 14,E;" O ";
AT 19,G;" O "
 294 LET X1=X
 298 LET Y1=Y
 300 LET L$=INKEY$
 310 LET Y=Y-(L$="5" AND Y>0)+(L
$="8" AND Y<20)
 320 IF L$="7" THEN LET X=X-(5
AND ((X=19 AND Y=10) OR (X=19
AND Y=15) OR (X=14 AND Y=5) OR
(X=14 AND Y=19) OR (X=9 AND Y=2)
OR (X=9 AND Y=12)))
 330 IF L$="6" THEN LET X=X+(5
AND ((X=14 AND Y=10) OR (X=14
AND Y=15) OR (X=9 AND Y=5) OR (
X=9 AND Y=19) OR (X=4 AND Y=2)
OR (X=4 AND Y=12)))
 340 LET C=C+V
 350 IF C=0 OR C=13 THEN LET V=-
V
 360 LET D=D+N
 370 LET G=G+N
 380 IF D=0 OR D=19 THEN LET N=-
N
 390 LET E=E+M
 400 IF E=0 OR E=19 THEN LET M=-
M
 410 PRINT AT X,Y;
 420 LET P=PEEK (PEEK 16398+256*
PEEK 16399)
 430 IF P=180 THEN GOTO 550
 440 IF P=136 THEN GOTO 480
 460 LET S=S+1
 465 LET B=B-10
 468 IF B<=0 THEN GOTO 550
 470 GOTO 290
 480 PRINT AT 20,0;"YOU MADE IT
********";AT 21,0;"SCORE:";
 490 LET S=S+B
 500 LET Z=Z-(10 AND Z>1000)
 510 PRINT S;AT 1,16;" ";AT 2,15
;"  ";AT 3,16;" ";AT 2,19;"¶ñ"
 520 PAUSE 300
 530 CLS
 540 GOTO 165
 550 PRINT AT X,Y;"X";AT 20,0;"Y
OU HAVE BEEN KILLED...";AT 21,0;
"SCORE:";S;"   HI-SCORE:";
 560 IF S>H THEN LET H=S
 570 PRINT H
 580 PRINT AT 0,0;"MONKEY MAZE**
**SLR/1985         PRESS ENTER T
O PLAY..."
 590 PAUSE 4E4
 600 CLS
 610 GOTO 30
 700 SAVE "MMAZE"
 710 RUN