home *** CD-ROM | disk | FTP | other *** search
- 10 printchr$(142):goto560
- 30 rem arithme-sketch by ted jean & jim pellechi
- 80 rem right answer
- 90 pokev,15:fortt=1to3:poked,10:poker,64+11:pokesu,23:pokes1,23:pokeu,4
- 100 pokew,21:fort=1to50:next:pokew,20
- 110 fort=1to16:poke53280,peek(53280)+1and15:next:next:poke53280,14:return
- 120 : key pressed
- 130 pokev,15:pokeu,110:poked,15:poker,9:pokew,17:fort=1to90:next:pokev,0
- 140 fort=0to24:pokeb+t,0:next:return
- 150 : wrong answer
- 160 poke53280,9:fortt=1to25:pokev,10
- 170 fort=1to3:next:pokev,0:fori=1to3:next:next:poke53280,14:return
- 180 rem large numbers
- 190 on(a+1) gosub200,210,220,230,240,250,260,270,280,290:printchr$(29);:return
- 200 print" [157][145] [157][145] [157] [157] [157] [157] [157][157] [157][157] [157][145] [145]";:return: 0
- 210 print"[145][145] [157] [157] [157] [157] [145][145]";:return: 1
- 220 print"[145][145] [157] [157] [157][157] [157][157] [157] [157] [145][145]";:return: 2
- 230 print"[145][145] [157] [157] [157][157] [157][157] [157] [157][145] [145]";:return: 3
- 240 print"[145][145] [157] [157] [145][145][157] [157] [157] [157] [145][145]";:return: 4
- 250 print"[145][145] [157][157][157] [157] [157] [157][157][157] [145][145]";:return: 5
- 260 print"[145][145] [157] [157] [157][157][157] [157] [145][157] [145]";:return: 6
- 270 print"[145] [157][145] [157] [157] [157] [157] [145][145]";:return: 7
- 280 print" [157][145] [157][145] [157] [157] [157] [157] [157][157] [157][157] [157][145] [145] ";:return: 8
- 290 print" [157][145] [157][145] [157] [157] [157] [157] [157][157] [157][157] [145][145] ";:return: 9
- 300 on gl goto310,320,330,340,350
- 310 s=8:sl=15:ll= 8:return
- 320 s=6:sl=13:ll=12:return
- 330 s=4:sl=12:ll=15:return
- 340 s=2:sl=10:ll=19:return
- 350 s=0:sl= 8:ll=23:return
- 360 rem clipboard
- 370 poke53280,14:poke53281,7
- 380 print"[149] [180][213][201][170] ";
- 390 print" [205][202][203][206] ";
- 400 print" [146][169] [223] [146]"
- 410 print" [146] [221][149] [206] [205] "
- 420 print" [146] [221][149] [183][183][183][183][183][183] [145]":fora=0to9
- 430 print" [146] [221][149] "
- 440 print" [146][163][163][221][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][149] [145]":next
- 450 fora=1308to1948step320:pokea,81:next:return
- 460 rem title screen
- 470 gosub370
- 480 print line$(8)spc(14)"arithme-sketch"
- 490 print line$(9)spc(14);
- 500 for a=1to14:print chr$(183);:next
- 510 print line$(12)spc(10)"what kind of problems ?"
- 520 print line$(16)spc(7)"press + for addition"
- 530 print line$(18)spc(7)"press - for subtraction"
- 540 print line$(22)spc(12)"your choice ";:return
- 550 rem cursor control
- 560 dim line$(25)
- 570 line$(1)=chr$(19)
- 580 for a=2to25
- 590 line$(a)=line$(a-1)+chr$(17):next
- 600 rem constants
- 610 zz=1:sc=1065:co=54272:cl=0
- 620 rem joystick table
- 630 for a=0to10:read xy(a):next
- 640 data 0,-40,40,0,-1,-41
- 650 data 39,0,1,-39,41
- 660 rem keyboard table
- 670 dim key(64)
- 680 for a=0to64:key(a)=0:next
- 690 key(08)=11:key(11)=15:key(16)=5
- 700 key(19)=6:key(24)=7:key(27)=8
- 710 key(56)=1:key(59)=2
- 720 rem ml
- 730 ad=49152
- 740 read a:ifa<>-1thenpokead,a:ad=ad+1:goto740
- 750 data 162,4,160,196,32,30,192
- 760 data 162,216,160,200,32,30
- 770 data 192,96,162,196,160,4
- 780 data 32,30,192,162,200,160
- 790 data 216,32,30,192,96
- 800 data 142,42,192,140,45,192
- 810 data 160,4,162,0,189,0,0
- 820 data 157,0,0,202,208,247
- 830 data 238,42,192,238,45,192
- 840 data 136,208,238,96,-1
- 850 rem sound
- 860 b=54272:fort=0to24:pokeb+t,0:next
- 870 v=b+24:w=b+4:u=b+1:d=b+5:r=b+6:s1=b+14:su=b+15
- 880 rem display title
- 890 print"[147]":gosub470:poke198,0
- 900 print"?"chr$(149)chr$(157);:if peek(162)and32 then printchr$(158);
- 910 getan$:ifan$<>"+"andan$<>"-"then900
- 920 printchr$(149)an$:gosub130:for a=1to500:next
- 930 rem difficulty level
- 940 gosub370
- 950 print line$(6)spc(11)"select grade level"
- 960 print line$(10)spc(11)chr$(18)"1"spc(5)chr$(146)" first grade"
- 970 print line$(12)spc(11)chr$(18)"2"spc(5)chr$(146)"second grade"
- 980 print line$(14)spc(11)chr$(18)"3"spc(5)chr$(146)" third grade"
- 990 print line$(16)spc(11)chr$(18)"4"spc(5)chr$(146)"fourth grade"
- 1000 print line$(18)spc(11)chr$(18)"5"spc(5)chr$(146)" fifth grade"
- 1010 print line$(24)spc(9)"pick any grade"chr$(149)" 1 - 5"
- 1020 ifpeek(162)and32thenprintchr$(158);
- 1030 geta$:on-(a$<"1"ora$>"5"ora$="")goto1010:gosub130
- 1040 nn=10^(val(a$))-1:mm=nn
- 1050 :
- 1060 rem instructions
- 1070 gosub370
- 1080 print line$(8)spc(10)"you will now get 5"
- 1090 print line$(10)spc(10)chr$(18);
- 1100 ifan$="+"then print"addition problems.":goto1120
- 1110 print"subtraction problems."
- 1120 print line$(12)spc(10)"for every right answer,"
- 1130 print line$(14)spc(10)"you will get 1 minute"
- 1140 print line$(16)spc(10)"of drawing time."
- 1150 print line$(20)spc(15);
- 1160 for a=1to11:print chr$(175);:next
- 1170 print line$(21)spc(15)chr$(18)" good luck "
- 1180 print line$(22)spc(15);
- 1190 for a=1to11:print chr$(163);:next:poke198,0
- 1200 print line$(24)spc(8)"press "
- 1210 print line$(24)spc(14)"any key"chr$(149)" to continue"
- 1220 ifpeek(162)and32thenprintchr$(158);
- 1230 geta$:on-(a$="")goto1210:gosub130
- 1240 rem begin math
- 1250 prob=1:tl=0:poke198,0
- 1260 gosub1900:try=0
- 1270 gosub370
- 1280 rem math problems
- 1290 print line$(05)spc(6)"problem"spc(35)"#"prob:gosub300
- 1300 printline$(09)spc(12)spc((gl-ln)*4+s);
- 1310 on ln goto1370,1360,1350,1340,1330,1320
- 1320 a=n(1):gosub190
- 1330 a=n(2):gosub190
- 1340 a=n(3):gosub190
- 1350 a=n(4):gosub190
- 1360 a=n(5):gosub190
- 1370 a=n(6):gosub190
- 1380 printline$(15)spc(12)spc((gl-lm)*4+s);
- 1390 on lm goto1450,1440,1430,1420,1410,1400
- 1400 a=m(1):gosub190
- 1410 a=m(2):gosub190
- 1420 a=m(3):gosub190
- 1430 a=m(4):gosub190
- 1440 a=m(5):gosub190
- 1450 a=m(6):gosub190
- 1460 printline$(16)spc(sl);
- 1470 if an$="+"then print" [157][157][145] [157] ":goto1490
- 1480 print "[175][175]"
- 1490 printline$(18)spc(sl);
- 1500 for a=0to ll:print chr$(185);:next
- 1510 print line$(22)spc((sl+ll)-2);
- 1520 gosub2050:rem digit 1
- 1530 ans=val(a$)
- 1540 if n3<10 then1690
- 1550 gosub2050:rem digit 2
- 1560 ans=ans+(val(a$)*10)
- 1570 if n3<100 then1690
- 1580 gosub2050:rem digit 3
- 1590 ans=ans+(val(a$)*100)
- 1600 if n3<1000 then1690
- 1610 gosub2050:rem digit 4
- 1620 ans=ans+(val(a$)*1000)
- 1630 if n3<10000 then1690
- 1640 gosub2050:rem digit 5
- 1650 ans=ans+(val(a$)*10000)
- 1660 if n3<100000 then1690
- 1670 gosub2050:rem digit 6
- 1680 ans=ans+(val(a$)*100000)
- 1690 printchr$(18);:if n3=ans then1770
- 1700 gosub160:try=try+1:if try=2 then1730
- 1710 print line$(1)spc(3)"incorrect !!"spc(11)" try again "
- 1720 for a=1to2000:next:goto1270
- 1730 print line$(1)spc(2)"wrong again ..."spc(6)" the answer is "
- 1740 printline$(2)spc(24);:ifgl<4thenprint" ";:ifgl=1thenprint" ";
- 1750 print"*** "mid$(str$(n3),2)" ***"
- 1760 goto1790
- 1770 tl=tl+1
- 1780 print line$(1)spc(4)" excellent "spc(10)" answer !!!":gosub90
- 1790 printchr$(146):for a=1to1400:next
- 1800 prob=prob+1:if prob<6 then1260
- 1810 poke53280,14:poke53281,2
- 1820 poke646,1:print chr$(147)
- 1830 print line$(6)spc(10)"you got "tl" right!"
- 1840 print line$(9)spc(8)"now it is time to draw."
- 1850 print line$(16)spc(8)"use joystick in control"
- 1860 print line$(18)spc(15)"port # 2"
- 1870 for a=1to4000:next
- 1880 goto2110
- 1890 rem random numbers
- 1900 forx=1to6:n(x)=-1:next
- 1910 forx=1to6:m(x)=-1:next
- 1920 n=int((rnd(0)* nn)+1)
- 1930 m=int((rnd(0)* mm)+1)
- 1940 if an$="+"then n3=n+m:goto1980
- 1950 if n=m then1930
- 1960 if n<m then n3=n:n=m:m=n3
- 1970 n3=n-m
- 1980 n1$=str$(n):ln=len(n1$)-1
- 1990 x=1:fora=(7-ln)to6:n(a)=val(mid$(n1$,x+1,1)):x=x+1:next
- 2000 m1$=str$(m):lm=len(m1$)-1
- 2010 x=1:fora=(7-lm)to6:m(a)=val(mid$(m1$,x+1,1)):x=x+1:next
- 2020 if ln-lm<0then gl=lm:return
- 2030 gl=ln:return
- 2040 rem get digit
- 2050 poke198,0
- 2060 print"?"chr$(149)chr$(157);:ifpeek(162)and32thenprintchr$(158);
- 2070 geta$:ifa$<"0"ora$>"9"then2060
- 2080 a=val(a$):printchr$(158)chr$(160)chr$(149)chr$(157)chr$(157);:gosub190
- 2090 fora=0to6:print chr$(157);:next:gosub130:return
- 2100 rem
- 2110 rem draw routine
- 2120 print chr$(151);chr$(147);
- 2130 poke53280,8:poke53281,15
- 2140 if zz=0 thensys(49167):goto2200
- 2150 printchr$(18)"%%%%%%%%%%%%% time = %%%%%%%%%%%%%";
- 2160 forx=1to23:printspc(38)"%%";:next
- 2170 print"%%% f1= save %%%%%%%%% f2= restore %%%"chr$(157)chr$(148)"%"chr$(19)
- 2180 zz=0:ifer=1then sc=1065:er=0:return
- 2190 sys(49152)
- 2200 time$="000000"
- 2210 t2$=mid$(time$,4,1)
- 2220 t3$=mid$(time$,5,2)
- 2230 t2=tl-val(t2$)-1
- 2240 t3=59-val(t3$)
- 2250 t3$=str$(t3):ift3<10thent3$=" 0"+right$(t3$,1)
- 2260 print line$(1)spc(20)chr$(18)t2":"t3$
- 2270 if t2<0then2500
- 2280 jv=peek(56320):kv=peek(197):sv=peek(653)
- 2290 fb=16-(jv and 16):jv=15-(jv and 15)
- 2300 ch=peek(sc):cc=peek(sc+co)
- 2310 if ch>127then pokesc,171:goto2330
- 2320 poke sc,43:poke sc+co,cl
- 2330 for a=1to50:next
- 2340 poke sc,ch:poke sc+co,cc
- 2350 for a=1to50:next
- 2360 if fb thenpoke sc,160:poke sc+co,cl
- 2370 ifkey(kv) then cl=key(kv)-1
- 2380 if sv=1 and kv<>4 then poke sc,32
- 2390 ifkv<>4then2450
- 2400 ifsv=1thengosub130:sys(49167):goto2450:rem f2 key
- 2410 ifsv=4thener=1:zz=1:gosub2120:rem control key/f1 key (erase screen)
- 2420 if sv then2450
- 2430 gosub130:sys(49152):printchr$(147)line$(12)spc(15)"s a v e d"
- 2440 fora=1to999:next:sys(49167)
- 2450 sc=sc+xy(jv):if sv=6 then 2500:rem control key/logo key (exit draw)
- 2460 if(sc<1065)or(sc>1982)then sc=sc-xy(jv)
- 2470 if(sc-1064)/40=int((sc-1064)/40)then sc=sc-xy(jv)
- 2480 if(sc-1063)/40=int((sc-1063)/40)then sc=sc-xy(jv)
- 2490 goto2210
- 2500 gosub90:sys(49152):printchr$(147):goto890
-