Classic Computer Magazine Archive ANTIC VOL. 7, NO. 6 / OCTOBER 1988

EDUCATION

Type-In Software

Quizzer

Learn Russian chemistry vocabulary--or anything else

By ANDREW THOMAS

Quizzer is a flexible, easily adapted memorization aid that can help you learn any subject where it's useful to practice with matching pairs. The sample quiz with this article is a chemistry vocabulary drill in Russian/English that uses an included cyrillic character font. This BASIC program works on all 8-bit Atari computers having at least 48K memory and a disk drive.

I had an advantage over the other students in my college Russian classes. I had the help of a computer. I reviewed vocabulary with a program I'd written. Especially before class quizzes, I practiced quizzing myself.

Learning a new vocabulary is not the only aspect of learning a language, but it is certainly the major one. The average number of words Americans use in speaking or writing is 10,000. The average number of words recognized by Americans is 30,000 to 40,000. This is not learned by reading the dictionary once.

The key to moving new words from short-term memory to long-term memory is rehearsal. The more you encounter or use a word, the more likely you are to remember it. Beginning language students rehearse by quizzing themselves while covering one side of a page that shows a foreign word on one side and the English translation on the other.

One problem with this method is that the translation can be triggered more by a word's placement within the list rather than by the actual sight of it. Another problem is that this method does not rehearse spelling, unless the student writes the translation and this wastes time verifying the spelling.

A computer program, however, can present words randomly and check spelling for the student. So I wrote software to do it.

But that was five years ago in Fortran on a graphics terminal of a mainframe. With the warming relationship between the superpowers, my interest in the Russian language returned and I wanted a similar program for my Atari. Quizzer is the result.

Naturally, I don't expect everyone to share my interest in Russian. The program has been designed so it can be easily modified for other languages. In addition, it can be modified to cover just about any other subject where it is useful to memorize matching pairs. Some examples would be chemical symbols and names, states and capitals, book titles and authors, values and formulas, or case citations and established precedents.

GETTING STARTED

You need three disk files: the quizzer program (QUIZZER.BAS), the Russian/English quiz (RUSENG.QUI) and the special cyrillic character font, (CYRILL.FNT). Antic Disk owners will find all three files ready-to-use on the October 1988 Antic Disk.

Type in Listing 1, QUIZZER.BAS, check it with TYPO II and SAVE a copy before you RUN it. This is the main program.

Next, type in Listing 2, check it with TYPO II and SAVE a copy before you RUN it. When RUN, Listing 2 creates Quizzer's Russian/English quiz file, RUSENG.QUI.

Finally, type in Listing 3, check it with TYPO II and SAVE a copy before your RUN it. When RUN, Listing 3 creates Quizzer's special cyrillic character font, CYRILL.FNT. I made this Russian font with a public domain program called "Create-A-Font." Later in this article I'll explain how you can use Quizzer without an alternate character set.

Quizzer first asks whether to present the words randomly or in order. The consecutive order can be used when you want to ensure that you're quizzed on each pair.

The commands available to you are shown at the bottom of the screen. The quiz buffer is empty when the program begins, so you have only three first-letter commands available--[L]oad a file of quiz pairs, [A]dd quiz pairs, or [E]nd the program. Once the quiz pairs are in the buffer, you can [Q]uiz yourself.

During a quiz, the program prints either an English or foreign word at the top of the screen in easy-to-see Graphics 2 characters and asks you for its translation. For example, if your Atari gives you a Russian word, answer with its English translation. If your Atari shows you an English word, type in Russian equivalent.

Any time during your quiz, you can view your [T]aily to see well how you're doing. You should answer the quiz as fast as you can, but take time to sound out the foreign word mentally or vocally.

CUSTOMIZING THE PROGRAM

As your vocabulary grows, use the [A]dd command to add new quiz pairs to the program. After adding an item, be sure to [S]ave your modified list to a disk file.

If you enter a quiz pair with a mistake, you are not doomed to be incorrectly quizzed forever. At any time during a quiz you can [D]elete the pair shown on the screen.

Quiz elements are packed together in memory to save space. The BASIC subroutines in lines 300 to 400 that locate quiz pairs can cause a perceptible delay while using large quiz databases. If you want to speed through quiz items, you need to use fewer quiz pairs. Good diversity and speed can be achieved with around 60-70 quiz pairs.

INTERRUPTIONS

