Spelling II

Products: Spelling II
Date: 1983
Type: Program
Platform(s): TS 2068
Tags: Education

Spelling II is a two-level (Level 3 and Level 4) spelling-quiz program that presents the user with sets of five words, one of which is intentionally misspelled, and asks them to identify the incorrect word. Each level contains 25 word sets stored as DATA statements beginning at line 7500, with each record holding five candidate words, the correct spelling of the misspelled word, and the answer index. The program tracks per-session scores using encoded digit strings (variables `i$` and `j$`), storing two decimal digits per test, and supports up to ten historical test scores displayed with percentage calculations. An “Easy” mode requires only identification of the misspelled word, while a “Difficult” mode additionally requires the user to type the correct spelling, with a subroutine at line 6520 normalizing input capitalization. A practice mode replays only the word sets the user previously answered incorrectly, and an optional LPRINT path allows misspelled words to be sent to a printer.


Program Analysis

Overall Structure

The listing contains two nearly identical programs — Level 3 and Level 4 — sharing the same line numbers and logic but differing only in their DATA statements (lines 7500–7740) and the level label stored in z$ at line 1. Both programs are self-contained and structured around a central menu dispatcher at line 750, with four functional modules branched to via GO TO VAL q$*1000 at line 960.

Line RangeModule
1–600Initialization (variables, screen attributes, score strings)
750–890Animated main menu with scrolling highlight
1000–1780Test engine (word presentation, answer handling, scoring)
2000–2220Score history display
3000–3930List misspelled words (screen and/or printer)
4000–4170Practice mode (re-tests previously wrong words)
6000–6020Quit handler
6520–6660Input normalization subroutine (capitalize first letter, lowercase rest)
7500–7740Word set DATA (25 sets × 7 fields each)
9000–9199Border-drawing subroutine
9900–9930ON ERR recovery chain

Variable Aliasing

A notable stylistic choice is the use of short numeric variables as named constants for frequently used small integers, eliminating magic numbers and slightly reducing tokenized code size:

  • bs=0, bt=1, bu=2, bv=3, bw=4, bx=5
  • bord=9000 — the line number of the border subroutine, used in GO SUB bord
  • ws=10 — number of test questions per session
  • w=25 — total number of word sets in the DATA

Menu Animation

The main menu (lines 860–890) implements a simple animated highlight that scrolls through menu options 1–5. Two alternating loops run depending on the boolean r1: one counts up (line 860), the other counts down (line 870). Each iteration prints the current option in INVERSE and the previous in normal video, with a short PAUSE 10 delay. Pressing a digit key 1–5 exits the loop immediately; any other non-empty keypress triggers a warning BEEP. When the loop exhausts, r1 is toggled with ABS(1-r1) and the animation reverses direction.

Test Engine and DATA Format

Each DATA record at lines 7500–7740 contains seven fields: five candidate words (a$e$), the correct spelling of the misspelled word (n$), and an integer A (1–5) indicating which candidate is wrong. Problems are selected randomly without replacement using a string array r$(w) acting as a “used” flag. The expression RESTORE 7500+p*10 (line 1240) exploits the regular 10-line spacing of DATA lines to seek directly to the correct record.

Variable Name Encoding Trick

Line 1330 uses a clever idiom to recover the variable name corresponding to the user’s choice: LET m$=VAL$(CHR$(96+VAL q$)+CHR$ 36). Adding the digit value of q$ to 96 gives the ASCII code for letters a–e, and appending CHR$ 36 ($) forms a string like "a$" or "b$", which VAL$ then evaluates to retrieve the word stored in that string variable. The same pattern is reused in the misspelled-word listing (lines 3200 and 3400).

Score Encoding

Rather than using arrays (which would be reset by DIM), cumulative scores across tests are encoded into two growing strings i$ and j$. Each test appends two decimal digits representing the count of wrong and right answers respectively (lines 1740–1750). To read back test r, the program evaluates digit pairs with expressions like (VAL j$(r*2+1)*10)+(VAL j$(r*2+2)) (line 2080). This approach persists scores through the session without requiring a dedicated array.

Per-Word Tracking with x$

