home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1984 Half 2
/
rerun-1984-07-12.d64
/
speller
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
5KB
|
155 lines
0 rem *** the 64 speller ***
10 poke53281,1:poke53280,1:printchr$(144);chr$(14);chr$(147)
15 clr
20 s=54272:v=53248
25 restore
49 rem *** title ***
50 forx=1to6:print:nextx
55 printtab(13)"[212]he 64 [211]peller"
60 print:printtab(13)"by [199]ary [198]ields"
70 print:print:print:print
75 printchr$(18)" [206][207][212][197] to parent/teacher "
80 print:printtab(4)"[212]o change [215][207][210][196][211]/[196][197][198][201][206][201][212][201][207][206][211] - [198]1"
85 forx=1to40:printchr$(183);:nextx:gosub2000
87 for pr=0to62:readpq:poke832+pr,pq:nextpr
90 for x=1to100
92 getf1$:iff1$=""then95
93 iff1$=chr$(133)then2500
95 nextx
99 rem *** display words ***
100 printchr$(147)
105 print:printchr$(18)"[200]ere are the words you will be spelling":printchr$(146)
110 reada1$
120 ifa1$="-1"then150
125 readb1$,a2$,b2$
130 printa1$:gosub2000
135 printchr$(145);tab(20)a2$:gosub2000
140 goto110
150 print:printchr$(18)" [208][210][197][211][211] any key to begin "
155 print:print:printtab(3)"[212]o change [215][207][210][196][211]/[196][197][198][201][206][201][212][201][207][206][211] - [198]1"
158 forx=1to40:printchr$(183);:nextx:gosub2000
160 getf1$:iff1$=""then160
165 iff1$=chr$(133)then2500
190 restore:forpr=0to62:readpq:nextpr
200 printchr$(147)
210 read a$,b$:cc=0
215 if a$="-1"goto 1500
219 rem *** display of b$ 220-245
225 forx=1to6:print:nextx
227 print:print
229 print"[212]his defines a word you know."
230 forx=1to40:printchr$(183);:nextx:print:print
232 fori=0tolen(b$)
235 pokes+24,6:pokes+1,126:pokes,6:pokes+5,120:pokes+6,30:pokes+4,33
240 printleft$(b$,i+1):pokes+24,0
245 printchr$(145);chr$(145):forx=1to40:nextx
247 pokes+1,0:pokes,0:pokes+5,0:pokes+6,0:pokes+4,0:nexti
270 print:print:forx=1to100:nextx
280 input"[195]an you spell the word";c$
290 forx=1to50:nextx
300 ifc$=a$goto600
310 ifc$<>a$goto800
599 rem *** winning routine ***
600 printchr$(147):forx=1to9:print:nextx
605 sm=24:rem *** start smoke location **
610 pokev+4,200:pokev+21,4:poke2042,13:pokev+29,4:rem expand and position sprite
612 pokev+41,0:rem makes train (sprite 2)black
620 print;a$:forx=1to200:nextx
622 printchr$(152);:forx=1to7:printchr$(178);:nextx
623 print"[217]ou're on the right track";:forx=1to6:printchr$(178);:nextx
624 printchr$(144)
625 fortn=200to24step-8:rem sprite movement counter
644 pokes+24,15:pokes+1,145:pokes,0:pokes+5,0:pokes+6,240:pokes+4,129
645 pokev+4,tn:pokev+5,120:rem ** spritemover x and y location
646 ifsm<1thensm=1
647 sm=sm-1:rem *** moves smoke right to left
648 gosub750
650 forpu=1to40:next pu
651 pokes+24,0:pokes+1,0:pokes,0:pokes+5,0:pokes+6,0:pokes+4,0:nexttn
653 pokes+24,15:pokes+1,155:pokes,255:pokes+5,0:pokes+6,240:pokes+4,17:rem toot
655 printchr$(19):forx=1to6:print:nextx:printtab(14)"[217]ou got it!!"
657 forx=1to500:nextx
658 pokes+24,0:pokes+1,0:pokes,0:pokes+5,0:pokes+6,0:pokes+4,0
659 forx=1to300:nextx:rem pause between toots
660 pokes+24,15:pokes+1,155:pokes,255:pokes+5,0:pokes+6,240:pokes+4,17:rem toot
661 forx=1to500:nextx
662 pokev+21,0:rem *** turns sprite off
663 pokes+24,0:pokes+1,0:pokes,0:pokes+5,0:pokes+6,0:pokes+4,0
664 printchr$(147):forx=1to6:print:nextx
670 printchr$(18)a$;chr$(146);" is the correct spelling"
675 gosub2000
680 forx=1to1000:nextx:printchr$(147):forx=1to6:print:next
700 goto200
730 rem **** smoke routine ***
750 printchr$(19);:forx=1to8:print:nextx:rem moves smoke down 6 lines
760 printtab(sm);chr$(31);chr$(42);chr$(32);chr$(42):rem prints smoke
780 printchr$(144)
790 return
799 rem *** incorrect routine ***
800 printchr$(147)
801 forx=1to6:print:nextx
802 print"[217]our answer ";chr$(18);c$;chr$(146);" is incorrect."
805 rem *** buzz sound ***
810 pokes+24,15:pokes+1,3:pokes,255:pokes+5,0:pokes+6,240:pokes+4,33
820 forx=1to600:nextx
825 pokes+24,15:pokes+1,34:pokes,75:pokes+5,128:pokes+6,128:pokes+4,39
830 forx=1to600:nextx
840 pokes+24,0:pokes+1,0:pokes,0:pokes+5,0:pokes+6,0:pokes+4,0
865 print:print"[212]ry again"
870 forx=1to800:nextx
880 printchr$(147):forx=1to6:print:nextx
890 printb$:print:forx=1to500:nextx
892 printchr$(18);"[215]ould you like a clue? [208]ress [198]1 "
893 getcl$:ifcl$=""then893
894 ifcl$<>chr$(133)then900
895 cc=cc+1:print:print:printtab(15);left$(a$,cc):forx=1to500:nextx
896 printchr$(147):forx=1to6:print:nextx
898 printb$:print:print
900 input"[208]lease spell the word ";c$
910 goto290
1499 rem *** end routine ***
1500 forx=1to500:next:c=0
1510 printchr$(147):forx=1to6:print:nextx
1790 pokes+24,15:pokes+1,130:pokes,0:pokes+5,9:pokes+6,240:pokes+4,21
1795 print"[199][210][197][193][212] you got them all [210][201][199][200][212]!!":c=c+1
1797 forx=1to600:nextx:printchr$(147)
1800 pokes+24,0:pokes+1,0:pokes,0:pokes+5,0:pokes+6,0:pokes+4,0
1810 forx=1to6:print:nextx
1820 ifc<4goto1790
1830 printchr$(147):restore:forpr=0to62:readpq:nextpr
1840 printchr$(18)" [200]ere are your spelling words again. "
1850 reada1$
1855 ifa1$="-1"thenend
1860 readb1$,a2$,b2$
1880 printa1$;:printtab(20)a2$
1890 goto1850
1999 rem **** beep sound ****
2000 pokes+24,15:pokes+1,45:pokes,0:pokes+5,9:pokes+6,0:pokes+4,17
2010 forx=1to400:nextx
2020 pokes+24,0:pokes+1,0:pokes,0:pokes+5,0:pokes+6,0:pokes+4,0
2030 return
2499 rem **** add data routine ***
2500 printchr$(147)
2510 print:print:print
2520 print"[215]ords and definitions are stored in [196]ata lines"
2525 print"[212]hese are lines 2999-4999"
2530 print:print"[215]hen replacing, be sure to enter:"
2540 print:print" [196][193][212][193] line followed by 'data'"
2545 print" then the [215][207][210][196] followed by acomma"
2550 print" then the [196][197][198][201][206][201][212][201][207][206] no comma"
2555 print:print"[210]emember- the definiton can not be over 39 characters long"
2600 print:printchr$(18)"[208]ress [210]eturn to list data lines";:inputf2$
2900 list2999-4999
2950 data0,0,0,25,191,255,31,191,255,31,156,6,15,12,244, 15
2951 data45,244,95,252,180,127,252,116,255,252,52,255,255,252,127, 255
2952 data254,95,255,255,3,255,255,3,255,255,15,254,0,31,252, 254
2953 data63,253,131,120,61,57,243,157,57,246,193,131,3,128,254
2999 rem *** data lines ***
3000 data "dog","[193] four legged pet that barks"
3002 data "pencil","[217]ou use it to write at school"
3004 data "elephant","[212]he biggest animal on land"
3006 data "alphabet","[215]hat all the a,b,c's are called"
3024 data "morning","[212]ime of day when you first wake up"
3028 data "friend","[211]omeone you like very much"
5000 data "-1","-1","-1","-1"