ZX81 Listing for scm.p


ZX81 program listing for *SUGAR CUBE MUNCH*SLR83

SYSTEM VARIABLES

PROG  : 16509
D-FILE: 17272
VARS  : 17297
E-LINE: 17357
STKBOT: 17357
STKEND: 17357


LEGEND

9999 means line number
PRINT means treat as KEYWORD P


PROGRAM LISTING

   1 REM *SUGAR CUBE MUNCH*SLR83
  10 PRINT "        SUGAR CUBE M
UNCH"
  20 FOR A=1 TO 21
  30 PRINT "!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!"
  40 NEXT A
  50 LET X=INT (21*RND+1)
  60 LET Y=INT (32*RND)
  70 LET X1=X
  80 LET Y1=Y
  84 LET S=0
  88 LET T=S
  90 PRINT AT X,Y;"*"
 100 LET A$=INKEY$
 120 LET X=X-(A$="7" AND X>1)+(A
$="6" AND X<21)
 130 LET Y=Y-(A$="5" AND Y>0)+(A
$="8" AND Y<31)
 140 PRINT AT X,Y;
 150 LET T=T+1
 160 IF PEEK (PEEK 16398+256*
PEEK 16399)=8 THEN LET S=S+1
 170 IF S=671 THEN GOTO 220
 180 PRINT AT X1,Y1;" " AND (X1
<>X OR Y1<>Y)
 190 LET X1=X
 200 LET Y1=Y
 210 GOTO 90
 220 PRINT AT 10,5;"YOU ATE ALL 
THE SUGAR/"
 230 PRINT ,,"IT TOOK YOU ";T;" 
TURNS","TO SCORE ";S;" POINTS"
 240 PRINT AT 9,11;"SUGAR GONE"
 250 PRINT AT 9,11;"SUGAR GONE"
 260 IF INKEY$="" THEN GOTO 240
 270 IF INKEY$="N" THEN RUN
 280 STOP
 300 SAVE "SCM"
 310 RUN