CLUB 100 Library - 415/939-1246 BBS, 937-5039 NEWSLETTER, 932-8856 VOICE USER'S GUIDE TALLY5.BA NUMERIC DATA ENTRY PROGRAM FOR THE TRS-80 MODEL 100 PORTABLE COMPUTER 9 November 1987 WILLIAM G. VOIGT DIVISION OF BIOLOGICAL CONTROL UNIVERSITY OF CALIFORNIA, BERKELEY 1050 SAN PABLO AVE. ALBANY, CA 94706 (415) 643-6367 1 INTRODUCTION This program sprang out of the need for quick field sorting and counting of different classes of items. It was originally designed as strictly a tally counter -- one of those multi-key counters for keeping track of various categories of items. Various modifications immediately became obvious, so that now it includes the ability to assign and store field names, save names and final counts to a data file, reset individual numbers, obtain percentages, decrement counts, and add (or subtract) numbers greater than one. Most of the various functions are self document- ing from the on-line help screen and from within the various program modules,but it was also felt that this guide may also be of assistance. 1. GETTING STARTED Conventions: Because the arrow key characters cannot easily be displayed or printed by most printers, their names are represented such as: , , , for individual keys and for all four characters as they appear on the sample screens. On the actual screen of the M-100, the actual arrow will appear. In order to use the program TALLY5.BA, the data file NAMES.DO must first be created. The purpose of this file is to store the default names for the various tally categories to be displayed on the screen. Although the file is necessary, only the default filename for the data file is required (see more discussion on page 6). Create the NAMES.DO file with the TEXT editor on the Model 100. Refer to the Model 100 user's manual for more details about the editor. To load the program from the tape, plug the cassette player into the Model 100. Insert the cassette and rewind to the beginning of the tape. Reset the counter to zero. The label of the cassette indicates where the program is stored, so advance to the beginning of the file. Put the tape player in the PLAY mode and enter BASIC on the Model 100. At the BASIC prompt type CLOAD"TALLY5.BA" followed by a (carriage return). The player should then begin searching the tape for the file and will display "TALLY5 Found". The computer will then load until it reaches the end of file mark. When the load has completed, the OK prompt will appear. 2 2. THE DATA ENTRY SCREEN The default entry screen looks like the following: ------------------------------------------ | (1) (2) (3) (4) (5) Bank # | | 1 | | 0 0 0 0 0 | | Filename | | (6) (7) (8) (9) (0) GR.TOTAL | | 0 | | 0 0 0 0 0 elp | | SUM RAM = 18514 uit | ------------------------------------------ The first row of numbers is the key number, corresponding to the ap- propriate numeric key to press. The second row is where the field names are placed. The third row contains the total for that particular key. Totals and the bank of ten keys in use are indicated the right hand portion of the screen. "GR.TOTAL" is the grand total of all keys. Below the grand total are two prompts; "H" (H-key) for on-screen help, and "Q" (Q-key) to quit the program. These will be discussed later. 3. INCREMENT & DECREMENT MODES Increment is the default mode. In this mode, numbers are incremented or decremented by one at each press of a number key(1 through 0), just as they would with a tally counter. This mode is indicated by the word "SUM" in the lower left corner of the screen. Note that as the numbers are pressed, the grandtotal is also incremented. If the wrong key is pressed, the number can be adjusted by pressing the minus ("-") key and the cor- responding number. The decrement mode lasts only for a single key press. 4. HELP MODE All of the various program modules are available through the increment mode. In order to remind you which keys activate which function, a help mode is included. Pressing the "H"-key brings on the help mode with the following screen: ----------------------------------------- | (1) (2) (3) (4) (5) Bank| | Entry| | 0 0 0 0 0<->Reduce | | ile | | (6) (7) (8) (9) (0) eset | |

