V T C A P Video Oriented TCAP Database Manager Version 1.0 - 08/21/87 Access Programming RAS - 14385 SW Walker Rd. B3 - Beaverton, OR 97006 T A B L E O F C O N T E N T S Introduction .................................... 3 Program Description ............................. 4 A - Add .................................... 5 D - Delete ................................. 5 H - Help ................................... 6 L - List ................................... 6 M - Merge .................................. 6 N - Next ................................... 7 P - Previous ............................... 7 S - Search ................................. 7 U - Update ................................. 8 Z - Z3 Load ................................ 8 X - Exit ................................... 8 Appendix A - TCAP File Description .............. 9 Appendix B - Program Listings ................... 12 Introduction VTCAP is a video oriented database manager designed specifically to manipulate the Terminal CAPabilities (TCAP) database. Currently, the only way to modify or add terminals to an existing TCAP is to edit the source code and reassemble the code. This is an unfair limitation to those whose abilities with assembler are limited or non-existant. Even those of us with assembler ability, must resort to 'patching' or re-assembling to just experiment with different terminal codes. As a sysop running ZCPR3/ZRDOS with BYE510 and PBBS, I was very interested in the growing support of TCAP. By giving the ordinary user a method with which to experiment with TCAP listings and add support for terminals of his choice, I hope to put TCAP support on more and more systems. The best way to accomplish this is to supply the user with software that will make supporting such ideas easier. VTCAP is just one of a few software packages available for this purpose. Other such programs now available, or currently under development are, PTCAP - TCAP installation package for PBBS systems AVAILABLE NOW VTCAP - TCAP database manager AVAILABLE NOW PCAP - Printer capabilities package UNDER DEVELOPMENT PLIB - Printer support library UNDER DEVELOPMENT GCAP - Graphics capabilities package UNDER DEVELOPMENT GLIB - Graphics support library UNDER DEVELOPMENT Future of VTCAP Support for both printer and graphics packages when released. Print function for hardcopy printout of individual terminal in database or a list of all terminals. Addition of a test module that displays the effects of the chosen display attributes Installation function that will actually install your selected TCAP in your system environment. V T C A P - T C A P M A N A G E R Program Description The basic function of this program is to provide the many users of the Z3 systems and Terminal CAPability files (TCAP's) a method to easily modify the TCAP files on their systems. TCAP Manager (VTCAP) gives you the following: 1. Add a terminal to the database 2. Delete a terminal 3. Search for a requested terminal 4. Scan forward or backward through the listings 5. Update the currently displayed terminal 6. List all of the terminals in the database 7. Merge two TCAP files 8. Switch between Z3TCAP files 9. Provides you with complete on-line help for all functions The distribution library file contains all of the files necessary to completely assemble and link VTCAP. This is a video oriented routine and requires certain information about your system. This program is offered into the public domain and may be redistributed without permission. VTCAP is the sole property of Access Programming RAS and cannot be sold seperately or packaged with products as an incentive to purchase without prior written permission from the author. Any suggestions or modifications should be directed to me personally at the system below. We will NOT support any modifications that have not been previously cleared through this system. Access Programming RAS 14385 SW Walker Rd. B3 Beaverton, OR 97006 Terry Pinto - Owner/SYSOP (503) 646-4937 VOICE (503) 644-0900 (300/1200 baud - 24 hours/day) ADD The add function will allow the user to add additional terminal listings to the database. When you enter the ADD mode, the data will be cleared from the display giving you a 'blank' record to work with. At this time you may enter the information. There are three types of fields in which you may enter data. The first of which is the fixed length string. The only field that uses this entry method is the terminal name. You are limited to entry of sixteen characters. If you make a mistake, you may use the backspace to reposition the cursor in the field. When entry is complete, press to terminate the field. This will automatically erase any characters to the right of the cursor effectively clearing the remainder of the field. The second type of entry is the single character. All of the arrow keys and screen delays are represented by this type. This field is automatically terminated when you enter a character and the cursor will be advanced to the next field. If you make a mistake, just use the arrow key to reposition the cursor. The third type is the variable length string. All of the screen control strings are formatted with this type of input. During input, you may use the backspace to correct mistakes. Pressing the key will terminate input of the field and advance to the next. To skip a field, just enter a carriage return. REMEMBER, THE ENTRY OF A CARRIAGE RETURN WILL ERASE THE REMAINDER OF THE FIELD. When you exit from the ADD mode, you will be prompted to enter a new version number. Use any two digit number in the following format. Version Number: 2.7 [major.minor] Anytime you make any changes to the database, increase the minor revision number by one. DELETE The delete function is a toggle and will allow you to 'mark' a record for deletion. When so marked, the data in the record will appear in the standout mode and the word 'DELETED' will appear at the top of the screen. Once a record has been marked for deletion, it may be reclaimed by using the same function. The first time the [D] is pressed, the record will be marked for deletion, the next time, it will be reinstated. The marked records are not deleted until you exit the database. At that time you will be prompted for a version number. Use the same proceedure as outlined above. HELP The help function will provide you with on-line help of all modes of operation in the program. By pressing [H], you can get the first of the HELP screens. This screen will present you with help on the command line syntax of the program. You may invoke most of the operations of the program from the ZCPR3 command line by specifing the appropriate option. All of the information you will need on how to accomplish this is displayed on this screen. At the bottom of the display, you will see a prompt to select the topic you wish help with. All of the topics are represented by a /o. To request help with a particular topic, just press the character after the /. For instance, the help function is shown as follows: /H - Help To select help with the help functions, just press H. If you press a key that is not supported, an error message will be displayed on the screen. When you select a topic, the information requested will be displayed on the last five lines of the display leaving the original help screen. These bottom five lines will act like a window displaying the required information when needed. To exit back to the database, just press [X]. LIST The list function will display all of the terminals currently in the database. They will be displayed in the order in which they appear in the file. Each screen will display up to eighty terminals in four columns of twenty. Any deleted terminals will be displayed in the standout mode. If there are eighty terminals or less you will see the entire database on one screen with the [Strike any key] prompt at the bottom. If there are more than eighty terminals, the display will pause at eighty and display the [more] prompt. Here you may press any key to see up to eighty more listings. MERGE This is a very powerful function. It will allow you to create a TCAP file containing all of the unique listings in two files. The two files being the default TCAP file (Z3TCAP.TCP) and the file specified on the command line or loaded with the 'Z' option within VTCAP. The two files are compared and all of the unique listings are written to an output file, Z3TCAPxx.TCP, where xx is the version number the user supplies at the beginning of the merge process. You will want to check over the listings very carefully as only the index name is compared. If someone changes the index name in one file, you will end up with two seperate listings for the same terminal. A good example of this is obtained by merging Z3TCAP23 with Z3TCAP20. The merge of these two files contain two listings each for the HEATH terminals, both Heath and ANSI modes. The listing for the General Terminal 100 is also duplicated. Careful checking of the output file is a small price to pay for the power of the merge function. You may always go in later with the delete mode and take care of any duplication. The merge process in very complex in nature and has been greatly simplified in the description above. See the description of the TCAP file and the technical description of the program modules in the appropriate appendicies for a more complete description of the operation of this and other functions. NEXT This function will reposition the database to the next record in the database. No index file is used therefore the stepping is done sequentially. The records are alphabetized and therefore should be in 'indexed' order. PREVIOUS This is the opposite of the above function and will position the database to the record before the one currently displayed. Again, the stepping is done sequentially through an alphabetized listing. SEARCH The search function is used to locate any desired entry in database. When entering the search mode, you will be prompted for the name of the terminal to search for. The program will determine between upper and lower case, so be exact when specifing the search criteria. APPLE /// is not the same as Apple /// If you request a name that is not in the database, you will be given an error message and, after a short delay, returned to the 'Enter Filename: ' prompt. If the search is sucessful, the search mode will be terminated and you will be returned to the command mode of VTCAP. The name entered must be identical to the name in the index section of the database (see the section on the description of the TCAP files). If you are unsure of the spelling or the way the terminal is described, use the list function to display the terminals in the database. Once you have located a terminal, you may scan through the database by using the [P]revious and [N]ext commands. UPDATE The update function is very similar in operation to the add function. Once you have selected the terminal you want to update, you select [U] and the cursor is placed on the first character of the first field in the record. The key will terminate field input and advance the cursor to the next field. All information to the right of the cursor, in the current field, will be lost when you terminate the field. To write the data to the database use '^W'. If you wish to abort the current update, press '^Q'. The update mode will not prompt for the entry of a version number. It is assumed that this mode will be used more for experimentation and correcting of typing errors and therefore will not require the generation of a higher version number. If you feel the need to issue a version number for an updated listing, you may rename the file externally. Z3 LOAD The Z3 Load function is used to exit one database and load another. You will be prompted for the name of the database you wish to read. DO NOT TYPE THE FILE EXTENT. All files should be of the form Z3TCAPxx, where xx is the version number of the file to be loaded. If you request a file that does not exist, you see an error message, and you will be returned to the 'Enter Filename: ' prompt allowing you to try agian. If your request is sucessful, you will be returned to the VTCAP command level. To cancel the filename entry, enter a carriage return and the default Z3TCAP file will be loaded. Exit This command is self explanitory. All open files will be closed, all disk housekeeping will be completed and you will be returned to the operating system level, exiting the program. Appendix A TCAP File Description To understand the operation of VTCAP, you must first understand the TCAP file and how it is constructed. The TCAP file consists of two sections, the index and the database. The index section contains the names of all of the terminals in the database. All sorting and searching is done relative to the names in the index section. Each terminal name is sixteen bytes in length and eight names will occupy one physical record in the file. If the terminal names do not completely fill the record, the remainder of the record will be filled with 0's. The terminal names are entered in the database in alphabetical order thus negating the need for elaborate index files. Each terminal name is padded with blanks to sixteen characters. The following will illustrate the construction of the index section of TCAP files. +---------------------------------------------+ +--------------+ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF 57 59 53 45 20 31 30 30 20 20 20 20 20 20 20 20 WYSE 100 58 65 72 6F 78 20 38 32 30 2D 49 20 20 20 20 20 Xerox 820-I 58 65 72 6F 78 20 38 32 30 2D 49 49 20 20 20 20 Xerox 820-II 58 65 72 6F 78 20 38 2D 31 36 20 20 20 20 20 20 Xerox 8-16 20 32 22 36 20 20 20 20 20 20 20 20 20 20 20 20 2.6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +---------------------------------------------+ +--------------+ Notice that each entry takes the entire sixteen bytes and that no terminator is used to indicate the end of the string. The last entry in the file is the index entry for the version number. It is recognized by the fact that the first character in the field is blank. This is the only record that begins with a blank character. The next three bytes denote the version number. The rest of that field is padded with blanks. The remainder of the physical record is filled with binary 0's. The first of these zero's serve as the string terminator for the index file. Thus the entire index file is treated as one long string terminated by a binary 0. The next section is the database. Each 128 byte physical record represents one terminal entry. The following field structure defines the database section. Terminal Name 16 bytes Up Arrow 1 byte Down Arrow 1 byte Left Arrow 1 byte Right Arrow 1 byte CLS Delay 1 byte DCA Delay 1 byte EOL Delay 1 byte Clear Screen Variable Length --+ Dir Cur Pstn Variable Length | Erase EOL Variable Length | Begin Standout Variable Length |--> Total =< 105 Bytes End Standout Variable Length | Terminal Init Variable Length | Term De-Init Variable Length --+ The terminal name is the only field that is NOT terminated by a binary 0. All other fields are terminated. If a series of zero's exist, eash will represent a field entry. The following example of the Televideo 950 terminal should help to clarify. 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF 54 56 49 39 35 30 20 20 20 20 20 20 20 20 20 20 TVI950 0B 16 0C 08 32 00 00 1B 2A 00 1B 3D 25 2B 20 25 ....2...*..=%+ % 2B 20 00 1B 74 00 1B 29 00 1B 28 00 00 00 00 00 + ..t..)..(..... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ The following should help to translate the code. 54 56 49 39 35 30 20 20 20 20 20 20 20 20 20 20 TVI950 T V I 9 5 0 0B 16 0C 08 32 00 00 1B 2A 00 1B 3D 25 2B 20 25 ....2...*..=%+ % | Arrows | |Delays| | CLS | | Direct Cursor ^K ^V ^L ^H |2ms dl| | ESC* | | ESC=%+ %+ +---------+ +------+ +------+ +---------------- 2B 20 00 1B 74 00 1B 29 00 1B 28 00 00 00 00 00 + ..t..)..(..... Addr | | EOL | |Beg SO| |End SO| TI TD | | ESCt | |ESC) | |ESC( | | +- No De-initialization -------+ +------+ +------+ +------+ +---- No Initialization The last database entry is the version number. One entire record is reserved for this entry. It appears the same as the index section entry. The first sixteen bytes are reserved for the 'name', which in this case will be the version number preceeded by one blank and padded to fill the sixteen byte name field. The rest of the record is filled with a binary 0. It is important to note that the first record in the data section always begins on a record boundary. This is important because it is the basis of the calculations used to position the record pointer within the database.