by Larry W. Linson
What Is It? is an activity that I began writing for my first grade class, in the fall of 1982. It's a reading/spelling activity in which you are asked to identify a series of seven random pictures. The program is similar to the reading workbooks children use in the primary grades. The child simply needs to type in the picture-word that corresponds with the picture. For example, if a picture of a HOUSE appears, then the word "HOUSE" should be typed in. In What Is It? there are four levels of difficulty. Level 1 offers a single clue, the name of the picture. Level 2 gives the picture word and two distracting clues which are not similar to the picture word. Level 3 gives the picture word and three other similar distractors such as HOUSE, HORSE, MOUSE and HOWLS. Level 4 gives no hints at all; the word must be typed in from the child's memory. The program keeps score and reports it after each correct answer. The program keeps score and reports it after each correct answer. I've now had close to fifty children test this program, and most of the "bugs" have been worked out, with many new features added to the original program.
Children working on Atari computers have the most trouble with accidentally pressing the BREAK key when they want the BACK SPACE key, which is right "next door." I avoided this problem by OPENing the keyboard, rather than using the INPUT command. By using this technique, if a mistake is made and BACK SPACE is pressed, then the program clears the student's response and waits for another. An undesired response can be cleared at any time by pressing either the SPACE BAR or the BACK SPACE key.
The BREAK key was disabled to prevent the program from being stopped prematurely. This was accomplished by using POKE 16,64 and POKE 53774,64. I used a short subroutine at Line 13000 for this, since the POKE must be repeated after each graphics mode change. I also used various TRAP statements for "catching" errors. In this way, the program doesn't halt if an error is detected. The children in my classes have been rather inventive in finding ways to "break" or "crash" programs. To date, What Is It? hasn't been crashed by any of my first graders. I didn't protect against SYSTEM RESET. This key is not pressed accidentally very often (except during games!). I also felt it might be advantagous to be able to stop the program if desired.
In the program, I have used various methods to save memory (RAM). One of these is to substitute variables for commonly employed numbers. For example, in the program, I have used the numeric variable Q1 to equal 1, and Q1+Q1 to equal 2, and so on. Atari BASIC uses up seven bytes every time a number is entered. By substituting a numeric variable, such as Q1, only one byte of memory is needed. This may initially make the program seem a little difficult to decipher, but just read "Q1" as "1" and you won't have any problem. I used this same technique to label POKE locations and subroutines. The command GOTO PICK sends the program to the picture shuffling routine. POKE OFF, Q1 is used to turn off the cursor. The number held by OFF is 752. POKEing 752 with a 1 (entered as POKE 752,1) tells the cursor to disappear.
Another way of saving RAM was to utilize many statements on the same line, employing the same numeric variables over and over. In this way, What Is It? will run on a 16K 400 or 600XL. Any more RAM-saving stunts, and the program would have been virtually unreadable and much more frustrating to type in!
The program is set up rather logically -- to my way of thinking, anyway! What Is It? begins with a title page and then asks for your name. You select the level you wish to try, and a series of seven random pictures follows. Having only eleven pictures in the program's library may not seem like very many, but I believe that my students enjoy the familiarity and reinforcernent they achieve with this library of pictures. Since each picture is picked at random, and the program will not pick the same picture twice, there are over one and one-half million different combinations of the eleven pictures! Check it yourself try this on your Atari: PRINT(11*10*9*8*7*6*5). The results are staggering, aren't they?
After each picture word is correctly answered, a short reward sequence is initiated. After the seventh picture, an overall score is given, and you are asked if you would like to try again. Many of the techniques that I have used in What Is It? have been borrowed from other programmers. The idea of using numeric variables comes from Jerry White; the picture-shuffling routine in Lines 4000-4010 is from James Korenthal; and the practice of using DATA staternents to READ numbers to PLOT and DRAWTO for graphics, I learned from Elaine Garringer. I have found that the best way to learn how to program is to type in programs, such as this one, RUN it and then study the code to see how the author achieved different effects. I've learned more from doing this than from any book I have purchased!
The rest of the variables are used as simple counters, for delay statements or PLOT and DRAWTO routines.
0 DATA 890,841,269,928,121,895,855,674
,815,647,244,785,377,17,670,9028
27 DATA 960,695,908,269,165,174,742,74
2,745,164,671,51,60,790,775,7911
65 DATA 776,390,59,480,567,619,998,630
,40,526,680,692,64,689,662,7872
115 DATA 973,695,694,418,35,422,363,32
8,426,51,355,41,845,434,591,6671
601 DATA 620,118,205,175,656,438,541,6
41,387,222,969,313,730,95,404,6514
806 DATA 270,577,591,459,217,446,331,8
29,27,912,651,885,375,227,736,7533
940 DATA 794,959,744,393,54,751,661,30
4,64,895,166,747,176,984,898,8590
1028 DATA 724,995,111,727,295,890,730,
681,641,527,516,529,393,679,33,8471
1110 DATA 725,344,209,215,30,994,325,9
0,254,761,392,236,356,794,709,6434
1954 DATA 157,713,801,194,129,631,243,
378,31,620,256,854,854,846,861,7568
4019 DATA 832,576,886,808,795,824,849,
425,805,740,626,210,726,820,588,10510
4076 DATA 337,352,556,241,48,480,770,7
67,3,136,466,256,509,719,937,6577
6010 DATA 686,903,898,259,119,501,927,
612,667,557,685,749,248,440,996,9247
7050 DATA 880,838,402,739,427,161,94,6
40,871,239,338,743,583,526,61,7542
16000 DATA 330,390,104,853,982,44,2703