The string x$ (25 characters, one per word set) tracks each word’s status: "0" means not yet wrong, a digit 1–5 records which wrong answer was chosen, and "6" is stored when the user correctly identified the word but provided the wrong spelling in Difficult mode. The practice mode at line 4000 iterates over x$ and replays only non-zero entries. Correctly answered words during practice are reset to "0" (line 1680), but this reset is suppressed (gbg=4 check at line 1675) while in practice mode itself to avoid infinite loops.

Capitalization Normalization

The subroutine starting at line 6520 (called via GO SUB 6500 — a non-existent line that falls through to 6520) normalizes user-typed answers: the first non-space character is forced to uppercase (codes 97–122 mapped to 65–90), and all subsequent letters are forced to lowercase (codes 65–90 mapped to 97–122). This allows comparison with n$, which is stored in title case in the DATA.

Border Drawing Subroutine

The subroutine at line 9000 draws a decorative border by plotting three concentric rectangles (loop variable a from 0 to 6 step 2) using PLOT/DRAW, plus a horizontal rule near the bottom. It also prints a copyright notice at line 20. In Level 3, the subroutine includes an ON ERR GO TO 9900 guard inside the loop (line 9030); this guard is absent in the Level 4 version, a minor discrepancy between the two programs.

Error Handling

The program uses a chained ON ERR strategy. The main guard at line 2 routes errors to 9900, which resets the error handler, pauses briefly, re-arms itself (line 9920), and then issues ON ERR CONTINUE (line 9930) to attempt resumption. This provides a crude but functional recovery from transient errors such as the CIRCLE command occasionally going out of bounds.

Bugs and Anomalies

  • Line 6500 does not exist; GO SUB 6500 falls through to line 6520. This is intentional — a well-known BASIC technique.
  • Line 1000 is absent in both programs; the test begins at 1005. The menu dispatcher GO TO VAL q$*1000 targeting line 1000 falls through to 1005, which is harmless.
  • The DRAW 72+(8 AND r=10) at line 1280 widens the underline for problem 10 (two-digit number) — a deliberate layout correction.
  • In Level 3’s DATA, word set 10 (line 7600) spells “Bycicle” for bicycle, while the entry for “Bicycle” is at line 7600 — the misspelling is intentional as the target wrong word.
  • The score display loop at line 2070 may print off-screen if more than about 12 tests have been taken, as row 8+r-u can exceed 20.
  • The GO TO 3720 at line 3115 inside a FOR/NEXT loop (triggered by NEXT r on the same line) is an unusual flow construct; control reaches 3720 only after the loop is exhausted via the inline NEXT r.

Content

Appears On

Related Products

Spelling bee for advanced students helps to improve skills or practice for tests. Quiz scores indicate whether more practice is...

Related Articles

Related Content

Image Gallery

Spelling II

