ZX81 Listing for mb.p


ZX81 program listing for **MATH BASH*SLR/1984**

SYSTEM VARIABLES

PROG  : 16509
D-FILE: 19432
VARS  : 20225
E-LINE: 20226
STKBOT: 20226
STKEND: 20226


LEGEND

9999 means line number
PRINT means treat as KEYWORD P


PROGRAM LISTING

  10 REM **MATH BASH*SLR/1984**
  20 CLS
  30 PRINT "MATH BASH           
              MATH BASH IS A TEA
CHING PRO-  GRAM THAT HELPS YOUR
 CHILD WITH THEIR MATH SKILLS. T
HE GOAL IS  TO GAIN POINTS BY CO
RRECTLY     ANSWERING MATH PROBL
EMS. WHEN   THIS HAPPENS, ONE OF
 THE ON     SCREEN ALIENS WILL E
XPLODE AND  POINTS AWARDED FOR H
OW MANY     TIMES IT TOOK TO REA
CH THE COR- RECT ANSWER. IF IT T
AKES TOO    LONG, THE GAME WILL 
END AND     THEIR SCORE DISPLAYE
D. THE PRO- BLEMS GET HARDER AS 
THE GAME    PROGRESSES.         
                                
            PRESS A KEY TO BEGIN
..."
  40 PAUSE 4E4
  50 LET S=0
  60 LET A=0
  70 LET A$="           úùúùúùú 
                        öóóóóó¶ 
                        õO>¸<Oµ 
                        ¶¹¹¹¹¹ö 
                        ùúùúùúù"
  80 LET B$="           ùúùúùúù 
                        öóóóóó¶ 
                        õ->¹<-µ 
                        ¶¹¹¹¹¹ö 
                        úùúùúùú"
  90 REM **BEGIN GAME**
 100 CLS
 110 LET A=A+1
 120 PRINT AT 18,0;"!ùù!ù!ùù!ù!ù
ùùù!!ù!ùùù!!!ù!ù!!ù!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!SCOR
E:";S;"!!!!!!!!!!!!!!!!!!!!!!!!"
;AT 21,0;"!!!!!!ALIEN!!!!!!!!!!!
!!!!!!!!!!";AT 21,13;A
 130 FOR C=0 TO 13 STEP 4
 140 FOR Z=1 TO 5
 150 PRINT AT C,0;A$
 160 LET X=INT (RND*(A+(20 AND A
<50))+1)
 170 LET Y=INT (RND*(A+(20 AND A
<50))+1)
 180 PRINT AT C,0;B$
 190 NEXT Z
 200 LET O=INT (RND*(4-(2 AND A<
20))+1)
 210 LET F$=STR$ X+("+" AND O=1)
+("-" AND O=2)+("*" AND O=3)+("/
" AND O=4)+STR$ Y
 220 PRINT AT 19,10;F$
 230 PRINT AT 20,0;"WHAT IS YOUR
 ANSWER ?!!!!!!!!!!!"
 240 LET ANS=VAL F$
 250 INPUT YANS
 260 IF ANS=YANS THEN GOTO 500
 270 PRINT AT 19,0;"!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!";AT C,0;"  
                                
                                
                                
                                
                                
                              "
 280 NEXT C
 290 PRINT AT 13,0;A$
 300 PRINT AT 0,0;"BOOM....THE A
LIENS LANDED       BETTER LUCK N
EXT TIME****       PRESS A KEY T
O START AGAIN...   "
 320 IF INKEY$<>"" THEN RUN
 330 PRINT AT 20,0;"FINAL SCORE 
WAS:";S
 340 PRINT AT 13,0;B$
 350 GOTO 310
 500 PRINT AT 19,0;"CORRECT*  YO
U STOPPED THE ALIEN*!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!";AT C,0;"  
                                
                                
                                
                                
                                
                              "
 510 FOR Z=1 TO 10
 520 PRINT AT C,0;"           ºö
÷³ù³ù                         ùú
 ñ÷ñ±                         óõ
´ô²³´                         ùñ
ºúú!ô                         ö÷
õ·ñúô"
 530 PRINT AT C,0;"           ùú
 ñ÷ñ±                         óõ
´ô²³´                         ùñ
ºúú!ô                         ö÷
õ·ñúô                         õò
ùö÷õ±"
 540 NEXT Z
 550 LET S=S+(13-C)*10
 560 PAUSE 500
 570 CLS
 580 GOTO 100
 600 SAVE "MB"
 610 RUN