TURBOCOMM A Terminal Emulation Program by Stew Stryker, RONNIE Support Group ------------------------------------------------------------------------------ DISCLAIMER The author and Digital Equipment Corp absolve themselves of any possible warranties as to the capabilities of this program, the contents of this document, and specifically disclaim any implied warranties of effectiveness. They shall not be liable for any lost profits, or for any claim or demand against them. The program is donated to the public domain, and as such should not be distributed for profit. The program is provided "as is" and no technical support by Digital or the author should be assumed. ------------------------------------------------------------------------------ INTRODUCTION This terminal emulation program was written entirely in MS-DOS Turbo Pascal (tm Borland International) for the DEC Rainbow. It's main purpose is to act as an example program showing how to use the MS-DOS communication library. Its secndary purpose is to provide support for ReGIS emulation in the Digital A-to-Z environ- ment. It requires MS-DOS 2.05 or greater to run. FEATURES Along with providing basic terminal emulation capabilities, this package supports: * User selection of baud rate on program startup * Directing characters received from the host to the local printer * Sending text files to the host computer * Receiving text files from the host computer * User selection of either VT2xx or VT102 emulation * Digital's A-to-Z video graphics requirements * ReGIS terminal emulation software * Terminal Identification inquiries * Full function key support * Commands to change Numeric Keypad mode * Terminal resets escape sequence trapping * Printer controller commands * Responding correctly to Printer Status Inquiries * The Break key EXPLANATION As someone has already pointed out to me, this is not a true VT200 emulator. That is, I didn't bother to implement the DRCS, UDKs, selective erase, and DA2 recognition. All I did really was: 1) have the default terminal identify itself as a VT220, instead of a VT102 (which I think is a closer match); 2) have the function keys F11 - F14 send out their respective escape sequences instead of Escape, Backspace, and Linefeed. If anyone knows the VT200 class terminals well enough (and really NEEDS the added capabilities) I'm willing to work with them to add the missing functionality, or they can add it themselves and send me a copy. DIRECTIONS STARTING THE PROGRAM: type: TC {T} {VT100} {baud rate} {@keyfilename} Command Line Options (all of which are optional) The 'T' indicates that you wish to go immediately into Terminal emulation mode, by-passing the initial help display. The default terminal emulation mode is a VT2xx. You may select VT102 emulation by typing 'VT100' in the command line. If your are running Poly-ReGIS when you begin your TurboComm session, your terminal type will automatically be set to VT125. Use this if you are logging onto a VAX running a version of VMS lower than 4.0, so that your terminal identifier will be understood. The 'baud rate' selects the baud rate you want the program to run at (which, of course, must be compatible with your modem or data line). The baud rate may be one of the following: 110 150 300 600 1200 2400 4800 9600 If no baud rate is selected, the program uses your default communications settings (established in the Rainbow Setup mode). When TurboComm starts, it will attempt to load a function key definition file called: TC.KEY. If no such file is found on the default disk, TurboComm will use the default function key definitions. You may instruct TurboComm to load a file with a different name by entering an @ sign, followed by the file's name (including pathname, not including the file type). The function key definition file's type must be ".KEY". For example, to start the program running at 1200 baud instead of your default baud rate, skipping over the initial display, and loading a special function key definition file from E:\COMMAND, type: TC T 1200 @E:\COMMAND\FKEY Running TurboComm The program first displays it's initial help information on how to use the function keys. At this point, you either press to enter terminal emulation mode, for more information, or to return to the operating system. TO USE THE FUNCTION KEYS ONCE YOU ARE IN TERMINAL EMULATION: All the function keys, except , and , will transmit their standard escape sequences to your host computer. will send a break signal for .25 seconds. puts you in command mode for a single command. dumps the screen image to the printer. toggles the printer on and off (like P). COMMAND MODE: From terminal emulation mode, press the  key, followed by the letter highlighted for the function you want: Close - If you are receiving a text file from the host computer, this will stop receiving the text, and close the file. When you've success- fully closed the file, your screen will flash. Disconnect - Drops the DTR signal to your modem, which will hang up your phone. Printer - Toggles sending the displayed text to your printer on and off. Quit - Disconnect and exit. Receive - Allows you to capture all characters from your host onto a file on your Rainbow. Send - Lets you send a text file from your Rainbow to your host computer. eXit - Ends running TurboComm. This does not drop your DTR signal, so that your modem may still be con- nected to your host computer. function key - Allows you to redefine most of the "grey" function keys. Type in your definition, and "save" it by pressing . Function definitions are automatically saved when you exit the program. If you type any other character, besides those listed above, a line of help text will be displayed. If you have redefined function keys, you will be asked if you wish to save their definitions when you exit TurboComm. You will also be prompted for the filename you wish to save them to. Again, you may specify a pathname, but not a file type. The file type must be ".KEY". TO COMPILE TURBOCOMM SOURCE CODE (You can run TC.COM directly, without recompiling the source code. If you want to modify the program yourself, you'll need these instructions.) First, you must break the library file, TC.LBR, into its separate files with the LU.EXE utility (not included). To break out all the components, type: LU A TC.LBR If you want to get at the source code, use USQ (not included) to get at the files. Otherwise, you can just begin the use TC.COM and TC.DOC as they are. Next, you will probably want to edit the main file (TC.PAS) to match the version of MS-DOS Turbo Pascal you're using. This was originally developed under Turbo Pascal version 2.0. At the last minute, my update to 3.0 arrived and I modified some of the procedures to take advantage of some new capabilities. Therefore some of the code requires Turbo Pascal 3.0 or greater. I did the only decent thing, and left the version 2.0 code in the program, but commented it out. If you're compiling with Turbo 3.0, you can compile this "as is" (Though you may want to remove the version 2.0 code altogether.) If you are still using Turbo 2.0, search through the source code in TC.PAS for all occurances of 'Turbo Pascal 3.0', and remove those routines. Then search for the sections marked with '< 3.0' and remove the comment marks ( {} ), to activate those functions. After you've created the version of TC.PAS you need, you simply compile it as you would any other Turbo Pascal program.