Source Code

    1 LET z$=" LEVEL 3"
    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 \i\s # \o\f WORD \s\e\t\s 
  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 "Rhythm","Rhyme","Wrong","Copywrite","Written","Copyright",4
 7510 DATA "Kept","Greeted","Slept","Beeped","Lept","Leaped",5
 7520 DATA "Innate","Inmate","Immoral","Unimaginable","Inovation","Innovation",5
 7530 DATA "Romanesque","Rennaissance","Medieval","Grecian","Baroque","Renaissance",2
 7540 DATA "Sociology","Psychology","Anthrapology","Archaeology","Zoology","Anthropology",3
 7550 DATA "Presinct","President","Presents","Presence","Peasants","Precinct",1
 7560 DATA "Promiscuous","Predecessor","Posession","Progress","Precarious","Possession",3
 7570 DATA "Antique","Heirloom","Archaeism","Ancient","Ancestral","Archaism",3
 7580 DATA "Allow","Follow","Controll","Journal","Kernel","Control",3
 7590 DATA "Disection","Diverse","Divide","Respectable","Misled","Dissection",1
 7600 DATA "Dynasty","Sympathy","Thyroid","Bycicle","Lyrical","Bicycle",4
 7610 DATA "Appitite","Applejuice","Appointment","Apostrophe","Trophy","Appetite",1
 7620 DATA "Delusion","Alusion","Illusion","Illustration","Illumination","Allusion",2
 7630 DATA "Fantastic","Fanatic","Adolescent","Managing","Panarama","Panorama",5
 7640 DATA "Spiritual","Iritate","Certain","Curtain","Gorilla","Irritate",2
 7650 DATA "Majority","Goggles","Staggering","Catagory","Magnify","Category",4
 7660 DATA "Atlantic","Pacific","Artic","Indian","Caspian","Arctic",3
 7670 DATA "Foretell","Thoughtful","Mouthfull","Thankfully","Thankful","Mouthful",3
 7680 DATA "Parrallel","Dinnertime","Professor","Dessertspoon","Immigrant","Parallel",1
 7690 DATA "Conscience","Concious","Patience","Anxious","Cautious","Conscious",2
 7700 DATA "Confection","Direction","Expand","Conection","Perfection","Connection",4
 7710 DATA "Intelligible","Exhaustible","Perishable","Laughable","Compatable","Compatible",5
 7720 DATA "Pepperment","Merriment","Compliment","Complement","Instrument","Peppermint",1
 7730 DATA "Lovely","Shyly","Suddenly","Beautifuly","Valley","Beautifully",4
 7740 DATA "Letting","Comming","Swimming","Crossing","Slipping","Coming",2
 8999 STOP 
 9000 CLS 
 9005 ON ERR GO TO 9900
 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: ON ERR GO TO 9900
 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 

    1 LET z$="Level 4 "
    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 \i\s # \o\f WORD \s\e\t\s 
  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
 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 "Dependence","Occurrance","Intelligence","Reference","Appearance","Occurrence",2
 7510 DATA "Sacrafice","Comparative","Infinite","Irresistible","Perishable","Sacrifice",1
 7520 DATA "Noticeable","Lovable","Conceiveable","Imaginable","Changeable","Conceivable",3
 7530 DATA "Fiery","Weird","Their","Seige","Seize","Siege",4
 7540 DATA "Believe","Conceit","Ceiling","Neighbor","Recieve","Receive",5
 7550 DATA "Preferred","Referee","Referral","Embarass","Corollary","Embarrass",4
 7560 DATA "Recurring","Refer","Harass","Haried","Corruption","Harried",4
 7570 DATA "Slumberous","Disasterous","Humorous","Ridiculous","Mischievous","Disastrous",2
 7580 DATA "Supervisor","Perjurer","Attestor","Trespasser","Ambassador","Attester",3
 7590 DATA "Ancestor","Emperer","Mentor","Scepter","Sculptor","Emperor",2
 7600 DATA "Anchor","Depositer","Decorator","Adjuster","Advertiser","Depositor",2
 7610 DATA "Pollute","Skillful","Melon","Fueling","Unequalled","Unequaled",5
 7620 DATA "Calibar","Beggar","Caterpillar","Bursar","Infer","Caliber",1
 7630 DATA "Village","Vile","Vinyl","Villin","Vanilla","Villain",4
 7640 DATA "Dispatch","Device","Discrete","Desire","Discription","Description",5
 7650 DATA "Sesame","Shakey","Curly","Leprous","Courtesy","Shaky",2
 7660 DATA "Pretentious","Luscious","Portentious","Precocious","Spacious","Portentous",3
 7670 DATA "Quotient","Dificient","Patient","Proficient","Omniscient","Deficient",2
 7680 DATA "Organize","Mobilize","Finalize","Comprize","Moralize","Comprise",4
 7690 DATA "Downtown","Drumbeat","Life Belt","Second-hand","Motorboat","Secondhand",4
 7700 DATA "Bookkeeper","Stockade","Jackknife","Knockneed","Lockkeeper","Knockkneed",4
 7710 DATA "Excerpt","Execute","Exclude","Excercise","Excellent","Exercise",4
 7720 DATA "Fascinate","Necessary","Successor","Obsession","Passifist","Pacifist",5
 7730 DATA "Colision","Region","Religion","Fashion","Occasion","Collision",1
 7740 DATA "Contagious","Outrageous","Gorgeous","Prodigious","Prestigeous","Prestigious",5
 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.

People

No people associated with this content.

Scroll to Top