Spelling I is a two-level educational spelling quiz program consisting of two nearly identical BASIC programs (Level 1 and Level 2), each containing 25 word sets stored as DATA statements. Each test presents ten randomly selected sets of five words, one of which is misspelled; the player must identify the incorrect word, and in the “difficult” mode must also type the correct spelling. The program tracks scores across multiple test sessions by encoding right/wrong counts as pairs of digit characters appended to strings `i$` and `j$`, allowing cumulative score history without arrays. Misspelled word tracking uses a 25-character string `x$` where each position stores the answer given (or “0” for unattempted/correct), enabling a practice mode that re-drills only the words previously missed. The border subroutine at line 9000 draws nested rectangles using PLOT/DRAW to create a decorative frame, and ON ERR handling at line 9900 provides a recovery loop using RESET and CONTINUE.
Program Analysis
The listing contains two complete, self-contained programs — Level 1 and Level 2 — sharing identical structure and logic but differing only in their DATA statements (word sets) and the level label stored in z$ at line 1. Both programs are analyzed together since they are functionally identical.
Program Structure
The program is organized into clearly delineated sections by line number ranges:
| Line Range | Section |
|---|---|
| 1–20 | Initialization: level label, error handling, display attributes |
| 500–600 | Variable setup: named constants, word count, score strings |
| 750–890 | Main menu with animated highlight loop |
| 1000–1696 | Test engine (question presentation, answer checking, scoring) |
| 1700–1780 | End-of-test summary and score storage |
| 2000–2220 | Score display |
| 3000–3930 | List misspelled words (screen and optional printer) |
| 4000–4170 | Practice mode for missed words |
| 6000–6660 | Quit handler and answer normalization subroutine |
| 7500–7740 | DATA: 25 word sets (five words + correct spelling + answer index) |
| 9000–9199 | Border-drawing subroutine |
| 9900–9930 | Error recovery using ON ERR |
Named Constants as Variables
Rather than using magic numbers throughout, the program defines a set of small integer constants at line 510:
bs=0,bt=1,bu=2,bv=3,bw=4,bx=5
These are used pervasively as row/column offsets and loop increments, making the code more readable and allowing layout adjustments by changing a single assignment. The subroutine address for the border routine is similarly stored in bord=9000 and called as GO SUB bord.
Score Persistence via String Encoding
Score history is stored without arrays by appending two-digit decimal encodings to strings i$ and j$ (initialized to "00" as a sentinel). Lines 1740–1750 encode each test’s wrong and right counts as pairs of digit characters. Line 2080 retrieves them with index arithmetic: VAL j$(r*2+1)*10 + VAL j$(r*2+2). This allows up to 10 test sessions to be recorded in a simple string without any array allocation.
Misspelling Tracker String
The 25-character string x$ (line 595) tracks which words have been encountered and how the player answered. Each character position corresponds to one word set: "0" means unattempted or corrected, "1" through "5" stores the (wrong) answer given, and "6" is used when the user failed the spelling input in difficult mode. The practice mode (section 4000) iterates over this string and skips positions where VAL x$(r)=0.
Dynamic Variable Name Construction
Line 1330 uses a notable idiom to convert a digit choice into the corresponding string variable name:
LET m$=VAL$ (CHR$ (96+VAL q$)+CHR$ 36)
Adding 96 to a digit 1–5 gives ASCII codes 97–101 (letters a–e), and appending CHR$ 36 (the $ character) forms a variable name like "a$" or "b$". VAL$ then evaluates this as an expression, returning the contents of the named string variable. This is an elegant way to index into a set of string variables without a formal array.
Animated Menu Highlight
Lines 860–890 implement a cycling animated highlight on the menu options. The variable r1 alternates between 1 and 0 to reverse the direction of iteration (lines 860 and 870 use FOR e=2 TO 5 and FOR e=4 TO 1 STEP -1 respectively). Each pass prints the current option in inverse and the previous in normal video, creating a scrolling highlight effect. A PAUSE 10 at line 875 controls animation speed. Pressing a digit key 1–5 breaks out at line 880.
Menu Dispatch
Line 960 uses the idiom GO TO VAL q$*1000 to dispatch to sections 1000, 2000, 3000, 4000, or 5000 based on the menu choice digit. Menu option 5 (“Quit”) targets line 5000, which does not exist — this causes execution to fall to the next available line (6000), which performs CLS, ON ERR RESET, and STOP. This is an intentional technique, not an error.
Answer Normalization Subroutine
The subroutine at line 6520 (called via GO SUB 6500 — targeting 6520 as the first existing line) normalizes user-typed spelling answers: it forces the first character to uppercase (lines 6600–6610) and all subsequent characters to lowercase (lines 6560–6570), skipping spaces. This ensures case-insensitive but properly capitalized comparison against the stored correct spelling in n$. Note the subroutine is called as GO SUB 6500 even though line 6500 does not exist; execution begins at 6520.
Border Drawing Subroutine
Lines 9000–9199 clear the screen, set display attributes, and draw three nested rectangles using PLOT/DRAW (loop at lines 9020–9050) plus horizontal rule lines. A copyright notice is printed at line 9060. The subroutine is universally called before any screen output section.
Data Format
Each of the 25 DATA records (lines 7500–7740) follows this format:
- Five candidate words (one misspelled, four correct)
- The correct spelling of the misspelled word
- An integer (1–5) indicating which of the five words is the misspelled one
The answer index A (read at line 1250) is compared directly against the player’s numeric choice q at line 1350.
Practice Mode Integration
Practice mode (line 4000) sets gbg=4 (a flag variable) and jumps directly into the test engine at line 1290, bypassing random selection and using the word index from the x$ tracker. The flag gbg is checked at lines 1485, 1675, and 1696 to redirect flow back to the menu rather than the end-of-test summary, and at line 1680 to skip resetting the x$ entry on a correct answer (so correct practice answers are handled specially).
Error Handling
ON ERR at line 2 redirects any runtime error to the recovery loop at 9900, which resets the error state with ON ERR RESET, pauses, re-arms the trap, then uses ON ERR CONTINUE to attempt to resume execution. This provides a safety net against unexpected errors during normal use.
Notable Bugs and Anomalies
- Line 1560 calls
GO SUB 6500but line 6500 does not exist; execution falls through to 6520. This works correctly but is technically imprecise. - The
NEXT rat line 3115 andGO TO 3720on the same line create an unusual in-line conditional skip: ifx$(r)="0", the loop advances and then jumps to the end-of-list label. TheGO TO 3720only executes if the loop has exhausted its range, because a successfulNEXT rcontinues looping. This is a subtle but correct use of the post-NEXTfall-through. - Line 4005 in the Level 1 listing has a space in
LET gbg= 4that is absent in Level 2 (LET gbg=4); both are functionally identical. - The score history strings
i$andj$grow unboundedly with each test; after many sessions the string indexing in line 2080 could produce unexpected results, though the display is capped at 10 tests by the loop bounds (lines 2030–2040).
Content
Source Code
1 LET z$=" LEVEL 1"
2 ON ERR GO TO 9900
5 INVERSE 0: FLASH 0
10 REM Spelling Bee
20 RANDOMIZE
500 REM initialize
510 LET bs=0: LET bt=1: LET bu=2: LET bv=3: LET bw=4: LET bx=5
540 PAPER 6: INK 0: BORDER 5
550 REM w is # of WORD sets
560 LET w=25
570 LET c=bs
580 LET bord=9000
595 LET x$="": FOR e=1 TO w: LET x$=x$+"0": NEXT e
600 LET i$="00": LET j$="00"
750 REM menu
760 GO SUB bord
790 PRINT INVERSE 1;AT bt,bt;" MAIN MENU ";z$
800 PRINT AT bv,bu;"Your options are:"
810 PRINT AT bx,bu;"{1} Take a Test";AT 6,bu;"{2} Check Scores"
820 PRINT AT 7,bu;"{3} List misspelled words";AT 8,bu;"{4} Practice misspelled words"
830 PRINT AT 9,bu;"{5} Quit the Program"
840 LET ee=4: LET r1=1
850 PRINT AT 12,7; INVERSE 1;" ";AT 13,7;" YOUR ";AT 14,7;" DECISION ";AT 15,7;" PLEASE ";AT 16,7;" "
860 IF r1 THEN FOR e=2 TO 5: PRINT AT ee+e-1,bv; INVERSE 0;e-1;AT ee+e,bv; INVERSE 1;e
870 IF NOT r1 THEN FOR e=4 TO 1 STEP -1: PRINT AT ee+e+1,bv; INVERSE 0;e+1;AT ee+e,bv; INVERSE 1;e
875 PAUSE 10
880 LET q$=INKEY$: IF q$>"0" AND q$<"6" THEN GO TO 900
885 IF q$<>"" THEN BEEP .1,35
890 NEXT e: LET r1=ABS (1-r1): GO TO 860
900 PAPER 6: INK 0: INVERSE 0
960 GO TO VAL q$*1000
1000 REM THE TEST
1005 LET gbg=1
1010 LET j=0: LET i=0
1020 LET c=c+bt
1030 GO SUB bord
1050 PRINT INK 1;AT bu,bu;"Press ""0"" if you want the";AT bv,bu;"EASY version.";AT bx,bu;"Press ""1"" if you want the";AT 6,bu;"DIFFICULT version."
1060 LET l$=INKEY$: IF l$<>"1" AND l$<>"0" THEN GO TO 1060
1070 LET l=VAL l$
1080 PLOT 16,115: DRAW 213,0
1090 PRINT AT 9,bu; INVERSE 1;(" The Easy Test " AND l=0)+(" The Difficult Test " AND l=1); INVERSE 0;AT 10,bu;"10 similar problems.";AT 11,bu;"One of the five words given";AT 12,bu;"is spelled incorrectly.";AT 13,bu;"Find it"+(" and spell it" AND l=1)+"."
1100 PLOT 16,55: DRAW 213,0
1105 LET r=bs
1110 PRINT AT 16,bv; INK 1;"Press any key to begin....": BEEP .05,r*5: LET r=r+bt: IF r=bx THEN LET r=bs
1120 IF INKEY$="" THEN GO TO 1110
1130 DIM a$(12): DIM b$(12): DIM c$(12): DIM d$(12): DIM e$(12): DIM n$(12): DIM r$(w)
1140 LET ws=10
1200 FOR r=bt TO ws
1210 GO SUB bord
1220 LET p=INT (RND*w)
1230 IF r$(p+bt)="1" THEN GO TO 1220
1240 RESTORE 7500+p*10
1250 READ a$,b$,c$,d$,e$,n$,A
1260 LET r$(p+bt)="1"
1270 PRINT AT bu,bu;"PROBLEM ";r
1280 PLOT 16,149: DRAW 72+(8 AND r=10),0
1290 PRINT AT bw,bw;"Which of these words is";AT bx,bw;"spelled incorrectly?"
1300 PRINT PAPER 7; INK 0;AT 8,bw;"1..";a$;AT 10,bw;"2..";b$;AT 12,bw;"3..";c$;AT 14,bw;"4..";d$;AT 16,bw;"5..";e$;AT 18,bx; FLASH 1;" "
1310 LET q$=INKEY$
1320 IF q$>"5" OR q$<"1" OR q$="" THEN GO TO 1310
1330 LET m$=VAL$ (CHR$ (96+VAL q$)+CHR$ 36)
1340 LET q=VAL q$
1350 IF q=a THEN GO TO 1500: REM wrong
1360 GO SUB bord
1365 BEEP .3,-15
1370 LET w$=" WRONG "
1380 PRINT INVERSE 1;AT bt,bv;w$;AT 18,bv;w$;AT 18,22;w$;AT bt,22;w$
1390 PRINT AT bv,bu;m$;AT bw,bu;"was spelled correctly."
1400 PRINT AT 6,bu;"The word that was misspelled";AT 7,bu;"was the word ";n$
1405 PRINT AT 9,6;"Word set ";r: PLOT 37,106: DRAW 110,0: DRAW 0,-62: DRAW -110,0: DRAW 0,62
1410 PRINT INK 1; PAPER 7;AT 11,bx;" ";a$;AT 12,bx;" ";b$;AT 13,bx;" ";c$;AT 14,bx;" ";d$;AT 15,bx;" ";e$
1420 LET i=i+bt
1430 LET x$(p+bt)=STR$ q
1440 FLASH 1: CIRCLE 197,75,33: PRINT AT 12,21;w$
1450 PRINT AT 20,bt;" Press any key to continue. "
1460 FLASH 0
1470 PAUSE 0
1480 NEXT r
1485 IF gbg=4 THEN GO TO 750
1490 GO TO 1700
1500 GO SUB bord
1510 LET w$=" RIGHT "
1520 IF l=bs THEN GO TO 1600
1530 PRINT AT bu,bu;"What is the proper spelling";AT bv,bu;"of the word ";m$;"?"
1540 PRINT AT bx,bu;"(Type the answer,";AT 6,bv;"and then press enter)"
1550 DIM o$(12)
1555 INPUT "ANSWER: ";o$
1560 GO SUB 6500
1565 PRINT AT bu,bu;" ";AT bv,bu;" ";AT bx,bu;" ";AT 6,bv;" "
1570 IF o$=n$ THEN GO TO 1600
1575 LET w$=" WRONG "
1580 LET q=6
1585 PRINT AT bv,bv;o$;AT bw,bv;"is not correct.";AT 6,bv;"The proper spelling is:";AT 7,bx;n$
1590 GO TO 1420
1600 PRINT INVERSE 1;AT bt,bv;w$;AT 18,bv;w$;AT 18,22;w$;AT bt,22;w$
1605 BEEP .2,24
1610 PRINT AT bv,bu;"Correct, the proper spelling";AT bw,bu;"is ";n$
1620 LET j=j+bt
1625 IF x$(p+bt)="1" THEN PRINT AT 6,bu;"Much better, you missed";AT 7,bu;"this one last time."
1630 PRINT AT 9,6;"Word set ";r: PLOT 37,106: DRAW 110,0: DRAW 0,-62: DRAW -110,0: DRAW 0,62
1640 PRINT INK 1; PAPER 7;AT 11,bx;" ";a$;AT 12,bx;" ";b$;AT 13,bx;" ";c$;AT 14,bx;" ";d$;AT 15,bx;" ";e$
1650 FLASH 1: CIRCLE 197,75,33: PRINT AT 12,21;w$
1660 PRINT AT 20,bt;" Press any key to continue. "
1670 FLASH 0
1675 IF gbg=4 THEN GO TO 1690
1680 LET x$(p+bt)="0"
1690 PAUSE 0
1695 NEXT r
1696 IF gbg=4 THEN GO TO 750
1700 REM end of test
1710 GO SUB bord
1720 PRINT INVERSE 1;AT bu,bu;" THE TEST HAS ENDED "
1730 PRINT AT 7,bu;"You scored ";j;" correct";AT 9,bu;"and ";i;" incorrect."
1735 PRINT AT 11,bu;"A score of ";INT (100*j/(i+j));"%"
1740 LET i$=i$+STR$ (INT (i/10))+STR$ (i-(INT (i/10)*10))
1750 LET j$=j$+STR$ (INT (j/10))+STR$ (j-(INT (j/10)*10))
1760 PRINT FLASH 1;AT 20,bt;" Press any key to go to menu. "
1770 PAUSE 0
1780 GO TO 750
2000 REM scores
2010 GO SUB bord
2015 IF c=bs THEN PRINT AT bx,bv;"You have taken no tests.": GO TO 2200
2020 PRINT AT bt,bt;"This is a list of your 10 most";AT bu,bt;"recent test scores."
2030 LET u=bt
2040 IF c>10 THEN LET u=c-9
2050 PRINT AT bx,9;"# RIGHT";TAB 17;"# WRONG";TAB 25;"SCORE"
2070 FOR r=u TO c
2080 PRINT AT 8+r-u,bt;"Test ";r;TAB 11;(VAL j$(r*2+1)*10)+(VAL j$(r*2+2));TAB 19;(VAL i$(r*2+1)*10)+(VAL i$(r*2+2));TAB 26;INT (100*((VAL j$(r*2+1)*10)+(VAL j$(r*2+2)))/ws);"%"
2090 NEXT r
2100 PLOT 67,135: DRAW 0,-25-(8*(c-u+1)): PLOT 132,135: DRAW 0,-25-(8*(c-u+1)): PLOT 196,135: DRAW 0,-25-(8*(c-u+1))
2200 PRINT FLASH 1;AT 20,bt;" Press any key to go to menu. "
2210 PAUSE 0
2220 GO TO 750
2900 GO SUB bord: PRINT AT bx,bv;"You have taken no tests.": GO TO 2200
3000 REM list misspelled words
3010 IF VAL x$=0 THEN GO TO 2900
3020 LET b=bt
3030 GO SUB bord
3040 PRINT AT bu,bv;"Do you want to print";AT bv,bv;"these words on the printer?";AT bw,bv;"(Y/N)"
3050 IF INKEY$="y" OR INKEY$="Y" THEN LET l=1: GO TO 3100
3060 IF INKEY$="n" OR INKEY$="N" THEN LET l=0: GO TO 3100
3070 GO TO 3050
3100 GO SUB bord
3110 FOR r=bt TO w
3115 IF x$(r)="0" THEN NEXT r: GO TO 3720
3120 IF b>15 THEN GO SUB 3900
3125 LET b=b+bt
3140 RESTORE 7500+10*(r-1)
3150 READ a$,b$,c$,d$,e$,n$,A
3160 IF x$(r)="6" THEN GO TO 3600
3170 IF l=1 THEN GO TO 3400
3200 PRINT AT b,bt;VAL$ (CHR$ (96+VAL x$(r))+CHR$ 36),n$
3220 NEXT r
3225 PRINT AT 20,bt; FLASH 1;"No more, press a key for menu."
3230 PAUSE 0
3240 GO TO 750
3400 LPRINT VAL$ (CHR$ (96+VAL x$(r))+CHR$ 36),n$
3410 GO TO 3200
3600 IF l=0 THEN GO TO 3700
3610 LPRINT n$
3700 PRINT AT b,bt;n$
3710 NEXT r
3720 GO TO 3225
3900 PRINT AT 20,bt; FLASH 1;"There is more...press any key."
3910 LET b=bt
3915 PAUSE 0
3920 GO SUB bord
3930 RETURN
4000 REM practice
4005 LET gbg= 4
4010 IF VAL x$=0 THEN GO TO 2900
4020 LET j=0: LET i=0
4030 GO SUB bord
4040 PRINT INK 1;AT bu,bu;"Press ""0"" if you want the";AT bv,bu;"EASY version.";AT bx,bu;"Press ""1"" if you want the";AT 6,bu;"DIFFICULT version."
4050 LET l$=INKEY$: IF l$<>"1" AND l$<>"0" THEN GO TO 4050
4060 LET l=VAL l$
4070 PLOT 16,115: DRAW 213,0
4080 PRINT AT 9,bu;"The words you currently";AT 10,bu;"have wrong will now be";AT 11,bu;"reviewed, given as before."
4090 PLOT 16,55: DRAW 213,0
4095 LET d=bs
4100 PRINT AT 16,bv; INK 1;"Press any key to begin....": BEEP .05,d*5: LET d=d+bt: IF d=bx THEN LET d=bs
4110 IF INKEY$="" THEN GO TO 4100
4120 FOR r=bt TO w
4130 IF VAL x$(r)=0 THEN NEXT r: GO TO 750
4140 GO SUB bord
4150 RESTORE 7500+10*(r-1)
4160 READ a$,b$,c$,d$,e$,n$,A
4165 LET p=r-1
4170 GO TO 1290
6000 CLS : ON ERR RESET
6010 STOP
6020 GO TO 750
6520 FOR e=1 TO 12
6530 LET l=CODE o$(e)
6540 IF l=32 THEN NEXT e: GO TO 6660
6550 IF e=1 THEN GO TO 6600
6560 IF l>64 AND l<91 THEN LET l=l+32
6570 LET o$(e)=CHR$ l
6580 NEXT e: GO TO 6660
6600 IF l>96 AND l<123 THEN LET l=l-32
6610 LET o$(e)=CHR$ l
6650 NEXT e
6660 RETURN
7500 DATA "Spase","Time","Earth","Wind","Fire","Space",1
7510 DATA "Clock","Radio","Lamp","Chare","Table","Chair",4
7520 DATA "Plastic","Coton","Metal","Rust","Gold","Cotton",2
7530 DATA "Pencil","Erasor","Nails","Hammer","Screw","Eraser",2
7540 DATA "Bug","Beetle","Flys","Bees","Ants","Flies",3
7550 DATA "Hands","Mouths","Toes","Ears","Nees","Knees",5
7560 DATA "Tiger","Lion","Monky","Deer","Bird","Monkey",3
7570 DATA "Spice","Sugar","Meat","Vegtable","Bread","Vegetable",4
7580 DATA "Wolf","Hound","Fox","Goose","Poodel","Poodle",5
7590 DATA "Glases","Plates","Spoons","Pepper","Forks","Glasses",1
7600 DATA "Fast","Hury","Walk","Slow","Move","Hurry",2
7610 DATA "Ship","Boat","Oshin","Water","Port","Ocean",3
7620 DATA "Street","Games","Unsafe","Automobeel","Hurt","Automobile",4
7630 DATA "Horse","Cow","Goat","Sheep","Donky","Donkey",5
7640 DATA "School","Classroom","Learning","Sharing","Freinds","Friends",5
7650 DATA "Baseball","Soccer","Balet","Jumprope","Balloons","Ballet",3
7660 DATA "Wiked","Nice","Mean","Good","Love","Wicked",1
7670 DATA "Febuary","August","November","April","May","February",1
7680 DATA "Friday","Wensday","Sunday","Monday","Saturday","Wednesday",2
7690 DATA "Apple","Orange","Peach","Plumb","Pear","Plum",4
7700 DATA "Phone","Home","Planet","Galaxie","Star","Galaxy",4
7710 DATA "Doctor","Fireman","Policeman","Farmer","Astronot","Astronaut",5
7720 DATA "Sience","Math","English","History","Art","Science",1
7730 DATA "Rest","Tierd","Sleep","Yawn","Bed","Tired",2
7740 DATA "Computer","Future","Numbrs","Speed","Alive","Numbers",3
8999 STOP
9000 CLS
9010 BORDER 5: PAPER 6: INK 0
9020 FOR a=0 TO 6 STEP 2
9030 PLOT 0+a,0+a: DRAW 255-2*a,0: DRAW 0,175-2*a: DRAW -255+2*a,0: DRAW 0,-175+2*a
9040 PLOT 7,16+a: DRAW 255-14,0
9050 NEXT a
9060 PRINT AT 20,3;"THE SPELLING BEE - * 1982 "
9199 RETURN
9300 RESTORE 7500
9310 FOR a=1 TO 25
9315 PRINT "::::::";a;"::::::"
9320 FOR r=1 TO 6
9330 READ f$: PRINT f$
9340 NEXT r
9350 READ f: PRINT f
9360 IF INKEY$="" THEN GO TO 9360
9365 CLS
9370 NEXT a
9900 ON ERR RESET
9910 PAUSE 100
9920 ON ERR GO TO 9900
9930 ON ERR CONTINUE
1 LET z$=" LEVEL 2"
2 ON ERR GO TO 9900
5 INVERSE 0: FLASH 0
10 REM Spelling Bee
20 RANDOMIZE
500 REM initialize
510 LET bs=0: LET bt=1: LET bu=2: LET bv=3: LET bw=4: LET bx=5
540 PAPER 6: INK 0: BORDER 5
550 REM w is # of WORD sets
560 LET w=25
570 LET c=bs
580 LET bord=9000
595 LET x$="": FOR e=1 TO w: LET x$=x$+"0": NEXT e
600 LET i$="00": LET j$="00"
750 REM menu
760 GO SUB bord
790 PRINT INVERSE 1;AT bt,bt;" MAIN MENU ";z$
800 PRINT AT bv,bu;"Your options are:"
810 PRINT AT bx,bu;"{1} Take a Test";AT 6,bu;"{2} Check Scores"
820 PRINT AT 7,bu;"{3} List misspelled words";AT 8,bu;"{4} Practice misspelled words"
830 PRINT AT 9,bu;"{5} Quit the Program"
840 LET ee=4: LET r1=1
850 PRINT AT 12,7; INVERSE 1;" ";AT 13,7;" YOUR ";AT 14,7;" DECISION ";AT 15,7;" PLEASE ";AT 16,7;" "
860 IF r1 THEN FOR e=2 TO 5: PRINT AT ee+e-1,bv; INVERSE 0;e-1;AT ee+e,bv; INVERSE 1;e
870 IF NOT r1 THEN FOR e=4 TO 1 STEP -1: PRINT AT ee+e+1,bv; INVERSE 0;e+1;AT ee+e,bv; INVERSE 1;e
875 PAUSE 10
880 LET q$=INKEY$: IF q$>"0" AND q$<"6" THEN GO TO 900
885 IF q$<>"" THEN BEEP .1,35
890 NEXT e: LET r1=ABS (1-r1): GO TO 860
900 PAPER 6: INK 0: INVERSE 0
960 GO TO VAL q$*1000
1000 REM THE TEST
1005 LET gbg=1
1010 LET j=0: LET i=0
1020 LET c=c+bt
1030 GO SUB bord
1050 PRINT INK 1;AT bu,bu;"Press ""0"" if you want the";AT bv,bu;"EASY version.";AT bx,bu;"Press ""1"" if you want the";AT 6,bu;"DIFFICULT version."
1060 LET l$=INKEY$: IF l$<>"1" AND l$<>"0" THEN GO TO 1060
1070 LET l=VAL l$
1080 PLOT 16,115: DRAW 213,0
1090 PRINT AT 9,bu; INVERSE 1;(" The Easy Test " AND l=0)+(" The Difficult Test " AND l=1); INVERSE 0;AT 10,bu;"10 similar problems.";AT 11,bu;"One of the five words given";AT 12,bu;"is spelled incorrectly.";AT 13,bu;"Find it"+(" and spell it" AND l=1)+"."
1100 PLOT 16,55: DRAW 213,0
1105 LET r=bs
1110 PRINT AT 16,bv; INK 1;"Press any key to begin....": BEEP .05,r*5: LET r=r+bt: IF r=bx THEN LET r=bs
1120 IF INKEY$="" THEN GO TO 1110
1130 DIM a$(12): DIM b$(12): DIM c$(12): DIM d$(12): DIM e$(12): DIM n$(12): DIM r$(w)
1140 LET ws=10
1200 FOR r=bt TO ws
1210 GO SUB bord
1220 LET p=INT (RND*w)
1230 IF r$(p+bt)="1" THEN GO TO 1220
1240 RESTORE 7500+p*10
1250 READ a$,b$,c$,d$,e$,n$,A
1260 LET r$(p+bt)="1"
1270 PRINT AT bu,bu;"PROBLEM ";r
1280 PLOT 16,149: DRAW 72+(8 AND r=10),0
1290 PRINT AT bw,bw;"Which of these words is";AT bx,bw;"spelled incorrectly?"
1300 PRINT PAPER 7; INK 0;AT 8,bw;"1..";a$;AT 10,bw;"2..";b$;AT 12,bw;"3..";c$;AT 14,bw;"4..";d$;AT 16,bw;"5..";e$;AT 18,bx; FLASH 1;" "
1310 LET q$=INKEY$
1320 IF q$>"5" OR q$<"1" OR q$="" THEN GO TO 1310
1330 LET m$=VAL$ (CHR$ (96+VAL q$)+CHR$ 36)
1340 LET q=VAL q$
1350 IF q=a THEN GO TO 1500: REM wrong
1360 GO SUB bord
1365 BEEP .3,-15
1370 LET w$=" WRONG "
1380 PRINT INVERSE 1;AT bt,bv;w$;AT 18,bv;w$;AT 18,22;w$;AT bt,22;w$
1390 PRINT AT bv,bu;m$;AT bw,bu;"was spelled correctly."
1400 PRINT AT 6,bu;"The word that was misspelled";AT 7,bu;"was the word ";n$
1405 PRINT AT 9,6;"Word set ";r: PLOT 37,106: DRAW 110,0: DRAW 0,-62: DRAW -110,0: DRAW 0,62
1410 PRINT INK 1; PAPER 7;AT 11,bx;" ";a$;AT 12,bx;" ";b$;AT 13,bx;" ";c$;AT 14,bx;" ";d$;AT 15,bx;" ";e$
1420 LET i=i+bt
1430 LET x$(p+bt)=STR$ q
1440 FLASH 1: CIRCLE 197,75,33: PRINT AT 12,21;w$
1450 PRINT AT 20,bt;" Press any key to continue. "
1460 FLASH 0
1470 PAUSE 0
1480 NEXT r
1485 IF gbg=4 THEN GO TO 750
1490 GO TO 1700
1500 GO SUB bord
1510 LET w$=" RIGHT "
1520 IF l=bs THEN GO TO 1600
1530 PRINT AT bu,bu;"What is the proper spelling";AT bv,bu;"of the word ";m$;"?"
1540 PRINT AT bx,bu;"(Type the answer,";AT 6,bv;"and then press enter)"
1550 DIM o$(12)
1555 INPUT "ANSWER: ";o$
1560 GO SUB 6500
1565 PRINT AT bu,bu;" ";AT bv,bu;" ";AT bx,bu;" ";AT 6,bv;" "
1570 IF o$=n$ THEN GO TO 1600
1575 LET w$=" WRONG "
1580 LET q=6
1585 PRINT AT bv,bv;o$;AT bw,bv;"is not correct.";AT 6,bv;"The proper spelling is:";AT 7,bx;n$
1590 GO TO 1420
1600 PRINT INVERSE 1;AT bt,bv;w$;AT 18,bv;w$;AT 18,22;w$;AT bt,22;w$
1605 BEEP .2,24
1610 PRINT AT bv,bu;"Correct, the proper spelling";AT bw,bu;"is ";n$
1620 LET j=j+bt
1625 IF x$(p+bt)="1" THEN PRINT AT 6,bu;"Much better, you missed";AT 7,bu;"this one last time."
1630 PRINT AT 9,6;"Word set ";r: PLOT 37,106: DRAW 110,0: DRAW 0,-62: DRAW -110,0: DRAW 0,62
1640 PRINT INK 1; PAPER 7;AT 11,bx;" ";a$;AT 12,bx;" ";b$;AT 13,bx;" ";c$;AT 14,bx;" ";d$;AT 15,bx;" ";e$
1650 FLASH 1: CIRCLE 197,75,33: PRINT AT 12,21;w$
1660 PRINT AT 20,bt;" Press any key to continue. "
1670 FLASH 0
1675 IF gbg=4 THEN GO TO 1690
1680 LET x$(p+bt)="0"
1690 PAUSE 0
1695 NEXT r
1696 IF gbg=4 THEN GO TO 750
1700 REM end of test
1710 GO SUB bord
1720 PRINT INVERSE 1;AT bu,bu;" THE TEST HAS ENDED "
1730 PRINT AT 7,bu;"You scored ";j;" correct";AT 9,bu;"and ";i;" incorrect."
1735 PRINT AT 11,bu;"A score of ";INT (100*j/(i+j));"%"
1740 LET i$=i$+STR$ (INT (i/10))+STR$ (i-(INT (i/10)*10))
1750 LET j$=j$+STR$ (INT (j/10))+STR$ (j-(INT (j/10)*10))
1760 PRINT FLASH 1;AT 20,bt;" Press any key to go to menu. "
1770 PAUSE 0
1780 GO TO 750
2000 REM scores
2010 GO SUB bord
2015 IF c=bs THEN PRINT AT bx,bv;"You have taken no tests.": GO TO 2200
2020 PRINT AT bt,bt;"This is a list of your 10 most";AT bu,bt;"recent test scores."
2030 LET u=bt
2040 IF c>10 THEN LET u=c-9
2050 PRINT AT bx,9;"# RIGHT";TAB 17;"# WRONG";TAB 25;"SCORE"
2070 FOR r=u TO c
2080 PRINT AT 8+r-u,bt;"Test ";r;TAB 11;(VAL j$(r*2+1)*10)+(VAL j$(r*2+2));TAB 19;(VAL i$(r*2+1)*10)+(VAL i$(r*2+2));TAB 26;INT (100*((VAL j$(r*2+1)*10)+(VAL j$(r*2+2)))/ws);"%"
2090 NEXT r
2100 PLOT 67,135: DRAW 0,-25-(8*(c-u+1)): PLOT 132,135: DRAW 0,-25-(8*(c-u+1)): PLOT 196,135: DRAW 0,-25-(8*(c-u+1))
2200 PRINT FLASH 1;AT 20,bt;" Press any key to go to menu. "
2210 PAUSE 0
2220 GO TO 750
2900 GO SUB bord: PRINT AT bx,bv;"You have taken no tests.": GO TO 2200
3000 REM list misspelled words
3010 IF VAL x$=0 THEN GO TO 2900
3020 LET b=bt
3030 GO SUB bord
3040 PRINT AT bu,bv;"Do you want to print";AT bv,bv;"these words on the printer?";AT bw,bv;"(Y/N)"
3050 IF INKEY$="y" OR INKEY$="Y" THEN LET l=1: GO TO 3100
3060 IF INKEY$="n" OR INKEY$="N" THEN LET l=0: GO TO 3100
3070 GO TO 3050
3100 GO SUB bord
3110 FOR r=bt TO w
3115 IF x$(r)="0" THEN NEXT r: GO TO 3720
3120 IF b>15 THEN GO SUB 3900
3125 LET b=b+bt
3140 RESTORE 7500+10*(r-1)
3150 READ a$,b$,c$,d$,e$,n$,A
3160 IF x$(r)="6" THEN GO TO 3600
3170 IF l=1 THEN GO TO 3400
3200 PRINT AT b,bt;VAL$ (CHR$ (96+VAL x$(r))+CHR$ 36),n$
3220 NEXT r
3225 PRINT AT 20,bt; FLASH 1;"No more, press a key for menu."
3230 PAUSE 0
3240 GO TO 750
3400 LPRINT VAL$ (CHR$ (96+VAL x$(r))+CHR$ 36),n$
3410 GO TO 3200
3600 IF l=0 THEN GO TO 3700
3610 LPRINT n$
3700 PRINT AT b,bt;n$
3710 NEXT r
3720 GO TO 3225
3900 PRINT AT 20,bt; FLASH 1;"There is more...press any key."
3910 LET b=bt
3915 PAUSE 0
3920 GO SUB bord
3930 RETURN
4000 REM practice
4005 LET gbg=4
4010 IF VAL x$=0 THEN GO TO 2900
4020 LET j=0: LET i=0
4030 GO SUB bord
4040 PRINT INK 1;AT bu,bu;"Press ""0"" if you want the";AT bv,bu;"EASY version.";AT bx,bu;"Press ""1"" if you want the";AT 6,bu;"DIFFICULT version."
4050 LET l$=INKEY$: IF l$<>"1" AND l$<>"0" THEN GO TO 4050
4060 LET l=VAL l$
4070 PLOT 16,115: DRAW 213,0
4080 PRINT AT 9,bu;"The words you currently";AT 10,bu;"have wrong will now be";AT 11,bu;"reviewed, given as before."
4090 PLOT 16,55: DRAW 213,0
4095 LET d=bs
4100 PRINT AT 16,bv; INK 1;"Press any key to begin....": BEEP .05,d*5: LET d=d+bt: IF d=bx THEN LET d=bs
4110 IF INKEY$="" THEN GO TO 4100
4120 FOR r=bt TO w
4130 IF VAL x$(r)=0 THEN NEXT r: GO TO 750
4140 GO SUB bord
4150 RESTORE 7500+10*(r-1)
4160 READ a$,b$,c$,d$,e$,n$,A
4165 LET p=r-1
4170 GO TO 1290
6000 CLS : ON ERR RESET
6010 STOP
6020 GO TO 750
6520 FOR e=1 TO 12
6530 LET l=CODE o$(e)
6540 IF l=32 THEN NEXT e: GO TO 6660
6550 IF e=1 THEN GO TO 6600
6560 IF l>64 AND l<91 THEN LET l=l+32
6570 LET o$(e)=CHR$ l
6580 NEXT e: GO TO 6660
6600 IF l>96 AND l<123 THEN LET l=l-32
6610 LET o$(e)=CHR$ l
6650 NEXT e
6660 RETURN
7500 DATA "Picher","Picture","Puncture","Fracture","Mature","Pitcher",1
7510 DATA "Special","Mission","Fishure","Pasture","Marshal","Fissure",3
7520 DATA "Hydrogen","Carbon","Alumminum","Calcium","Oxygen","Aluminum",3
7530 DATA "Friend","Fiend","Grieve","Neighbor","Recieve","Receive",5
7540 DATA "Pack","Plaque","Stick","Sparck","Shock","Spark",4
7550 DATA "Africa","Europe","India","China","Greese","Greece",5
7560 DATA "Turkey","Pinkey","Shaky","Curly","Happy","Pinkie",2
7570 DATA "Spider","Insect","Butterfly","Cockaroach","Termite","Cockroach",4
7580 DATA "Muscle","Stomack","Tongue","Liver","Shoulder","Stomach",2
7590 DATA "Pluto","Venus","Saturn","Jupitre","Earth","Jupiter",4
7600 DATA "Hundred","Thousand","Million","Seventy","Fourty","Forty",5
7610 DATA "Measure","Graph","Devide","Weigh","Estimate","Divide",3
7620 DATA "Viking","Crusade","Pilgramage","Conquest","Migration","Pilgrimage",3
7630 DATA "Roman","Egyption","German","Mexican","Japanese","Egyptian",2
7640 DATA "Goverment","Holiday","Sanctuary","Vacation","President","Government",1
7650 DATA "Master","Teacher","Student","Instructer","Tutor","Instructor",4
7660 DATA "Cousin","Relitive","Nephew","Grandmother","Sibling","Relative",2
7670 DATA "Willow","Sycamore","Sasafras","Maple","Elm","Sassafras",3
7680 DATA "Dolphin","Porpous","Purpose","Propose","Flounder","Porpoise",2
7690 DATA "Elephant","Giraffe","Hippopotamus","Polar bear","Rinoceros","Rhinoceros",5
7700 DATA "Busy","Building","Buisness","Fruitful","Fluid","Business",3
7710 DATA "Picturebook","Sandcastle","Night light","Fire alarm","Center field","Picture book",1
7720 DATA "Blue-collar","Blue cheese","Bobby pin","Blueberry","Bluejay","Blue jay",5
7730 DATA "Sixty-one","Wild rice","Go-cart","Pea shooter","Homesick","Peashooter",4
7740 DATA "Semicolon","Hyphin","Period","Punctuation","Paragraph","Hyphen",2
8999 STOP
9000 CLS
9010 BORDER 5: PAPER 6: INK 0
9020 FOR a=0 TO 6 STEP 2
9030 PLOT 0+a,0+a: DRAW 255-2*a,0: DRAW 0,175-2*a: DRAW -255+2*a,0: DRAW 0,-175+2*a
9040 PLOT 7,16+a: DRAW 255-14,0
9050 NEXT a
9060 PRINT AT 20,3;"THE SPELLING BEE - * 1982 "
9199 RETURN
9900 ON ERR RESET
9910 PAUSE 100
9920 ON ERR GO TO 9900
9930 ON ERR CONTINUE
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