The Atari is designed to display only one character set at a time. To get more than one, you have to fool the computer with a display list interrupt.

The diplay list is a short list of insuuctions which the ANTIC chip uses to draw and update the screen. The data for Quizzer's display list is in lines 805-806. ANTIC runs through this list sixty times per second.

Whenever ANTIC comes to an instruction code whose seventh bit is set--done by adding 128 to the instruction--it stops processing the display list instructions and quickly runs a brief machine language program. This routine should take no more than about 18 machine cycles to run.

When ANTIC is done with this brief routine, it returns to the display list and picks up where it left off. See lines 210 and 240 for examples of enabling and disabling DLIs. The 66s in these lines disable DLIs. The 194s(or 66 + 128) enables them.

There is a price to pay for this flexibility. You must write the machine language program, place it in memory, then put its address in memory locations 512 (low byte) and 513 (high byte). In Quizzer, this begins at line 1060.

To get two character sets on the screen, you need two interruyts--one tells the computer to use the new font and the other tells it to use the standard font. Each interrupt must include code that puts the other's address in 512 and 513. (In this case, the high byte of both addresses is equal to six, so the routines must only change the low byte, stored in location 512).

Here are the two DLI routines:

The first DLI routine begins at memory location 1664 ($0680). This one tells your Atari to use a standard font.

For more information on the Atari display list, read Appendix 8 and the information listed under memory locations 512-513, 560-561 and 54282 in "Mapping the Atari" by Ian Chadwick, Compute! Books.

TEACHERS

If you include the lines from 31010 to 31110, you can keep track of your students' use of Quizzer. When students [E]nd the program, the computer asks for their names and appends the name and [T] ally to a log file. The log file can be viewed in a text editor, or from DOS by copying the file to screen [S:] or printer [P:].

Note, however, that the program has no security. Students with even a little computer knowledge--these days, most students--can alter the information to be recorded.

Teachers may also wish to delete lines 2065, 2070, and 2080 in the students' version so that students do not accidentally add to, delete from, or save a file.

OTHER LANGUAGES, SUBECTS

Languages besides Russian can be used in Quizzer. The name of the font file in line 1110 needs to be changed. The foreign words in lines 1030 and 1031 need to be changed. And the lengths of the string variables holding these words, DIMensioned in line 1005, need to be adjusted.

The program can also be altered to use only the ATASCII character set for other subjects and for languages which do not use a differerit alphabet. Just substitute the lines below in place of their counterparts in the program.

200 RETURN
230 RETURN
805 DATA 112,112,96,66,64,156,7,2,71,184,156,66,204,156,112,2,7, 2,7,2,7,2, 71, 228,157, 66,248,157
806 DATA 0,2,2,2,65,164,6
1100 GRAPHICS 0:GOTO 1200
31010 GRAPHICS 0

Finally, substitution of one of the two lines below causes the program to quiz in only a single direction.

7010 QD=l or: 7010 QD=2

Andrew Thomas just graduated from Indiana State University in Terre Haute, where he was a senior consultant on the student staff of the Computer Center.

PHA                    ;Save the value of the accumulator by
                       ;"pushing" it on the stack
LDA #224
STA CHBASE             ;POKE 54281,224
                       ;(Use standard font)
LDA #146               ;(146 is equal to $92, the low byte
                       ;of the address of the other DLI routine)
STA VDSLST             ;POKE 512,146 
                       ;(Place the address of the other
                       ;routine here)
STA WSYNC              ;Wait for horizontal synchrronization 
                       ;(Keeps DLIs synchronized with the 
                       ;screen display)
PLA                    ;Restore the old value of the
                       ;accumulator by "pulling" it off
                       ;the stack.
RTI                     ReTurn from Interrupt 
The second DLI routine begins at 1682 ($0692). This routine makes your Atari use the special cyrillic font.

PHA                    ;"Push" the accumulator
LDA #156
STA CHBASE             ;POKE 54281,156
                       ;(Use cyrillic font)
LDA #128               ;(128 is equal to $80, the low byte 
                       ;of the address of the other routine)
STA VDSLST             ;POKE 512,128
STA WSYNC              ;Wait for horiz. sync.
PLA                    ;"Pull" the accumulator
RTI                    ;Return from Interrupt

Listing 1: QUIZZER.BAS Download

Listing 2: CYRILL.FNT Download

Listing 3: RUSENG.QUI Download