Byers, J.A. 1996. TAXOKEY: A universal taxonomic key program using DOS text          files and graphics. Computer Applications in the Biosciences 12:185-189.                                                                                                                 John A. Byers                                                           Department of Plant Protection                                           Swedish University of Agricultural Sciences                                               230 53 Alnarp, Sweden                                                                                                                                                                                                  ABSTRACT                                                                                                                                                        A program (TAXOKEY.EXE), requiring only a few keystrokes to use, is described   as a universal taxonomic key in the identification of plant and animal species  by IBM-compatible personal computers. A DOS text file serves as the database    for a key that can be dichotomous or with multiple choices. TAXOKEY can         optionally display color or monochrome screen pictures to illustrate the keys.  Additional programs are described that are used to make the keys and check for  errors, as well as convert .PCX graphic images for use with TAXOKEY. A second   text file can be searched by TAXOKEY for information on particular species      descriptions, notes and references.                                                                                                                             INTRODUCTION                                                                                                                                                    Biological observations and experiments are only valid when the organisms in    question are accurately identified. In environmental and ecosystem studies,     taxonomic keys may be the most practical method of classifying large numbers    of organisms into taxonomic groups. The specimens can then be optionally sent   to an authority for species identification. More specialized keys permit one    to identify an organism to species by progressing from general family or genus  characters to species-specific traits. Compared to keys found in books or       articles, computer software keys are easier and faster to use as well as        update. My first objective was to construct a computer program that is          flexible enough to accommodate many different keys with text and illustrations  for many taxonomic groups of organisms. This could be accomplished by having    the software use DOS text files containing not only the key's subject content   but also a few simple codes controlling the key's organization. Names of        graphic images (.PCX standard) would be included in the text files to           illustrate the keys. Another objective was to make the software intuitive with  a minimum of keyboard control features in order to shorten program learning     time and simplify use. Such a computerized universal taxonomic key is           described here that is of general use to biological researchers, systematists,  and educators.                                                                                                                                                  IMPLEMENTATION                                                                                                                                                  Making a Text File of a Taxonomic Key                                                                                                                                A DOS text file given any name (e.g., BBEETLE.KEY) serves as the database  for a particular key. The author or revisor of the taxonomic key edits the      text in either a word processor (saved as DOS text), the DOS text editor        EDIT.EXE (included in all versions of DOS 5.0 and above) or TAXO-ED.EXE (a      specialized editor described here). The universal key program can only work     with a text file that has a special format (an example is shown in Figure 1).     Fig. 1. Example of a DOS text file (first 31 lines of BBEETLE.KEY) of a         taxonomic key for European bark beetles (from Grne, 1979). The first line      begins with #1 and optional names of one or more bit-mapped image files (e.g.,  F5.A12, shown in Fig. 2) and ends with an asterisk. The second choice of "page  one" (lines 12-15) ends with *B* that is the destination page beginning         with #B (line 16). The text file should end with two hard returns (by pressing  [Enter] twice; see text for details on the format of the text file).                                                                                            #1 F5.A12 F6-10.A12 F7.A12 F1.A12 F2-3.A12 F4.A12 *                             ^1 2                                                                            Revised Oct. 1, 1995                                                            ^3 2                                                                            abdominal sternites progressively rising posteriorly towards apices             ^4 2                                                                            of elytra (fig. 5); elytra flat, posterior elytra not sloping ventrally;        ^5 2                                                                            tibiae produced apically into long, curved tooth (fig. 6)                       ^6 2                                                                            Subfamily SCOLYTINAE *A*                                                        ^8 2                                                                            abdominal sternites not rising posterior (fig. 7); posterior elytra sloping     ^9 2                                                                            ventrally; tibia with small lateral spines *B*                                  #B F9.A12 F7.A12 F6-10.A12 backto #1                                            ^1 2                                                                            head completely concealed from above; pronotum granulate anteriorly and         ^2 2                                                                            punctate posteriorly (fig. 9); third tarsal segment not bilobed (fig. 10)       ^3 2                                                                            Subfamily IPINAE *C*                                                            ^5 2                                                                            head partly visible from above; pronotum uniformly sculptured; third            ^6 2                                                                            segment of tarsi bilobed (fig. 8): Subfamily HYLESININAE *D*                    #D F11-12.A12 backto #B                                                         ^1 2                                                                            anterior elytral margin granulate, ridged (fig. 11) *2B*                        ^3 2                                                                            anterior elytral margin smooth, not ridged (fig. 12) *17B*                             A "page" of the key always begins with # and can be followed optionally    by one to ten file names of graphic images for illustrating that page of the    key (Figure 1). The bit-mapped color or monochrome images can be EGA (640x350   pixels) or VGA (640x480 pixels, 16 colors; 320x200 pixels, 256 colors)          contained in two EGA or three VGA files on the hard drive. The EGA graphic      files can be any name but must have the extension .A9 in the key's text file    and the corresponding files on disk must have the extensions .A9 and .B9        (explained in more detail later). When a 640x480 VGA file is to be used by a    page in the key, the name in the text file must have the extension .A12, while  the three graphic files have the same parent name but end in .A12, .B12 and     .C12. A 256 color VGA (320x200 pixels) is also allowed ending in .A13 (in this  case the entire picture can be held in one file). While up to ten pictures can  be scrolled for any particular page of the key (always beginning with #), only  the first picture has text of choices overlaid from the key's text file. The    first page of the key (#1) does not have a second # as do all subsequent pages  which refer back to a previous page, however, this line must end with a space   and asterisk (Fig. 1 press [F10] to see).                                            The next line after the beginning of any page has the location on the      screen where the text of the first choice should be placed (Figure 1). These    lines begin with the ^ (exponent) symbol followed by the Y-axis (line           position) that starts at the top of the screen, followed by a space, and then   the X-axis position where the text will start. This is illustrated in Figure    2, which is the TAXOKEY program's screen output controlled by the first 15      lines of Fig. 1 (press [F10] to see).                                             Fig. 2. Computer screen image composed of a scanned picture (Figure 5 from      Grne, 1979) and the appropriate text from the key's text file (Fig. 1          press [F10] to see). The scanned picture was arranged by PC Paintbrush and      saved as a .PCX image and then converted by PCX.EXE into three *.?12 binary     image files loaded by TAXOKEY.EXE. to see Fig. 2 press [F10]                      The Y-axis positions are determined by the type of graphic image so that for    EGA there are 25 possible lines and for VGA there are 30 lines. The X-axis      positions range from 1 to 80, left to right across the screen. The next line    contains the text of the first choice (less than 80 characters, depending on    the X-position). Several lines can make up a choice by using several ^Y X       position lines each followed by a line of text (Fig. 1 - press [F10] to see).   However, the last line of a series of lines comprising a choice must end in a   destination letter or number such as *A* that is enclosed in asterisks          (Fig. 1 - press [F10]).                                                              All choices, either dichotomous or up to 30 lines (VGA screen), for a      page of a key must be grouped together and their ordering from top to bottom    corresponds to the desired cursor scrolling sequence (Fig. 1 - press [F10]).    The destination indicated on another page of choices (e.g., #A as indicated by  *A* above, Figure 1) can be anywhere in the text file and does not have to be   in any relation to other pages. All subsequent pages after the first, for       example a second beginning with #A, can have up to ten graphic pictures, each   separated by a space, but the last characters in the line must refer back to a  previous page, in this case #1 (Fig. 1). The words back to can immediately      precede the second # to aid one's understanding. When a number of choices       leads one to a species determination, this choice should end with the Genus     species (Author) * (ending asterisk, see Figures 1 and Fig. 3 - press [F10]).   The Author and parentheses are optional.                                          Fig. 3. Computer screen image of scanned pictures (Figures 236 and 237 from     Grne, 1979) and text from the key's text file, BBEETLE.KEY (from Grne,        1979). Pressing [Enter] while the cursor is on a Genus species * causes the     program to search a text file of species descriptions, notes and references     (e.g. BBEETLE.REF). to see Fig. 3 press [F10]                                                                                                                     Checking a Text File of a Taxonomic Key for Errors                                                                                                                   The specialized text editor, TAXO-ED.EXE, can be used to rapidly check     for proper positioning of text on any bit-mapped pictures. However, this        program does not check for appropriate syntax nor for correct addressing        between choices and pages of the key. This can be done by running the program   TAXO-CK.EXE, which takes the key's text file and makes another file that        contains the same lines but also inserts any error messages immediately after   the lines with errors. This new text file is named TAXO-CK.ERR (overwriting     any previous file with this name). A word processor or TAXO-ED.EXE is used to   correct the errors and remove the error messages. This file should then be      saved as the name of the original file of the key. Conditions that cause an     error are whether: (1) a choice on a page specifies a non-existing destination  page or one that is not bracketed with asterisks (e.g., *A1* is correct), (2)   multiple page destinations occur when only one is allowed (the offending line   numbers are given), (3) the ^Y X positions for choices are outside the          appropriate ranges, (4) a page refers back to a non-existing page, (5) a page   refers back to a previous page number of which there are multiple copies (the   line numbers involved are given), (6) a later page refers back to a page that   does not have the later page as its destination, and (7) the graphic file       endings are incorrect (they must end in .A9, .A12, or .A13).                                                                                                    Additional Components of a Universal Key                                                                                                                             The main program (TAXOKEY.EXE) begins by opening a text file,              TAXOKEY.DAT, that contains specific data. This file is made with a word         processor (saved as DOS text file!) and contains five lines that can be of any  width in characters. Line (1) specifies the name of the text file for the key   while line (2) has the name of a text file containing the species               descriptions, notes and references. This file of species descriptions also is   made with a text editor (or TAXO-ED.EXE) but the width of the text lines        should be no more than 80 characters (width of the screen). This file is        converted each time the main program is run into a random access file so that   scrolling is possible. Line (3) of TAXOKEY.DAT has the title of the key which   can be divided by commas so that up to three lines are shown on the main        program's opening title screen. Line (4) is for the author's name and address   which also is divided by commas that can designate up to six lines on the       opening title screen. Line (5) consists of two numbers separated by a space     that specify the text and border colors, respectively (text colors are          standard QBASIC colors from 9 to 15 and border colors from 2 to 15).                                                                                            The file OPENING.KEY comes with TAXOKEY.ZIP to demonstrate the program and      tells one that they must download the image files and key text files for the    bark beetle or grasshopper keys (BARKBEET.ZIP or GRASSHOP.ZIP). It is very      important that the user replaces TAXOKEY.DAT with similar files (OF THE SAME    NAME) with appropriate information for each key. TAXOKEY.DAT (a text file) for  the bark beetle key has only 5 lines and looks like this:                                                                                                       bbeetle.key                                                                     bbeetle.ref                                                                     Grne; S. 1979. Brief Illustrated Key to European Bark Beetles, (*)             address unknown                                                                 10  14                                                                                                                                                          (*) Verlag M&H Schaper - Hannover                                               (replace (*) with the above line, it did not fit on this screen since the line  is more than 80 characters long, however in your DOS text editor, e.g.,         EDIT.COM, the line is able to be more than 80 characters). The opening screen   in TAXOKEY will then use the commas to make it look like this:                                      Grne; S. 1979. Brief Illustrated Key to European Bark Beetles                Verlag M&H Schaper - Hannover                                                                                                                                                     address unknown                                                                                                                                                                             The TAXOKEY.DAT file (you can't change the name) for the grasshopper key also   has only 5 lines and looks like this:                                                                                                                           grasshop.key                                                                    grasshop.ref                                                                    GRASSHOPPERS (ADRIDIDAE), OF COLORADO, (Bulletin No. 584S - 1982)               J. L. Capinera and T. S. Sechrist, Colorado State University, (*)               10  14                                                                          (*) Experiment Station, Fort Collins, Colorado                                  (again the above line did not fit on this screen since the line is more than    80 characters long). The opening screen in TAXOKEY will then use the commas to  make it look like this:                                                                                                                                     GRASSHOPPERS (ACRIDIDAE)                                                     OF COLORADO                                                    (Bulletin No. 584S - 1982)                                                                                                                                              J. L. Capinera and T. S. Sechrist                                             Colorado State University                                                 Experiment Station                                                        Fort Collins                                                               Colorado                                                                                                                                                                                        The appropriate TAXOKEY.DAT is included in the BARKBEET.ZIP and GRASSHOP.ZIP    files, but since it is possible to overwrite files with the same name, backup   files are included named TAXOKEY.BB and TAXOKEY.GH, respectively. The user      must copy either file to TAXOKEY.DAT in the specific directory with the         program system and image files. If each key is used in a different directory,   or if only one key is used, then no problem with TAXOKEY.DAT should arrise.     The program TAXOKEY.EXE will object if no TAXOKEY.DAT file is present or if     information is incorrect. A default title with my name may also be supplied if  TAXOKEY.DAT is incorrectly formated.                                                                                                                            Drawing, Scanning and Converting Graphic Images                                                                                                                      Illustrations for a key can be drawn by computer using Windows             Paintbrush, the standard drawing program included in the Windows accessories.   Drawings can be saved in monochrome or 16 colors in standard .PCX format        (ZSoft Corp., Marietta, Georgia, USA) for later conversion to image files       compatible with TAXOKEY.EXE and QuickBASIC by the program PCX.EXE (explained    below). Images can be scanned with hand- or flatbed scanners directly into      .PCX image format or as .TIF files that are then converted by the Shareware     program Graphic Workshop (Alchemy Mindworks Inc., P.O. box 500, Beeton,         Ontario L0G 1A0, Canada). PC paintbrush and a Marstek M-800 Plus hand-scanner   were used to scan drawings from published keys into .PCX computer images (see   Fig. 2 - press [F10]).                                                            Figure 2. Computer screen image composed of a scanned picture (Figure 5 from    Grne, 1979) and the appropriate text from the key's text file (Figure 1). The  scanned picture was arranged by PC Paintbrush and saved as a .PCX image and     then converted by PCX.EXE into three *.?12 binary image files loaded by         TAXOKEY.EXE.                                                                      At 200 dpi (dots per inch) a scanned image of 8.128 x 6.096 cm fits exactly in  the 640 x 480 pixels of the VGA screen. Paintbrush can then be used to          combine, move, or erase graphics and add text.                                       The saved images in .PCX format then are converted to BASIC-compatible     EGA or VGA files with appropriate extensions (.A9, .A12 or .A13 etc.) by the    program PCX.EXE. These image files are each 51,211 bytes or 153,633 bytes       total per image (VGA). Thus, several megabytes or more of disk space may be     required for uncompressed images of a key. In order to transport numerous       graphic files between computers and users, I made the program ZIP-WILD.EXE      which works with the popular compression software PKZIP.EXE (PKWARE Inc.,       Brown Deer, WI). ZIP-WILD.EXE with the aid of PKZIP.EXE takes all graphic       files of wildcards *.?12, *.?13 or *.?9 and compresses them to standard *.ZIP   files. With the companion shareware program, PKUNZIP.EXE, the *.ZIP files can   be uncompressed on the same or a second computer. The 51,211 byte graphic       files typically compress to only 2% to 5% of their former size, for example,    519 bark beetle image files with 26.6 megabytes were compressed to only 1.3 M   and fit on one 1.44 M disk.                                                          Many users have limited hard drive space and probably will not want to     use upwards of 25 megabytes for the uncompressed image files, although these    can be viewed almost instantly. Thus, TAXOKEY looks for the file PKUNZIP.EXE    in the current directory and if present then TAXOKEY assumes that all image     files are compressed in *.ZIP files. In this case, TAXOKEY uses PKUNZIP.EXE to  uncompress the particular image files specified in the text file for the key    and then loads these uncompressed images as usual. These uncompressed image     files are deleted as soon as they are displayed to avoid filling the disk. The  user must decide whether it is more important to have maximum speed for         viewing pictures (no PKUNZIP.EXE in the current directory and many megabytes    of *.?12 image files) or slower viewing but requiring only one or two           megabytes of disk space. The uncompressed images would be best for use with a   writable optical disk. For more information about graphics files please read    Appendix 1 - Graphics at the end of this text file (the same text is included   in the help section of the graphic conversion program PCX.EXE.                       A list of all files and associated programs for the universal key system   is shown in Table 1.                                                                                                                                            TABLE 1. Files used in the universal taxonomic key program system.                File                  Description and Use                                                             Main Program and Accompanying Files                                                                                                         TAXOKEY.EXE     main program                                                                                                                                    TAXOKEY.DAT*    data file of key's title, author, address, and colors                                                                                           BBTEXT          text file (any name) for key's text                                                                                                             BBREFS          text file (any name) for descriptions, notes and references                                                                                     TAXOKEY.TXT*    random access file of this paper for detailed help                                                                                              BB-1.A9         EGA TAXOKEY image file (any name + .A9), pictures require a                     second file BB-1.B9 (BASIC Screen 9, 640x350 pixels, 16 colors                  of 64 possible)                                                                                                                                 BB-1.A12        VGA TAXOKEY image file (any name + .A12), also requires BB.B12                  and BB.C12 (BASIC Screen 12, 640x480 pixels, 16 colors of 256K                  possible)                                                                                                                                       BB-1.A13        VGA TAXOKEY image file (any name + .A13), only one file needed                  to hold image, (BASIC Screen 13, 320x200 pixels, 256 colors of                  256K possible)                                                                                                                                                             Key-Format Error Correction                                                                                                          TAXO-ED.EXE     specialized text editor for key's text (e.g., BBTEXT)                                                                                           TAXO-CK.EXE     checks for syntax and address errors in key's text (e.g.,                       BBTEXT) and makes file TAXO-CK.ERR that has key's text file                     plus inserted error messages                                                                                                                               Graphic File Conversion and Compression or Uncompression                                                                                             PCX.EXE         converts Paintbrush *.PCX files to EGA or VGA TAXOKEY image                     files                                                                                                                                           ZIP-WILD.EXE    works with PKZIP.EXE (PKWARE shareware) to compress, for                        example, BB-1.A12, BB-1.B12 and BB-1.C12 into BB-1.ZIP (see                     text for details)                                                                                                                               PKUNZIP.EXE*    PKWARE shareware to uncompress, for example, BB-1.ZIP to BB-                    1.A12, BB-1.B12 and BB-1.C12 image files (see text for                          details)                                                          *File name must not be changed.                                                                                                                                                                                                                 Running the Program TAXOKEY.EXE                                                                                                                                      The program is easy to use: type taxokey and the starting menu shows the   name and address of the authors until a key is pressed. The first page may or   may not have graphic pictures and from one (usually two) to several choices     (Fig. 2 - press [F10]) that can be selected by the [up/down] cursor keys and    then pressing [Enter]. Pressing the [Tab] key will show additional graphic      pictures if available. Forward progress through the key is simply a matter of   selecting choices as above. The [Backspace] key can be pressed at any time to   go back one page or one picture. When the progression ends with a Genus         species * (Fig. 3 - press [F10]), pressing [Enter] causes a search for the      Genus species or G. species in a text file containing species descriptions,     notes and references.                                                             Fig. 3. Computer screen image of scanned pictures (Figures 236 and 237 from     Grne, 1979) and text from the key's text file, BBEETLE.KEY (from Grne,        1979). Pressing [Enter] while the cursor is on a Genus species * causes the     program to search a text file of species descriptions, notes and references     (e.g., BBEETLE.REF).                                                              The search can be continued by successive presses of [Enter]. Line by line      scrolling is possible at any time, and pressing [Esc] returns one to the main   key. The user can immediately return to the first page of the key by pressing   [Home]. Pressing [F1] shows the brief help, [F5] a detailed manual (in          TAXOKEY.TXT), and [Esc] exits the program.                                                                                                                      DISCUSSION                                                                                                                                                           The ease of use of TAXOKEY is in contrast to several more comprehensive    and complicated program systems. The most widely known is called "DELTA"        (DEscription Language for TAxonomy)(Dallwitz, 1980a, b). This system has        several programs (CONFOR, PAUP, KEY, INTKEY, DELFOR, and others) which because  of the numerous facilities require many hours to learn (Watson et al., 1986;    Askevold and O'Brien, 1994). The complexity of the system is demonstrated by    the detailed and syntactical descriptions found in Askevold and O'Brien         (1994).                                                                              Several computerized keys that are specialized for various groups of       organisms have been reported (Zo, 1982; Doering et al., 1988; Terranova and     Roach, 1989; Immelman, 1991). Hypercard database systems are another approach   to organization of taxonomic data and have been used in teaching (Skov, 1989;   Theodoropoulos and Loumos, 1994). Expert systems include those in which data    are entered about a specific group of organisms and the program is instructed   to generate a series of questions that when answered by the user allows the     program to suggest a species name for a particular specimen (Wilson and         Partridge, 1986; Woolley and Stone, 1987; Allkin et al., 1992; Estep et al.,    1993; Dykes et al., 1994). The expert systems, sometimes called artificial      intelligence systems, can be highly specific with a fixed database or quite     flexible in database and program structure.                                          The "PANKEY" system (Pankhurst, 1986), can work alone or with DELTA as a   universal key and currently comprises 12 programs including data capture,       DELTA editor, diagnostic description, character, clustering and cladistic       analyses, key construction, and an interactive expert system (R. J. Pankhurst,  Taxonomic Systems, 23, Royal Crescent, Edinburgh EH3 GQA, U.K.). These          programs are from 95 to 145 each (1095 total). This suite of programs is     again for experienced users and dedicated taxonomists due to the considerable   cost and necessarily slow-learning curves, but they offer the most              comprehensive facilities.                                                            Use of taxonomic keys in books can be tedious and time-consuming because   of the need to skip forward and backward through numbered parts of different    pages of the key and illustrations - with the possibly of losing one's place.   TAXOKEY allows the user to easily navigate through a key by keeping track of    up to 150 levels of branching in a dichotomous key.  A particular path of       choices entered by the user that describes the progression from the first page  to the current place within the key is "remembered" by the program in a memory  array (e.g., 121222112221). Using [Enter] or [Backspace] moves one forward or   backward through the array allowing the program to display appropriate pages    as further specified in the key's text file. The values in the array are not    altered unless the user selects a choice different from that in the current     path. This means that in theory up to 2.85 x 1045 choices are possible if all   150 levels (n) are utilized fully, according to:                                                                                                                         n                                                                             Ŀ                                                                            \                                                                               /     2                                                                                                                                                    1                                                                                                                                                      The maximum number of direct paths to species identifications is equal to 2    which is also the maximum number of species that can be considered. However,    no keys are expected to use all 150 possible levels fully, for example, the     identification of Ips typographus in the bark beetle key (Fig. 3 -              press [F10]) requires 12 levels of choices while Scolytus kirschi needs only 3  levels.                                                                              The real size limitation for a key is how long it takes a computer to do   a linear search of the key's text file. The bark beetle key, BBEETLE.KEY, is    83 K bytes with 161 pages (average of 15 text lines per page) and takes a 486-  computer about 0.12 seconds to find a designated page. Full utilization of 10   choice levels would allow coverage of 1024 species with 2-1 pages, and by      comparison would take about 0.76 seconds to look for a certain page.            Similarly, a 20-level dichotomous key could have at most 1 million species but  would require a hugh text file of 539 MB and take 13 minutes on average to      find a specified page.                                                               Compared to published keys, computerized keys are easier to restructure    and modify after taxonomic revisions. Thus, several specialists could work      together over the Internet and update or improve a software-based key rapidly   and with less effort. Computerized keys are easy to distribute by disk, e-mail  and the Internet. The use of illustrations in these keys makes it possible      even for non-specialists to successfully identify organisms. Taxonomists would  have incentives to distribute their work in computer keys since they could      advertise their name and institution.                                                The program system can be obtained by sending one formatted disk (1.2M or  1.44M) to me, while an additional disk is required for the compressed VGA       image files of each example key: European bark beetles (Grne, 1979) or         Grasshoppers of Colorado (Capinera and Sechrist, 1982). Donations of $5 for     shipping and handling would be appreciated.                                                                                                                     Acknowledgements                                                                                                                                                Funding for the project was obtained from the Swedish Agricultural and Forest   Research Council (SJFR). This project was inspired by my desire to thank the    specialists who have identified insects for me, especially B. C. Kondratieff    and H. E. Evans (Colorado State University) and H. Andersson, R. Danielsson,    and P. Douwes (Lund University and Swedish Museum of Natural History, Lund).    I am grateful to Verlag M&H Schaper (Alfeld, Germany) as well as J. L.          Capinera and T. S. Sechrist for permission to use their keys on European bark   beetles and on grasshoppers of Colorado, respectively, as examples for the      universal taxonomic key program.                                                                                                                                REFERENCES                                                                                                                                                      Allkin, R., Moreno, N.P., Gama-Campillo, L. and Mejia, T. (1992) Multiple uses       for computer-stored taxonomic descriptions: Keys for Veracruz. Taxon, 41,       413-435.                                                                                                                                                   Askevold, I.S., and O'Brien, C.W. (1994) DELTA, an invaluable computer program       for generation of taxonomic monographs. Ann. Entomol. Soc. Am., 87, 1-16.                                                                                  Capinera, J.L. and Sechrist, T.S. (1982) Grasshoppers (Acrididae) of Colorado:       Identification, biology and management. Colorado State University               Experiment Station, Bulletin, no. 584S, 1-161.                                                                                                             Dallwitz, M.J. (1980a) A general system for coding taxonomic descriptions.           Taxon, 29, 41-46.                                                                                                                                          Dallwitz, M.J. (1980b) User's guide to the DELTA system. Report no. 13. CSIRO        Division of Entomology, PO Box 1700, Canberra City, ACT 2601, Australia.                                                                                   Doering, B., Ehrhardt, S., Leuchke, F.K. and Schillinger, U. (1988) Computer-        assisted identification of lactic acid bacteria from meats. Syst. Appl.        Microbiol., 11, 67-74.                                                                                                                                      Dykes, G.A., Britz, T.J. and Von Holy, A. (1994) Numerical taxonomy and              identification of lactic acid bacteria from spoiled, vacuum-packaged            vienna sausages. J. Appl. Bacteriol., 76, 246-252.                                                                                                         Estep, K., Slugs, R. and Syvertsen, E.E. (1993) "Linnaeus" and beyond:               Workshop report on multimedia tools for the identification and database         storage of biodiversity. Hydrobiologia, 269, 519-525.                                                                                                      Grne, S. (1979) Brief Illustrated Key to European Bark Beetles. Verlag M&H          Schaper, Hannover.                                                                                                                                         Immelman, K.L. (1991) Synopsis of the genera Nesaea and Ammannia (Lythraceae)        in southern Africa. Bothalia, 21, 35-50.                                                                                                                   Pankhurst, R.J. (1986) A package of computer programs for handling taxonomic         databases. Comput. Appl. Biosci., 2, 33-39.                                                                                                                Skov, F. (1989) Hypertaxonomy: A new computer tool for revisional work. Taxon,       38, 582-590.                                                               Theodoropoulos, G. and Loumos, V. (1994) Parasitology tutoring system: A             hypermedia computer-based application. Comput. Meth. Prog. Biomed., 42,         113-118.                                                                                                                                                   Terranova, A.C. and Roach, S.H. (1989) A computer-aided key for distinguishing       South Carolina species of the genus Phidippus (Aranea: Salticidae). J.          Agric. Entomol., 6, 23-30.                                                                                                                                 Watson, L., Aiken, S.G., Dallwitz, M.J., Lefkovitch, L.P. and Dub, M. (1986)        Canadian grass genera: Keys and descriptions in English and French from         an automated data bank. Can. J. Bot., 64, 53-70.                                                                                                           Wilson, J.B. and Partridge, T.R. (1986) Interactive plant identification.            Taxon, 35, 1-12.                                                                                                                                           Woolley, J.B. Stone, N.D. (1987) Application of artificial intelligence to           systematics: SYSTEX, a prototype expert system for species                      identification. Syst. Zool., 36, 248-267.                                                                                                                  Zo, Z. (1982) The sequential taxonomic key: An application to some copepod           genera. Hydrobiologia, 96, 9-14.                                           *****************************************************************************   SUMMARY. An executable program (TAXOKEY.EXE) is described for use as a          universal key in the identification of plant and animal species by IBM-         compatible personal computers. Keys are edited in a word processor or text      editor and saved as DOS text files. Only a few simple rules must be followed    to ensure that TAXOKEY.EXE can use a text file as the database for a            particular taxonomic key. Keys can be dichotomous or with multiple choices at   a branch node. The text comprising a choice can be from one to several lines    and these can be placed anywhere on the computer screen as specified in the     DOS text file. Bit-mapped graphic pictures optionally can be viewed with the    program to illustrate the keys. PC Paintbrush *.PCX files (ZSoft or Windows     system accessories) that are saved in monochrome or 16 colors can be converted  with another program (PCX.EXE) into graphic binary files compatible with        TAXOKEY.EXE. A third program (TAXO-CK.EXE) is used to check a key's text file   for errors in the addresses of the choices which must be corrected with a word  processor or TAXO-ED.EXE (a specialized text editor). A second text file may    be searched for additional information such as species descriptions, notes and  references. The forward and backward paths to the user's present location       within a key are remembered by the program so that navigation is easy and       automatic. Two sample keys are available with the program from J. A. Byers:     (1) European Bark Beetles (Coleoptera: Scolytidae) (Grne, 1979) and (2)        Grasshoppers of Colorado (Orthoptera: Acrididae) (Capinera & Sechrist, 1982).                                                                                   ******************************************************************************  John Byers has a Ph.D. in entomology from the University of California at       Berkeley. He currently is a hgskolelektor (associate professor) in the         Department of Plant Protection, Chemical Ecology, Swedish University of         Agricultural Sciences, S-230 53 Alnarp, Sweden. His interests include chemical  ecology of bark beetles and computer simulation of ecological and behavioral    mechanisms.                                                                     *****************************************************************************   ******************************************************************************                                                                                  APPENDIX 1 - GRAPHICS (Help section as in program: PCX.EXE)                                                                                                     There are several difficulties with converting .PCX image files to those        compatible with QuickBASIC. First of all there are several versions of .PCX     made by several commercial programs (Windows Paintbrush; Paint; Corel Draw 3    etc.; Graphic Workshop; among many more). Not all .PCX files are made the same  way and some commercial programs do not understand .PCX files made by others.   For example, a 256 color .PCX made by Windows 3.1 Paintbrush is apparently not  compatible with Corel Draw 3.0 nor GWS.EXE (Graphic Workshop). However, most    16 color .PCX files are compatible among these programs. I did find that        saving a 256 color picture in Windows Paintbrush in the .BMP format and         converting this in Corel Draw 3.0 or GWS seems to work. PCX.EXE seems           compatible with any .PCX converted by GWS.EXE in file formats .BMP, .GIF, etc.                                                                                  Notes on .PCX image format:                                                                                                                                     In the first 128 bytes of a .PCX file, called the header, the version is given  in the second byte. Also in the header, beginning at byte 17 and for the next   48 bytes, the Palette colors are given for older .PCX versions (EGA and some    VGA with 16 colors). If there are 256 colors in the .PCX image, then the        palette is given in the last 768 bytes of the file. In all .PCX files, after    byte 128 the image data is given and it can be coded in several ways. It can    be in 4 planes and 1 bit/pixel/plane (for EGA, 640x350, Screen 9 in BASIC and   VGA, 640x480, Screen 12 in BASIC) or in 1 plane with 8 bits/pixel (VGA,         320x200, Screen 13 BASIC). The bits and planes are given in the header at byte  4 and byte 66, respectively. Depending on these values, two methods of image    decoding are used by PCX.EXE.                                                                                                                                   Notes on BASIC image format:                                                                                                                                    The BSAVE command that is used to make the BASIC images does not save the       palette of a BASIC or .PCX image, only the color attributes (16 only in EGA     SCREEN 9 or VGA SCREEN 12) are saved. This is why some images that are loaded   and look natural, suddenly change to unnatural colors when reassigned the 16    default colors for the 16 attributes. Using the PALETTE command in BASIC, the   16 attributes can be assigned any of 256K possible colors (that is 64*64*64 =   262144 colors). These palette colors are held by .PCX files in the header or    at the end of the file. When BASIC uses the BLOAD command to load BSAVED        images, there is no palette information so BASIC assigns default colors to the  16 or 256 attributes. BASIC images can show the correct colors (256K colors)    if the palette command is given for each attribute color (16 or 256). The       BSAVE and BLOAD commands can only work with 64K bytes of data, thus, a 640 x    350 EGA screen (224000 pixels, SCREEN 9) requires two files *.A9 and *.B9.  A   640 x 480 VGA screen (307200 pixels, SCREEN 12) takes three files *.A12,        *.B12, and *.C12 to hold the information on disk. Only one file, *.A13, is      needed for a 320x200 VGA (SCREEN 13) image. There are no more screens in        QuickBASIC of better resolution or colors. The palette information in .PCX      files can be saved in a text file so that TAXOKEY or other compiled programs    using BASIC code can reset the default palette to the original .PCX image       palette. Thus, the files with the same parent name and ending in .9P (EGA       640x350, 16 colors of 64 possible (0-63), .12P (VGA 640x480, 16 colors of 256K  possible where # = 65536 * blue + 256 * green + red) and .13P (VGA 320x200,     256 colors of 256K possible where # = 65536 * blue + 256 * green + red) have    the .PCX palette. TAXOKEY does not require a .9P, .12P or .13P file but if one  exists in the directory for the current image then the palette is changed. If   you temporarily remove the FIELD95.13P file from the Bark Beetle directory,     the image will be shown in the default colors (nearly impossible to see me      anymore), while with this palette file the picture looks rather nice (if I      don't say so myself), especially from across the room. It is not advised to     use SCREEN 13 images with text overlaid in TAXOKEY due to the large letters     and fewer lines. If you must use SCREEN 13 pictures with text overlaid then     keep the text lines shorter than 32 characters. Also, HELP text (pressing       [F1]) will not function from these screens, nor is it allowed to exit the       program here with [Esc]. It is best to use SCREEN 13 images (like FIELD95.A13   = FIELD95.ZIP) for extra illustrations using the [TAB] key (read the paper in   TAXOKEY [F5] for details).                                                                                                                                      The BASIC images (.A9 and .B9), (.A12, .B12 and .C12), or (.A13) saved by       PCX.EXE as well as the .9P, .12P or .13P file for the particular palette can    be used in BASIC programs by modifying the following code:                      'at start of QuickBASIC program                                                 DECLARE SUB loadpic (pic$, a2%())                                               pic$ = "field95.A13"     'lets use screen 13 for the image                      'pic$ = "cont.A9"        'but screen 9 also works                               'pic$ = "F5.A12"         'or screen 12, always beginning with .A                REDIM a2%(32004)             'if screen 13 then use .13P below                  CALL loadpic(pic$, a2%())    'call a subroutine                                                                                                                 'this is the subroutine                                                         SUB loadpic (pic$, a2%())                                                       IF RIGHT$(pic$, 1) = "9" THEN scr = 9                                           IF RIGHT$(pic$, 2) = "12" THEN scr = 12                                         IF RIGHT$(pic$, 2) = "13" THEN scr = 13                                         SCREEN scr                                                                      GOSUB paloff                                                                    IF scr > 11 THEN nmx$ = LEFT$(pic$, LEN(pic$) - 4)                              IF scr = 9 THEN nmx$ = LEFT$(pic$, LEN(pic$) - 3)                               CLS                                                                             IF scr = 9 THEN SCREEN 7: PALETTE: SCREEN 9                                     GJ = FREEFILE: VT% = 0                                                          OPEN nmx$ + ".13P" FOR RANDOM AS #GJ                                            IF LOF(GJ) > 0 THEN                                                             CLOSE #GJ: OPEN nmx$ + ".13P" FOR INPUT AS #GJ                                  WHILE EOF(GJ) = 0                                                               INPUT #GJ, CL&                                                                  IF scr = 9 THEN PALETTE VT%, CL&                                                IF scr > 11 THEN                                                                OUT &H3C8, VT%                                                                  BLUE% = CL& \ 65536                                                             GREEN% = (CL& - BLUE% * 65536) \ 256                                            RED% = (CL& - BLUE% * 65536) - GREEN% * 256                                     OUT &H3C9, RED%: OUT &H3C9, GREEN%: OUT &H3C9, BLUE%                            END IF                                                                          VT% = VT% + 1                                                                   WEND: CLOSE #GJ                                                                 ELSE                                                                            CLOSE #GJ: KILL nmx$ + ".13P" : nopal = 1                                       END IF                                                                          DEF SEG = VARSEG(a2%(0))                                                        ui = VARPTR(a2%(0))                                                             IF scr = 9 THEN                                                                 BLOAD nmx$ + ".A9" , ui: PUT (0, 0), a2%, PSET                                  BLOAD nmx$ + ".B9" , ui: PUT (0, 175), a2%, PSET                                END IF                                                                          IF scr = 12 THEN                                                                BLOAD nmx$ + ".A12" , ui: PUT (0, 0), a2%, PSET                                 BLOAD nmx$ + ".B12" , ui: PUT (0, 160), a2%, PSET                               BLOAD nmx$ + ".C12" , ui: PUT (0, 320), a2%, PSET                               END IF                                                                          IF scr = 13 THEN                                                                BLOAD nmx$ + ".A13" , ui: PUT (0, 0), a2%, PSET                                 END IF                                                                          IF nopal = 1 THEN PALETTE: nopal = 0: 'reset                                    EXIT SUB                                                                        paloff:                                                                         'so can't see picture until all loaded                                          RED% = 0: GREEN% = 0: BLUE% = 0                                                 FOR w% = 0 TO 15                                                                OUT &H3C8, w%                                                                   OUT &H3C9, RED%: OUT &H3C9, GREEN%: OUT &H3C9, BLUE%                            NEXT                                                                            RETURN                                                                          END SUB                                                                         'this is the end of the subroutine                                                                                                                              If you use the above code in any program you publish, please reference my       paper below and refer to this program (PCX.EXE).                                                                                                                Byers, J.A. 1996. TAXOKEY: A universal taxonomic key program using DOS text          files and graphics. Computer Applications in the Biosciences 12:185-189.      It is also quite complicated to convert BASIC images, from within a BASIC       program to .PCX images, but after quite a bit of effort I have managed to make  code that should work to capture a SCREEN 9, 12 or 13 BASIC image in .PCX       format and include the correct PALETTE of the BASIC SCREEN image. To see the    code press [F10] while in the program PCX.EXE. Then you can press [F5] (while   in PCX.EXE) to get a text file of the code in the file: QB2PCX.                                                                                                 .PCX images greater than 640x350 (EGA), 640x480 (VGA) or 320x200 (VGA 256       color) will only load the upper left part. You must scale and/or crop the .PCX  image with a shareware program (see below) prior to conversion. You may scale   the image, however, (i.e. reduce its size) in PCX.EXE.                          .PCX images can be converted to many other image formats like .GIF by many      shareware programs, for example: ALCHEMY (see Wegner, T. 1995. Image Lab.       Waite Group press, Corte Madera, CA.) or GWS (Graphic Workshop), also Corel     Draw 3.0 etc. and Windows Paintbrush.                                              UPDATES and General scientific software on Internet at:                         http://alyssum.stud.slu.se:8001/~johnb/software.html                                                                                                            Program software (C) 1996 by:                                                   John A. Byers                                                                   Department of Plant Protection                                                  Swedish University of Agricultural Sciences                                     230 53 Alnarp                                                                   SWEDEN                                                                          