130 TEXT : HOME : NORMAL : SPEED= 255: POKE 32,9: VTAB 7
140 POKE 32,0: IF PEEK(232) + PEEK(233) *256 < >24576 OR PEEK(24576) < >82 THEN PRINT CHR$(4);"BLOAD MM.SHAPES,A$6000": POKE 232,0: POKE 233,96
150 FOR L = 1 TO 7: FOR E = 0 TO 20:AN(L,E) = 0: NEXT E: NEXT L: GOSUB 2230: GOTO 1490
160 REM TAB
170 S = 21 - INT( LEN(S$)/2): RETURN
180 REM DRAW S$
190 BX = X: FOR T = 1 TO LEN(S$):A$ = MID$ (S$,T,1): IF ASC(A$) < >32 THEN XDRAW ASC(A$) -26 +48 *AN AT BX,Y
200 BX = BX +7 +7 *AN: NEXT : RETURN
210 REM DRAW SCORE
220 S$ = N$ +", THIS IS TRY " + STR$(TRY) +" ON PROBLEM " + STR$(W) +".": GOSUB 170:X = (S -1) *7:Y = AY(0) -8 *(A = 4): GOSUB 190: IF W = 1 THEN RETURN
230 S$ = "SO FAR YOU HAVE " + STR$(NR(1) +NR(2)) +" RIGHT OUT OF " + STR$(W -1) +".": GOSUB 170:X = (S -1) *7:Y = Y +16: GOSUB 190: RETURN
240 REM MULT. LINE
250 TT = UL +L *(UL = 0): FOR T = AX(TT) TO AX STEP 14: XDRAW 1 AT T,AY(TT): NEXT T:UL = L *(UL = 0): IF R(20) = 0 THEN SR = 0:R = 0:RG = 0: RETURN
260 REM R/G ERASE
270 RG = 0: FOR EC = 19 TO ES STEP -1:RT = R(EC) - INT(R(EC)/100) *100: IF RT THEN SU = 0: GOSUB 350: XDRAW RT +60 -48 *R AT RX,Y:R(20) = R(20) -R(EC):R(EC) = 0:RG = 0: IF R(20) = 0 THEN EC = ES
280 NEXT EC:SR = 0:R = 0: RETURN
290 REM T/O LINE
300 FOR T = E(2) +2 TO E(2) +2 +BD: XDRAW 1 AT 266 -T *14,AY(2) +4: NEXT : XDRAW 5 AT 266 -(T -1) *14,AY(2) +4: RETURN
310 REM INVERSE
320 FOR Y = AY(0) TO AY(0) +15: HPLOT 0,Y TO 62,Y: NEXT Y
330 HCOLOR= 3: FOR Y = 152 +24 *(A <4) TO 167 +24 *(A <4): HPLOT 0,Y TO 76,Y: NEXT Y: RETURN
340 REM SUB. R/G
350 TT = 0:RX = 266 -(EC +SR) *14:RG = INT(R(EC)/1000) *(RG = 0) +RG:Y = RG -100:T = R(EC) -RG *1000 -RT: IF A = 1 OR A = 4 OR A = 5 AND R = 0 OR T = 0 AND SU = 0 THEN 380
360 HCOLOR= 3 *SU: DRAW 80 AT RX -7 *(A = 5),Y +16 -8 *(A = 5) +8 *(A = 2): DRAW 23 AT RX +14 -5 *(A = 5),Y +16 *(A = 2):TT = 1: IF R(EC +1) >0 AND SU OR T = 200 THEN DRAW 66 AT RX -6 *(A = 5),Y +16 *(A = 2):TT = 2
370 IF SU = 0 THEN HCOLOR= 3: DRAW TN(EC -ES +1) *(L <4) +AN(L -2 *(L >3),EC +1) *(L >3) AT RX -7 *(A = 5),Y +16 -8 *(A = 5) +8 *(A = 2): IF R(EC +1) >0 THEN DRAW 23 AT RX -5 *(A = 5),Y +16 *(A = 2)
380 R(EC) = RG *1000 +TT *100 +RT:SU = 0: RETURN
390 REM DIV. LINE
400 UL = 0:LL = L -(K = 68): FOR T = 7 TO LL +1 STEP -1:UL = UL +AN(T,20): NEXT T: FOR T = 14 *(LL = 2) TO 19 *(LL = 2):UL = UL -AN(3,T): NEXT T: IF UL < >0 OR AN(LL,20) = 0 THEN NEXT Z
410 FOR T = ES TO LE: IF AN(LL,T) = 0 AND AN(LL -1,T) *(LL >2) = 0 THEN NEXT T
420 FOR S = (LE) TO ES STEP -1: IF AN(LL,S) = 0 AND AN(LL -1,S) = 0 THEN NEXT S
430 S = S *(LL >2) +LE *(LL = 2): IF S <T THEN NEXT Z
440 FOR SS = T TO S: IF ((AN(LL,SS) <100) +(K = 85)) = 1 THEN XDRAW 1 AT AX -(SS -ES) *14,AY(LL):AN(LL,SS) = AN(LL,SS) +100 -200 *(K = 85):AN(LL,20) = AN(LL,20) +100 -200 *(K = 85)
450 NEXT SS: NEXT Z
460 REM ERASE
470 IF R(20) >0 THEN GOSUB 270
480 FOR L = 7 TO 1 STEP -1: IF AN(L,20) = 0 AND ((UL = L) *(A = 4) = 0) THEN NEXT L: GOTO 540
490 IF UL = L AND A = 4 THEN GOSUB 250:UL = 0
500 FOR E = E(L) +(19 -E(L)) *(A = 5) *(L <4) *(L < >1) TO 0 STEP -1:SH = AN(L,E): IF SH = 0 THEN NEXT E: NEXT L: GOTO 540
510 X = 266 -E *14: IF SH THEN HS = INT(SH/100): IF HS THEN XDRAW 1 AT X,AY(L):AN(L,20) = AN(L,20) -100:AN(L,E) = AN(L,E) -100: IF AN(L,20) = 0 AND R(20) = 0 THEN E = 0: NEXT E: NEXT L: GOTO 540
520 IF SH THEN SH = SH -HS *100: IF SH THEN XDRAW SH AT X,AY(L):AN(L,20) = AN(L,20) -SH:AN(L,E) = 0: IF AN(L,20) = 0 AND R(20) = 0 THEN E = 0: NEXT E: NEXT L: GOTO 540
530 NEXT E
540 IF TS THEN GOSUB 300
550 RETURN
560 REM ANS. CHECK
570 GOSUB 220:LL = L:L = 1:AN = 0:TRY = TRY +1: IF A = 4 THEN FOR T = 7 TO 1 STEP -1:L = T:T = T -(T -1) *(AN(L,20) >0): NEXT T: IF AN(L,20) = 0 THEN 620
580 FOR T = 19 TO ES STEP -1:E = T:T = T -(T -ES) *(AN(L,E) >0): NEXT T:AN$ = "": FOR T = ES TO E:S = AN(L,T): IF S <70 OR S >79 THEN T = E: NEXT T: GOTO 620
590 AN$ = STR$(S -70) +AN$: NEXT T: IF A = 5 AND R$ = "Y" THEN FOR S = 0 TO ES -4:E = S:S = S +ES *(AN(1,E) >0): NEXT S: IF S = ES -3 THEN 620
600 IF A = 5 AND R$ = "Y" THEN RM = 0:TT = 0: FOR T = E TO ES -4:S = AN(1,T):RM = RM +(S -70) *(S >0) *10 ^TT:TT = TT +1: NEXT T:AN$ = AN$ +" " + CHR$(47) +" " + STR$(RM)
610 IF CA$ = AN$ THEN L = LL: GOTO 680
620 TT = 0:L = LL: IF TRY = 2 THEN 730
630 HCOLOR= 3: GOSUB 320
640 X = 0:Y = AY(0):S$ = "THE RIGHT": GOSUB 190:Y = Y +8:S$ = "ANSWER IS": GOSUB 190:Y = 152 +24 *(A <4):S$ = "PRESS A KEY": GOSUB 190:Y = Y +8:S$ = "TO CONTINUE": GOSUB 190
650 X = LX:Y = AY(0):S$ = CA$:AN = 1: GOSUB 190:AN = 0: IF TT <1 THEN POKE P,0: GET A$: PRINT :K = ASC(A$):TT = TT +1: GOTO 650
740 S$ = "NOPE, THAT'S NOT RIGHT, " +N$ +".": GOSUB 170:X = (S -1) *7:Y = AY(0) -8 *(A = 4): GOSUB 190:S$ = "TRY AGAIN!": GOSUB 170:X = (S -1) *7:Y = Y +16: GOSUB 190: GOSUB 330
750 IF TT <1 THEN X = 0:Y = 152 +24 *(A <4):S$ = "PRESS A KEY": GOSUB 190:Y = Y +8:S$ = "TO CONTINUE": GOSUB 190: POKE P,0: GET A$: PRINT :K = ASC(A$):TT = 2: GOTO 740
760 GOSUB 470: ON ((K = 27) +1) GOTO 970,870
770 REM LOOP
780 ES = (266 -AX)/14:K = 0:NR(1) = 0:NR(2) = 0: GOSUB 330: FOR W = 1 TO 10: FOR T = 0 TO 8:TN(T) = 0: NEXT T:TRY = 1: IF AA = 3 THEN A = INT( RND(1) *2) +1
820 BN = INT( RND(1) *10 ^BD) +(A = 5): IF LEN( STR$(BN)) < >BD THEN 820
830 IF BN >TN THEN T = BN:BN = TN:TN = T:T = 0
840 IF A = 5 AND R$ = "Y" THEN IF TN/BN = INT(TN/BN) THEN 810
850 IF A = 5 AND R$ < >"Y" THEN TN = INT(TN/BN) *BN: IF BN = TN OR LEN( STR$(TN)) <TD THEN 810
860 REM DISPLAY
870 TT = 0: FOR T = 0 TO TD -1:X = AX -14 *TT:Y = BY -24 *(A = 5):TN(T) = VAL( MID$ ( STR$(TN),TD -T,1)) +70: XDRAW TN(T) AT X,TY:TT = TT +1: XDRAW 1 AT X,Y: NEXT T
880 FOR T = 1 TO 1 +(A <5):X = X -14: XDRAW 1 AT X,Y: NEXT T: XDRAW A +1 +(A <4) AT X,BY:TT = (TT +1) *(A = 5)
890 FOR T = 0 TO BD -1: XDRAW VAL( MID$ ( STR$(BN),BD -T,1)) +70 AT AX -14 *TT,BY:TT = TT +1: NEXT T: IF A = 5 AND R$ = "Y" THEN XDRAW 69 AT AX +28,AY(1)
900 IF TRY >1 THEN NEXT W: GOTO 2050
910 REM ANSWER
920 CA$ = "": IF A = 1 THEN CA$ = STR$(TN +BN)
930 IF A = 2 THEN CA$ = STR$(TN -BN)
940 IF A = 4 THEN TT = 0: FOR T = 1 TO BD:S = TN * VAL( MID$ ( STR$(BN),BD -T +1,1)) +TT:CA$ = STR$(S - INT(S/10) *10) +CA$:TT = INT(S/10): NEXT T: IF TT THEN CA$ = STR$(TT) +CA$
950 IF A = 5 THEN S = INT(TN/BN):CA$ = STR$(S)
960 LX = AX -14 *( LEN(CA$) -1): IF A = 5 AND R$ = "Y" THEN CA$ = CA$ +" " + CHR$(47) +" " + STR$(TN -BN *S)
1020 FOR RC = 1 TO 2:CR = (CR = 0): XDRAW 1 +R *(RG >0) AT X,Y: FOR C = 1 TO 13:K = RND(1):K = PEEK( -16384):C = C +15 *(K >128):RC = 2 *(K >128): NEXT C: NEXT RC: IF CR THEN XDRAW 1 +R *(RG >0) AT X,Y
1030 REM DRAW
1040 POKE P,0:CR = 0:C = 0:K = K -128: IF K = 32 OR K >47 AND K <58 THEN C = 1:SH = ((K +22) -48 *R *(RG >0)) *(K < >32):HS = AN(L,E) - INT(AN(L,E)/100) *100
1050 IF C AND HS AND RG = 0 THEN XDRAW HS AT X,Y:AN(L,20) = AN(L,20) -HS:AN(L,E) = AN(L,E) -HS
1060 IF C THEN RT = R(EC) - INT(R(EC)/100) *100: IF (RT) AND (RG OR (SH = 0 AND HS = 0)) THEN SU = 0:HR = RG: GOSUB 350: XDRAW RT +60 -48 *R AT RX,Y:R(20) = R(20) -R(EC):R(EC) = 0:RG = HR
1070 IF C AND SH THEN XDRAW SH AT X,Y:TT = SH *(RG = 0):AN(L,E) = AN(L,E) +TT:AN(L,20) = AN(L,20) +TT: IF RG THEN RT = (SH -60 +48 *R):R(EC) = RG *1000 +RT:SU = 1: GOSUB 350:R(20) = R(20) +R(EC)
1100 IF C THEN TT = TT -(SH = 0) *((RG = 0) *(E < >ES) *(E < >E(L) +2) *(E >ES -7) *(RT = 0) -(RG >0))
1110 IF C THEN E = E +TT *(RG = 0):RE = RE +TT:R = R *(R(20) >0):SR = SR *(R(20) >0):RG = RG *(RE <0) *(((A = 5) AND R) OR (A = 2)): NEXT Z
1120 REM ?
1130 IF K = 63 THEN TEXT : HOME : GOSUB 2110: POKE -16299,0: POKE -16304,0: NEXT Z
1140 REM ESC
1150 IF K = 27 THEN Z = 2: NEXT Z: GOSUB 220: GOSUB 470:TRY = 2: GOTO 870
1160 REM C/R
1170 IF K = 13 THEN Z = 2: NEXT Z: GOTO 570
1180 REM LEFT
1190 IF K = 8 THEN C = 1:T = (R = 0) *(RG >0) *(A = 4): IF A = 5 AND RG >0 AND R = 1 AND L >3 AND AN(L -2 *(L >3),EC +2) = 0 THEN NEXT Z
1200 IF C AND EC <E(L *(T = 0) +(T >0)) +(BD +2) *(A = 5) *(L >1 +(TS = 2)) *((RG >0) *(R = 0) OR (TS = 2)) THEN E = E +(RG = 0):RE = RE -1: IF E = ES -3 THEN E = E +3
1210 IF C THEN NEXT Z
1220 REM RIGHT
1230 IF K = 21 THEN C = 1: IF EC >ES +(TD +1) *(A = 5) *(R = 0) *((TS = 2) OR (RG >0)) THEN E = E -(RG = 0):RE = RE +1: NEXT Z
1240 IF C AND A = 5 AND L = 1 AND R$ = "Y" AND E >ES -7 THEN E = E -1: IF E = ES -1 THEN E = E -3
1250 IF C THEN NEXT Z
1260 REM U
1270 IF K = 85 AND L >1 +(TS = 2) AND RG = 0 THEN ON (R(20) >0) GOSUB 270:L = L -1:T = E(L) +2 *(TS = 2):E = E *(E < = T) +T *(E >T): ON ((A = 5) *(TS < >2) *(L/2 = INT(L/2))) GOTO 400: NEXT Z
1280 IF K = 85 THEN NEXT Z
1290 REM D
1300 IF K = 68 THEN C = 1: IF RG = 0 AND (A <4 OR L >6 OR TS = 2 AND L = 3) OR E <ES THEN NEXT Z
1310 IF C THEN ON ((RG = 0) *R(20) >0) GOSUB 270:L = L +(RG = 0):RG = 0: ON ((A = 5) *(TS < >2) *(L/2 < > INT(L/2))) GOTO 400: NEXT Z
1320 IF C THEN NEXT Z
1330 REM L
1340 IF K = 76 AND A = 4 AND L <7 +(UL >0) THEN GOSUB 250:L = L +(UL >0): NEXT Z
1350 REM T
1360 IF K = 84 AND A = 5 THEN C = 1: GOSUB 270: IF TS = 2 THEN L = LL:E = EE:TS = 1: NEXT Z
1370 IF C THEN LL = L:L = 2:EE = E:E = E(2) +2: FOR TT = 2 TO 3: FOR T = 19 TO 14 STEP -1:SH = AN(TT,T): IF SH THEN XDRAW SH AT 266 -T *14,AY(TT):AN(TT,20) = AN(TT,20) -SH:AN(TT,T) = 0
1380 IF C THEN NEXT T: NEXT TT: ON (TS = 0) GOSUB 300:TS = 2: NEXT Z
1390 REM R
1400 IF K < >82 OR RG OR A = 2 AND EC = E(1) OR A = 5 AND (L = 1 +(TS = 2) OR TS < >2 AND L/2 < > INT(L/2) AND (AN(L -1,E) +AN(L -1,E +1) <200 OR AN(L -2 *(L >1),E +1) = 0 AND L >3)) THEN NEXT Z
1410 RG = RY:R = 0: IF A = 5 AND L >1 AND L/2 < > INT(L/2) AND TS < >2 THEN RG = AY(L) +52:SR = .5:RE = -.5:R = 1: NEXT Z
1420 IF A = 4 AND UL AND L >UL THEN FOR S = 1 TO L:T = S:S = S +6 *(AN(T,E) >0): NEXT S:RG = AY(T) +92 -(T = L):R = 1:RE = .25:SR = -.25: NEXT Z
1430 IF A >3 THEN FOR S = ES TO E:T = S:S = S +20 *(AN(L,S) < >0 AND AN(L,T) < >100): NEXT S
1440 IF A = 4 THEN RE = (T -ES) *(R = 0):RE = RE *(E -RE < = LE) +(E -LE) *(E -RE >LE)
1450 IF A = 5 THEN RE = ( -1) *(TD +1 -T +ES) *(R = 0) *(TS <2):RE = RE *(E -RE <20) +(E -19) *(E -RE >19)
1460 IF A = 2 THEN SR = 1:RE = -1
1470 NEXT Z
1480 REM INSTRUCTIONS
1490 HOME : VTAB 10: POKE P,0: PRINT TAB( 3)"DO YOU WANT INSTRUCTIONS? (Y/N) > ";: GET A$: PRINT A$: IF A$ < >"Y" THEN 1590
1500 HOME : HTAB 14: INVERSE : PRINT " INSTRUCTIONS ": NORMAL : POKE 34,2: PRINT : PRINT " 'MATH MARATHON' CAN HELP YOU WITH YOUR ADDING, SUBTRACTING, MULTIPLYING AND DIVIDING SKILLS."
1510 PRINT : PRINT " I'LL ASK YOU TO CHOOSE THE KIND OF PROBLEM YOU WANT TO WORK ON AND HOW BIG YOU WANT IT TO BE."
1520 PRINT : PRINT " I'LL GIVE YOU TEN PROBLEMS. YOU'LL HAVE TWO CHANCES TO ANSWER EACH ONE."
1530 PRINT : PRINT " I'LL KEEP SCORE AND SHOW IT TO YOU WHILE YOU'RE WORKING ON PROBLEMS. WHEN YOU'RE DONE YOU'LL SEE THE FINAL SCORE. THEN, IF YOU WANT, YOU CAN TRY TEN MORE PROBLEMS, EITHER THE SAME KIND OR SOME- THING DIFFERENT."
1540 GOSUB 2230
1550 PRINT " IF YOU WANT TO STOP BEFORE ALL TEN PROBLEMS ARE DONE, PRESS THE <ESC> KEY."
1560 PRINT : PRINT " A SHORT LIST OF THE KEY FUNCTIONS WILL BE DISPLAYED WITH THE PROBLEMS. I ALSO HAVE A MORE DETAILED LIST THAT YOU CAN SEE BEFORE STARTING OR WHILE YOU'RE"
1570 PRINT "WORKING. TO SEE IT WHILE YOU'RE WORKING JUST PRESS THE <?> KEY."
1580 POKE 34,0: GOSUB 2230
1590 FOR T = 1 TO 10:N$(T) = "": NEXT T: HOME : INVERSE : HTAB 13: PRINT " MATH MARATHON ": NORMAL : VTAB 23: PRINT TAB( 4)"WHEN YOU'RE DONE, PRESS <RETURN>."
1600 N$ = "": POKE P,0: VTAB 10: PRINT TAB( 5)"WHAT'S YOUR NAME? ..........": VTAB 10: HTAB 26: FOR T = 0 TO 10: GET A$:A = PEEK( -16384):AA = A <32 OR A >94: IF NOT AA AND T <10 THEN PRINT A$;:N$(T +1) = A$
1610 IF A = 8 AND T >0 THEN PRINT A$;:T = T -1
1620 IF A = 21 THEN A = 1: IF N$(T +1) < >"" THEN A = 21: PRINT N$(T +1);
1630 S = T:T = T -AA *(A < >21) -(A >31) *(T = 10) +20 *(A = 13): NEXT T: FOR A = 1 TO S +(T <19):N$ = N$ +N$(A): NEXT A:AA = 6: IF S = 0 THEN N$ = ""
1640 HOME : VTAB 10: HTAB 14: PRINT "YOUR NAME IS ": PRINT :S$ = N$: GOSUB 170: HTAB S: PRINT S$: PRINT : PRINT TAB( 9)"IS THAT RIGHT? (Y/N) > ";: GET A$: PRINT A$: IF A$ < >"Y" THEN 1590
1680 FOR T = 0 TO 7:AX(T) = 0:AY(T) = 0:E(T) = 0: NEXT :RY = 0:TY = 0:BY = 0:AX = 0:TN$ = "":BN$ = "":TD = 0:BD = 0:TN = 0:BN = 0:BM = 0:AN = 0
1690 GET A$:A = PEEK( -16384) -48: IF A <1 OR A >5 THEN 1690
1700 PRINT A$: HOME : VTAB 7: INVERSE
1710 REM SIZE
1720 IF A = 1 THEN S$ = " ADDITION "
1730 IF A = 2 THEN S$ = " SUBTRACTION "
1740 IF A = 3 THEN S$ = " ADDITION AND SUBTRACTION "
1750 IF A = 4 THEN S$ = " MULTIPLICATION "
1760 IF A = 5 THEN S$ = " LONG DIVISION "
1770 GOSUB 170: HTAB S: PRINT S$: NORMAL : PRINT : PRINT : PRINT :S$ = "SELECT THE NUMBER OF DIGITS": GOSUB 170: HTAB S: PRINT S$: PRINT : PRINT : IF A <5 THEN PRINT "TOP NUMBER 1 TO 8 DIGITS > ";
1780 IF A = 5 THEN PRINT "DIVISOR 1 TO 4 DIGITS > ";
1790 POKE P,0: GET A$:TD = PEEK( -16384) -48: IF TD <1 OR TD >8 -4 *(A = 5) THEN 1790
1800 BM = TD *(A <4) +TD *(A = 4) *(TD <7) +6 *(A = 4) *(TD >6) +(A = 5) *(TD +2): PRINT A$: PRINT : PRINT : IF TD = 1 THEN BD = TD: IF A <5 THEN PRINT "BOTTOM NUMBER IS ALSO 1 DIGIT.": GOTO 1860
1810 IF A <5 THEN PRINT "BOTTOM NUMBER 1 TO "BM" DIGITS > ";
1820 IF A = 5 THEN PRINT "DIVIDEND "TD" TO "BM" DIGITS > ";
1830 POKE P,0: GET A$:BD = PEEK( -16384) -48: IF BD >BM OR BD <(A <5) +TD *(A = 5) THEN 1830
1840 PRINT A$
1850 R$ = "": IF A = 5 THEN PRINT : PRINT : PRINT "DO YOU WANT REMAINDERS? (Y/N) > ";: POKE P,0: GET R$: PRINT R$:T = TD:TD = BD:BD = T
1860 PRINT : PRINT : PRINT "IS THIS ALL CORRECT? (Y/N) > ";: POKE P,0: GET A$: PRINT A$: IF A$ < >"Y" THEN 1660
1870 HOME : VTAB 10: POKE P,0: PRINT TAB( 3)"WANT TO SEE THE KEY LIST? (Y/N) > ";: GET A$: PRINT A$: IF A$ = "Y" THEN HOME : GOSUB 2110
1880 HOME : IF A = AA OR A <4 AND AA <4 THEN POKE -16299,0: POKE -16304,0:AA = A: GOTO 2000
1890 REM KEY-HGR
1900 AA = A: HGR2 : HCOLOR= 3: IF A <4 THEN X = 14:Y = 6: HPLOT 0,0 TO 279,0 TO 279,59 TO 0,59 TO 0,1 TO 278,1 TO 278,58 TO 1,58 TO 1,1
1910 IF A <4 THEN S$ = "PRESS R TO REGROUP.": GOSUB 190:Y = Y +8:S$ = "PRESS D TO MOVE DOWN": GOSUB 190:Y = Y +8:S$ = "PRESS " + CHR$(107) +" TO MOVE RIGHT.": GOSUB 190
1920 IF A <4 THEN Y = Y +8:S$ = "PRESS " + CHR$(108) +" TO MOVE LEFT.": GOSUB 190:Y = Y +8:S$ = "PRESS SPACE TO ERASE.": GOSUB 190:Y = Y +8:S$ = "PRESS RETURN WHEN YOU'RE DONE.": GOSUB 190
1930 IF A = 4 THEN X = 2:Y = 2: HPLOT 0,0 TO 136,0 TO 136,75 TO 0,75 TO 0,1 TO 135,1 TO 135,74 TO 1,74 TO 1,1:S$ = " R = REGROUP": GOSUB 190:Y = Y +8:S$ = " " + CHR$(107) +" = MOVE RIGHT": GOSUB 190
1940 IF A = 4 THEN Y = Y +8:S$ = " " + CHR$(108) +" = MOVE LEFT": GOSUB 190:Y = Y +8:S$ = " U = MOVE UP": GOSUB 190:Y = Y +8:S$ = " D = MOVE DOWN": GOSUB 190
1950 IF A = 4 THEN Y = Y +8:S$ = " L = DRAW OR": GOSUB 190:Y = Y +8:S$ = " ERASE LINE": GOSUB 190:Y = Y +8:S$ = "SPACE = ERASE": GOSUB 190:Y = Y +8:S$ = "RETURN = FINISH": GOSUB 190
1960 IF A = 5 THEN X = 182:Y = 50: HPLOT 175,46 TO 279,46 TO 279,191 TO 175,191 TO 175,47 TO 278,47 TO 278,190 TO 176,190 TO 176,47:S$ = "R REGROUP": GOSUB 190:Y = Y +14:S$ = "T TEST OUT": GOSUB 190
1970 IF A = 5 THEN Y = Y +8:S$ = " AND": GOSUB 190:Y = Y +8:S$ = " END TEST": GOSUB 190:Y = Y +14:S$ = "U MOVE UP": GOSUB 190:Y = Y +8
1980 IF A = 5 THEN S$ = " ERASE LINE": GOSUB 190:Y = Y +14:S$ = "D MOVE DOWN": GOSUB 190:Y = Y +8:S$ = " DRAW LINE": GOSUB 190:Y = Y +14:S$ = CHR$(107) +" MOVE RIGHT": GOSUB 190
1990 IF A = 5 THEN Y = Y +14:S$ = CHR$(108) +" MOVE LEFT": GOSUB 190:Y = Y +14:S$ = "SPACE - ERASE": GOSUB 190:Y = Y +14:S$ = "RETURN - DONE": GOSUB 190
2000 IF A <4 THEN AX = 126 +14 * INT(TD/2):YY = 172:TY = 88:BY = 104:AY(1) = 120:AX(1) = AX -14 *(TD):AY(0) = 144:E(1) = (266 -AX(1))/14
2010 IF A = 4 THEN AX = 210 +14 * INT(TD/2):YY = 100:TY = 16:BY = 32: FOR T = 1 TO 7:AY(T) = 40 +T *16:AX(T) = AX -14 *(TD +T -1):E(T) = (266 -AX(T))/14: NEXT :AY(0) = 176:AX(7) = AX(6):E(7) = E(6)
2020 IF A = 5 THEN AX = 70 +14 *TD:YY = 140:TY = 56:BY = 56:AY(0) = 0:AY(1) = 24:AY(2) = 72:AY(3) = 96:AY(4) = 112:AY(5) = 136:AY(6) = 152:AY(7) = 176: FOR T = 1 TO 7:AX(T) = 84:E(T) = (266 -AX(T))/14: NEXT
2030 SX = AX(1):LE = E(1): GOTO 780
2040 REM SCORE
2050 TEXT : HOME : VTAB 5: INVERSE :S$ = " TOTALS ": GOSUB 170: HTAB S: PRINT S$: NORMAL : VTAB 8: HTAB 7 - LEN( STR$(NR(1))): PRINT NR(1);: HTAB 10: PRINT "RIGHT THE FIRST TRY."
2060 VTAB 10: HTAB 7 - LEN( STR$(NR(2))): PRINT NR(2);: HTAB 10: PRINT "RIGHT THE SECOND TRY.": VTAB 15: PRINT "A TOTAL OF "NR(1) +NR(2)" RIGHT OUT OF "W -1 -(K = 27)
2070 VTAB 18: PRINT "DO YOU WANT TO DO MORE? (Y/N) > ";: POKE P,0: GET A$: PRINT A$: IF A$ < >"Y" THEN HOME : END
2080 VTAB 20: PRINT "THE SAME KIND OF PROBLEMS? (Y/N) > ";: POKE P,0: GET A$: PRINT A$: HOME : IF A$ = "Y" THEN POKE -16299,0: POKE -16304,0: GOTO 780
2090 GOTO 1660
2100 REM KEY-TEXT
2110 INVERSE : PRINT "KEY";: HTAB 17: PRINT "FUNCTION": NORMAL : POKE 34,2: PRINT : PRINT "R -MOVES THE CURSOR TO THE RIGHT PLACE FOR REGROUPING."
2120 IF A >3 THEN PRINT : PRINT "U -MOVES THE CURSOR UP FROM ONE AN- SWER LINE TO ANOTHER";: IF A = 5 THEN PRINT " ERASING UNUSED PROBLEM UNDERLINES";
2130 IF A >3 THEN PRINT "."
2140 PRINT : PRINT "D -MOVES THE CURSOR DOWN FROM RE- GROUPING";: IF A >3 THEN PRINT " OR TO THE NEXT LINE";: IF A = 5 THEN PRINT " DRAWING THE UNDERLINES";
2150 PRINT ".": PRINT : PRINT "ARROWS-MOVE THE CURSOR RIGHT OR LEFT WITHOUT ERASING ANYTHING."
2160 GOSUB 2230: HOME
2170 PRINT "SPACE -ERASES THE NUMBER OVER THE CUR- SOR OR ANY REGROUPED NUMBER ABOVE IT. THE CURSOR MOVES TO THE RIGHT."
2180 IF A = 4 THEN PRINT : PRINT "L -DRAWS OR ERASES THE LINE UNDER THE PROBLEM. IT IS DRAWN AT THE LEVEL OF THE CURSOR. IT CAN BE ERASED FROM ANY SPOT."
2190 IF A = 5 THEN PRINT : PRINT "T -SETS UP AND RETURNS YOU FROM A MULTIPLICATION PROBLEM UNDER THE DIVISOR. IT IS USED TO TEST DIGITS FOR THE ANSWER."
2200 PRINT : PRINT "RETURN-USE THIS ONLY WHEN YOU ARE DONE. I WILL THEN SEE IF YOUR AN- SWER IS CORRECT."
2210 PRINT : PRINT "ESC -THIS STOPS THE PROBLEMS. USE IT IF YOU WANT TO QUIT OR CHANGE THE KIND OF PROBLEMS."
2220 PRINT : PRINT "? -SHOWS YOU THIS LIST.": POKE 34,0
2230 VTAB 22: PRINT "** COPYRIGHT 1984 BY MICROSPARC, INC. **": VTAB 23: PRINT TAB( 9)"PRESS A KEY TO CONTINUE": POKE P,0: FOR T = 1 TO 2:TT = RND(1):T = 1 +( PEEK( -16384) >128): NEXT T: POKE P,0: HOME : RETURN
2270 IF ER = 6 THEN HOME : VTAB 10: HTAB 8: FLASH : PRINT " SHAPE TABLE NOT ON DISK ": PRINT : HTAB 2: PRINT " INSERT CORRECT DISK AND PRESS A KEY";: NORMAL : GET A$: PRINT : HOME : GOTO 140
2280 IF ER = 8 THEN HOME : VTAB 10: HTAB 12: FLASH : PRINT " DRIVE DOOR OPEN! ": PRINT : HTAB 6: PRINT " PLEASE CLOSE AND PRESS A KEY!";: NORMAL : GET A$: PRINT : HOME : GOTO 140
2290 TEXT : PRINT : PRINT "ERROR NUMBER "ER" IN LINE "LN".": PRINT : PRINT "PROGRAM IS ENDED.": END