ercent | | 0 0 0 0 0ame | | SUM ave | ----------------------------------------- 3 All of the valid keys (except and ) and an explanation of the modes which they will invoke are listed. For instance, pressing the <-> key will decrement the following key by one,pressing the <+> key will get out of the decrement mode, and pressing the key will allow one to reset the counter. If a non-valid key is pressed, nothing happens; the program simply waits until a valid key is pressed. 5. ENTRY MODE Often you may want to enter a large number and not have to press the key several times. To add larger numbers press the key. This puts you into the "ENTRY" mode indicated in the lower left corner of the screen. While in the entry mode, the right portion of the screen lists the valid keys. The bank select keys, and arrows, will select banks, and the and arrow keys will move from one field to another. The <-> and <+> keys will subtract or add the entry, respectively. A will bring you back to the increment mode. 6. FILE Pressing the key allows you to change the file name to which data is stored. After the key is pressed you are prompted for a new file name. Pressing will keep the old name. After the is pressed, you will be put back into the increment mode. 7. COMMENTS Although not documented in the help screen, you can add comments to the data. Pressing the key clears the screen and presents the follow- ing prompt: ENTER COMMNETS (255 CHARACTERS MAX) DATE & TIME WILL BE ADDED AUTOMATICALLY ? Simply enter the comment & press , & you are back in the increment mode. 8. NAMING MODE Field names are added to the keys in two different ways. Default names are specified in a text file called NAMES.DO. Names can be up to 23 characters long, although only the first five characters are displayed on the screen. New categories are often encountered in the field which are not anticipated, and their names can be added to the others by pressing the "N" key. The field name is printed in normal type, and a prompt appears in the lower left corner e.g; 4 ----------------------------------------- | (1) (2) (3) (4) (5) Bank # | |NAME1 1 | | 0 0 0 0 0 | | | | (6) (7) (8) (9) (0) GR.TOTAL| | 0 | | 0 0 0 0 0 | | NAME( 1): NAME1 SELECT | ----------------------------------------- Use the or arrow keys to select the desired key position. The bank select keys, and will select other banks while in this mode. The key makes corrections to the name you have selected. After a name has been entered or modified, the key ends the process, and the key will abort any changes and move to the next name. A leaves the name the same, and returns you to the increment mode. The easiest method of setting the names is to enter them into a text file called NAMES.DO. A sample NAMES.DO is given below: POND,1STCX,2NDCX,3RDCX,4THCX,PUPCX,1STAN ,2NDAN,3RDAN,4THAN,PUPAN,NOTONECTA,DAMSE LFLY,DRAGONFLY,TROPISTERNUS,AGABUS, The first name is the default file name for storing the data. It is restricted to six characters in length. The names which follow fill in beginning in bank #1, name #1 until all forty names are filled or the end of the file is reached, whichever comes first. In the above case, ten of the first bank and five of the second will be named. Note also that although only the first five characters of the name are displayed, up to 15 characters will be saved to the data file. To avoid confusion,however, make sure that the first five characters of each name are unique. 9. RESET MODE Pressing the key allows you to reset any or all keys to zero. To reset all numbers, press the key, otherwise use the individual field and bank select keys (i.e. arrow keys) to select individual fields to be reset. A will bring you back to the increment mode. 10. PERCENTAGE MODE Pressing the

key temporarily displays the percentage of each field as part of the grand total. Different banks can be selected while in this mode. Hitting any other key will return you to the increment mode and number display. 5 11. SAVING DATA TO A FILE The key allows you to save the data. The data is saved in a format which allows easy importing into a Lotus 1-2-3 work sheet. Names are saved as quote delimited, comma separated strings, while the numbers are separated by spaces. Time and date are automatically added when the record is saved. When the key is pressed data is automatically saved to the preselected data file, and the numbers are reset to zero. Even though the data is reset, the field names will remain unchanged. If new names have been added since the last save, or if it is the first save since the program began, the names are stored along with the data. If no changes have been made to the field names, only the data will be saved. Each time data is saved, NAMES.DO is updated with the default filename and latest names, so that the next time the program is run the latest names will be used. Once the data has been saved, it cannot be altered from within TALLY5.BA. It is accessible with the TEXT processor on the Model 100, but you must leave the TALLY5 program to do so. If you find that you have entered spurious data, you can also add a comment to that effect at any time. DISCUSSION The primary purpose of this program was to allow for quick and reliable entry of numeric data into a text file with a portable, field computer. It assumes only that the Tandy Model100/102 computer is being used, and that there is a minimum of 24K bytes of RAM. Other embellish- ments could be added for optional equipment such as saving to a portable disk drive, transfer of files to another computer etc, but these can also be accomplished through the MENU of the Model 100. The original intent was to use the program for data collection, and use another program on a PC for the analysis and editing of the data. The data files are written in a format which is compatible with Lotus 1-2-3, and most database programs. Also BASIC programs could be written to access the data. When Lotus is used to import the data, the names will fill the first row, and the numbers will fill in under the appropriate headings. Comments, date, and time are written to be placed in the 41st column next to the last number. I should mention that certain parts of the code must be modified for the use of this program on other brands or models of computer. I have tried this program on a Model 200 and found that the BIOS calls to print inverse text are not the same in the two machines. These are on line #s 30 (Call 16959 - disables scrolling) and on line # 50 where IN and NR are set (17001 and17006 for inverse and normal text, respectively). I would appreciate it if users of other laptops do get the program working on their machines, that they let me know. In order to keep track of who is using this program, I have enclosed a Registration Form. I would appreciate being notified of any bugs which arise while using the program. I also strongly recommend that before you use this program on sensitive data, that you practice all phases of the program. This should prevent any unwanted surprises during actual data gathering procedures. 6 TALLY5 USER REGISTRATION FORM NAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ADDRESS. . . . . . . . . . . . . . . . . . . . . . . . . . . . CITY . . . . . . . . . . . . . . . STATE . . . . . . . . . . . ZIP. . . . . . . . PHONE . . . . . . . . . . . . . . . . VERSION OF TALLY USED (SEE 1ST 10 LINES OF PROGRAM). . . . . . . . . . . . TYPE OF COMPUTER. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . COMMENTS & SUGGESTIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WHAT DO YOU USE THIS PROGRAM FOR? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7