***************************************************************************** This document is intended to supplement the MS-DOS KERMIT Users Guide. It is the documentation for the extended DEC Rainbow version of MS-KERMIT. ***************************************************************************** By David L. Knoell, Basic American Food Company Vacaville, CA 95696 (707-446-2200) 1.11. DEC Rainbow Command Extensions and Enhancements SET TERMINAL Syntax: SET TERMINAL parameter [value] This command was not implemented on V 2.29 of the DEC Rainbow MS-KERMIT, so there should be no conflict with previous versions. The DEC Rainbow has most of the SET TERMINAL parameters implemented via SET-UP mode and therefore available to the software through non-volatile memory. Parameters set through the standard DEC Rainbow SET-UP are honored in Kermit; and therefore, those functions are not duplicated in the SET TERMINAL command. The first group of parameters sets the terminal type to be emulated. This only determines the "answer-back" generated in response to a "who/what are you?" command from the host. The following sequences are recognized: Parameter Response Sequence Special Status --------- ----------------- -------------- NONE [?6c VT102-d HEATH-19 /Z VT52-h VT100 [?4;2c VT100 VT102 [?6c VT102 VT125 [?12;7;1c VT125 VT220 [?62;1;2;8c VT220 VT52 /Z VT52 **note- The terminal emulation software depends on the built-in firmware VT102/VT52 emulation to perform much but not all of the work. The above settings do not influence how transmitted/received sequences are parsed or responded to. The setting of the ANSI/VT52 firmware switch (via SET-UP or host software) is the controlling factor. These parameters have been provided primarily so that host software (VAX/VMS for example) will receive the response it needs. The tables in the modules MSXRB1x and MSYRB1x can be expanded to provide additional selections. The remaining SET TERMINAL parameters specify various operating modes within which you run the basic VT1XX/VT2XX emulator. AUTO-XON {ON, OFF} Sends a X-ON to the host when re-CONNECTing after once having escaped back to the "Kermit-MS>" prompt. This function is useful, since the serial buffers are cleared and reset during an escape back to kermit prompt level. Default is OFF. Tested and used with VAX/VMS system software. EIGHTBIT-MODE {ON, OFF} Enables transmission/receipt of true 8-bit characters while in terminal emulation mode. This is essential when supporting devices such as the DEC's LN03 laser printer using the DEC multi-national character set. The host system software should be made compatible with this function, for example: under VAX/VMS the command "$ SET TERMINAL/EIGHTBIT", should be used or else the terminal driver in VMS will strip/clear the eighth bit. There is no effect during file transfers since Kermit-MS knows when it's in transfer or terminal mode. Default is OFF. FUNCTION-KEYS {VT102, VT220} Set to VT102 (Default) the Rainbow's F11,F12,F13 keys transmit a (ESC), (BS),(LF) respectively. When set to VT220 they transmit and respond as VT220 level 2 (true VT220) keys and transmit the function key sequence normal for keys on the top row (ie. [Pn~ where Pn is 23 for F11,24 for F12, and 25 for F13). The fact that both key definitions can co-exist even though the firmware does not support it, is accomplished with software within the emulator. This software is also used by the SET KEY function so that those three keys can actually have six different definitions. See Appendix B for the scan codes to use. LINE-MONITOR {ON, OFF} Sets the printer port to loop-back to the serial port when set ON. This function is very similar to a set-up function found in a VT240 called "Printer-to-Host". When set ON the interrupt service routines in the emulator handle the printer port interrupts as well as those from the serial port. In previous versions the interrupts from the printer port were passed back to MS-DOS for processing by the original interrupt service routines and still are, if this function is OFF (Default). There are no restrictions on using this setting even when doing a screen dump to printer or auto-print (print characters as they are received). When used in conjunction with the ANSI "printer-controller on" and MONITOR-MODE the Rainbow Kermit emulator becomes completly passive. In other words, data from the serial port is routed unparsed and untouched to the printer port while data received from the printer port (actually another serial port) is routed to the COMM serial port. When MONITOR-MODE is ON the traffic is displayed on the Rainbow's screen for review. The device on the printer port does not have to be a printer, in fact it could be another computer. The emulator currently supports X-ON/X-OFF from the printer port device only and the baud rate / parity settings are supported via SET-UP or SETPORT. The emulater has a 1K buffer for input but does not support X-ON/X-OFF flow control to the printer port. (note-MONITOR-MODE is a new Kermit Special function.) MONITOR-STYLE {PRINTABLE, VIDEO} Determines how control characters will be displayed when the emulator is placed in MONITOR-MODE. The default is VIDEO which displays carriage return, line feed, horz tab, vert tab, new line, and form feed as single characters from the VT100 special line drawing character set. The PRINTABLE parameter uses standard 2 or 3 character sequences enclosed in angle brackets "<>" (eg. , etc.). SAVE-SCREEN {ON, OFF} Determines the action taken when the screen is re-sized from 80 to 132 characters or 132 to 80 characters. If set ON, then the text currently visible on the screen is restored after the re-sizing. If OFF, then the DEC standard of clearing the screen and homing the cursor is done. The Default is OFF. This function does not operate when the screen size is changed via the firmware-driven SET-UP screen. It operates only during a software "SET/RESET SEQUENCE ([?3h or [?3l)" or via a special-function assigned to a key. SPECIAL-FUNCTIONS {ENABLED, DISABLED} ENABLEs (Default) the hard-coded Kermit special functions assigned to fixed keys. Example: Prev Screen key scrolls back one page in video memory. If DISABLED, all fixed key assignments are removed and the normal sequence for the key is transmitted. See the section on kermit special functions on how to assign the functions to keys. NEW and ENHANCED FEATURES 1.11.1 Keyboard Key Translations There are now 4 levels of key translations supported in this version of the emulator. The Function keys (grey) can be assigned (with some exceptions) to all 4 levels at the same time; however, only the highest level definition currently defined is translated. Level 1 is the highest level. ASCII SPECIAL LEVEL TYPE of ASSIGNMENT Strings FUNCTIONS Comments ----- ----------------------- ------- --------- --------------------- 1 VT220 User Defined Keys YES NO Down-line loaded 2 Interactive "Hot Keys" YES YES In CONNECT mode 3 Kermit SET KEY type YES YES Kermit command level 4 Kermit pre-assigned NO YES Hard-coded in program Level 1: VT220 UDK's Since these key definitions are loaded via host driven software they are given the highest priority. See the section on VT220 User Defined Keys for a full discussion. Also Appendix A. Level 2: Interactive "Hot Keys" Any key (except Hold screen and Set-up) can be defined or re-defined during CONNECT mode. The key can be assigned either to an Ascii string (255 characters max) or to a Special Function. In fact the key definition routines are themselves available as Special Functions. You can also cancel the current definition by assigning the key to an ascii string of null length. The routine provides menus and prompts so the process of defining a key is easy. The definitions are only valid for a given Kermit session, ie: if you exit to DOS they are lost. To make the assignment semi-permanent you can assign the keys via the SET KEY function in a KERMIT.INI file which is processed when you activate Kermit. Level 3: Kermit SET KEY This standard Kermit command has been enhanced to enable Special Functions to be assigned to keys. The scan code used indicates to the emulator that the definition is not an ascii string but rather a Special Function. You can calculate the Special Function scan code to be used by simply adding 4096 (decimal) to the scan code generated via the SHOW KEY command. Appendix B gives a complete list of all scan codes generated on a DEC Rainbow. When Kermit prompts for the key definition you simply supply the octal code assigned to each Special Function (\xxx where xxx is a 3-digit octal number). These octal numbers are assigned in sequence and as new functions are added they simply increase the number of valid functions available. Appendix C gives a list of vaild functions currently implemented. Level 4: Kermit pre-assigned Functions For compatibility with previous versions of MS-KERMIT these functions are currently hard-coded in the program as before. In addition several new functions have been added to the hard-coded list. Interactive HELP "Show all Keys" provides a seperate section in the display for these key definitions. Appendix D also gives a current list. Please note that you can "turn off" these pre-assigned function definitions via the "SET TERM SPECIAL-FUNCTIONS DISABLE" Kermit command. 1.11.2 VT220 User Defined Keys (UDK's) The User Defined Keys feature of the VT220 has been implemented with extensions. You do not have to be in VT220 mode for these keys to be down-loaded or used. A standard VT220 allows the keys F6 through F20 (including Help and Do) to be programmable via the DECUDK device control strings. They are invoked by typing the SHIFT-(function key). This implementation allows both the shift and also the un-shifted function keys to be downline loaded. In addition the editing keys (Find,Insert Here,Remove,Select,Prev Screen,Next Screen) may also be defined (both shifted and un-shifted). Please note that this is not DEC standard; so use with caution. The clear and lock parameters have also been implemented and all sequences work as described in the VT220 Programmer Reference Manual (pg 4-37 thru 4-41) EK-VT220-RM-001. DECUDK Device Control String Format DCS Pc;Pl | Ky1/st1;ky2/st2;......kyn/stn ST Where: DCS is the Control String Introducer (90 hex in 8-bit) or (P in 7-bit) Pc is Clear Parameter (0 or none clear all keys before loading) (1 load new key values,clear old only if defined) Pl is Lock Parameter (0 or none lock against future redefinition) (1 do not lock against future redefinition) | Vert Bar Final character - characters between this character and the string terminator (ST) will be parsed by the emulator for definitions. Ky1 is a key code to be defined (see list below) / is a ascii slash used as a seperator St1 is a string of hex pairs which are the encoded contents of the key ; is a ascii semi-colon used to seperate multiple key definitions ST is the ansi String Terminator (9c hex in 8-bit) or (\ in 7-bit) More information can be found in the VT220 Programmers Reference Manual mentioned above and by looking at the sample VAX Basic program provided in Appendix A. The following list of Key codes provides information on the extensions made to the standard VT220 codes. Leading zeros are required as the key code must be 2 ascii digits. In coding the Hex pairs you may use both upper and lower case alpha characters for the hex digits A-F (a-f). EXAMPLES: (a) To clear keys send the following string: 0;1| (b) To lock keys send the following string: 1;0| (c) To define key Shift/F20 as the string "PRINT" without clearing or locking any other keys you would: (1) Convert the text to Hex pairs: P = 50 hex R = 52 hex I = 49 hex N = 4E or 4e hex T = 54 hex (2) Compose the entire control sequence as follows: 8-bit mode - 1;1|34/5052494E54 7-bit mode - P1;1|34/5052494E54\ *note-the 34 preceeding the / is the UDK key code found in the following table Table of Key Codes for Use in Defining UDK's -------------------------------------------- (shifted) (un-shifted) KEY NAME KEY CODE KEY CODE -------------- -------- -------- F6-Interrupt 17 * 57 F7-Resume 18 * 58 F8-Cancel 19 * 59 F9-Main Screen 20 * 60 F10-Exit 21 * 61 F11-(ESC) - VT220 only 23 * 63 | active only if F12-(BS) - VT220 only 24 * 64 | FUNCTION-KEYS VT220 F13-(LF) - VT220 only 25 * 65 | has been set F14-Addtnl Options 26 * 66 F15-Help 28 * 68 F16-Do 29 * 69 F17- 31 * 71 F18- 32 * 72 F19- 33 * 73 F20- 34 * 74 Find 01 41 Insert Here 02 42 Remove 03 43 Select 04 44 Prev Screen 05 45 Next Screen 06 46 (ESC) - VT100 only 07 47 | active only if (BS) - VT100 only 08 48 | FUNCTION-KEYS VT100 (LF) - VT100 only 09 49 | has been set * Indicates standard VT220 code. All others should be considered extentions. ----------The leading zeros in the Key Code (if any) are required------------ note- the VT100 only keys and the VT220 only keys can always be loaded regardless of the "SET TERMINAL FUNCTION-KEYS" setting. 1.11.3 Special Kermit Functions The following section describes the Kermit Special Functions currently available in this version of the emulator. The octal code (\xxx) assigned to each function is given. Many of the routines come in three versions: toggle, turn on, and turn off. They are grouped here by type of function and therefore the octol codes are not in sequence. Appendix C gives a complete list in numerical sequence. ------ SCREEN MANAGEMENT (SCROLL) ROUTINES \002 View Prev Screen (Scroll) | Go back one screen if possible \003 View Next Screen (Scroll) | Go forward one screen if possible \004 View Prev Line (Scroll) | Go back a single line if possible \005 View Next Line (Scroll) | Go forward a single line if possible \006 View Screen Bottom | Re-position screen at last recvd char ------ KERMIT SET TERMINAL ROUTINES \020 Toggle Eight-bit Mode | \021 Turn on Eight-bit Mode | same as SET TERMINAL EIGHTBIT-MODE \022 Turn off Eight-bit Mode | \026 Toggle Save Screen (80/132) | \027 Turn on Save Screen (80/132) | same as SET TERMINAL SAVE-SCREEN \030 Turn off Save Screen (80/132) | \101 Toggle Line Monitor Mode | \102 Turn on Line Monitor Mode | same as SET TERMINAL LINE-MONITOR \103 Turn off Line Monitor Mode | \105 Toggle Special Functions | \106 Special Functions Disabled | same as SET TERMINAL SPECIAL-FUNCTIONS \107 Special Functions Enabled | \110 Toggle Function Key Mode | \111 Set Function Keys to VT220 | same as SET TERMINAL FUNCTION-KEYS \112 Set Function Keys to VT100 | ------ PRINT AND DUMP ROUTINES \000 Print Screen | Current full screen only \114 Print Screen + Memory | As above + to end of scroll memory \001 Dump Screen to Disk | Similar to Print Screen but to disk \113 Dump Screen + Memory to Disk | As above + to end of scroll memory \011 Print Current Line | Print line which has cursor on it \012 Toggle Print Recv Char | Send received characters to \013 Turn on Print Recv Char | the printer just as received \014 Turn off Print Recv Char | with no editing \015 Toggle Media Copy | Similar to ANSI Media Copy - Printer \016 Turn on Media Copy | Controller on/off however if turned on \017 Turn off Media Copy | with this rtn then must turn off too. \023 Toggle Auto-print | Simulates ?5i (on); ?4i (off) \024 Turn on Auto-print | If on, then print each line as cursor is \025 Turn off Auto-print | about to move to next line. ------ CONNECT MODE INTERACTIVE ROUTINES \007 Send Break | 275 ms Break \010 Send Break (long) | 2000 ms Break (2 sec) \031 Toggle Monitor Mode (debug) | Monitor mode (Debug) shows transmitted \032 Turn on Monitor Mode (debug) | and received characters and escapes. \033 Turn off Monitor Mode (debug) | Rcvd=norm video;Xmit=rev video \061 Connect mode Help (menu) | Allows selection of functions below: \070 Define Hot Key - Spl Function | Set any key to a special function \071 Define Hot Key - Ascii String | Set any key to an Ascii string (255 max) \072 Show all Key Definitions | See definitions in priority sequence \073 Show Special Status | View current emulator status/settings \104 Show Diagnostics & Internals | Current internal variables shown \062 Kermit Close (Prompt) | same as hitting kermit escape-char + C \063 Kermit Command Menu | same as hitting kermit escape-char + ? \064 Kermit Push to DOS | same as hitting kermit escape-char + P \065 Kermit Quit Logging | if logging and on: then quits log \066 Kermit Resume Logging | if logging and off: then resumes log \067 Kermit Exit to MS-DOS | simulates a escape-char + c + exit + cr \074 Kermit Status | same as hitting kermit escape-char + S \075 Hold-Screen (soft) Xon/Xoff | Simulates hold screen w/xon/xoff + Lite \076 Toggle the UDK Lock | Allows the UDK lock to be set/reset \077 Turn on (Lock) the UDK's | externally (as in a VT220 set-up) \100 Turn off (Unlock) the UDK's | current setting on special status \115 Toggle Loop-Back Mode | This is same as doing both a line- \116 Turn on Loop-Back Mode | monitor and Media copy (printer \117 Turn off Loop-Back Mode | controller) at same time. ------ RAINBOW SET-UP ROUTINES \034 Toggle Screen Size (80/132) | \035 Set Screen to 80 cols | Same as SET-UP except it honors the \036 Set Screen to 132 cols | Save-Screen setting \037 Toggle Smooth Scroll | \040 Turn on Smooth Scroll | Same as SET-UP uses ANSI set/reset \041 Turn off Smooth Scroll | \042 Toggle Screen Background | \043 Screen Background Light | Same as SET-UP uses ANSI set/reset \044 Screen Background Dark | \045 Toggle Auto-repeat keys | \046 Turn on Auto-repeat keys | Same as SET-UP uses ANSI set/reset \047 Turn off Auto-repeat keys | \050 Toggle US/UK Char Set | \051 Set US as Char Set | Same as SET-UP uses ANSI set/reset \052 Set UK as Char Set | Does not change current only default \053 Toggle Auto-wrap | \054 Turn on Auto-wrap | Same as SET-UP uses ANSI set/reset \055 Turn off Auto-wrap | \056 Toggle New-line Mode | \057 Turn on New-line Mode | Same as SET-UP uses ANSI set/reset \060 Turn off New-line Mode | \122 Toggle Cursor Style (Und/Blk) | \123 Set Cursor Style to Block | Same as SET-UP direct firmware set \124 Set Cursor Style to Underline | ------ RAW FILE (ASCII) TRANSMIT FUNCTIONS \120 Transmit File (Kermit.xmt) | file is opened and sent to serial port | just as though it was keyed in. Note- | this procedure will honor the setting | of the Kermit EOF flag. If set to ctrl | Z it will stop when found, else entire | file is sent. The user may key a ctrl | X to abort the transmission. \121 Set File Name for Raw Transmit | same as function from main help menu 1.11.4 Video Scroll Buffer Management The scroll buffer routines have been extensively re-worked and several features and improvements have been made. SIZE The maximum size of the video buffers has been increased to 20 pages. That works out to 480 lines of up to 132 characters of text. The memory is allocated on a line by line basis and required changes to the memory allocation portion of 2.29 kermit. This is caused by the fact that on a Rainbow a line of text can be 132 characters long, which is not a multiple of a MS-DOS paragraph (16 bytes). In order to maximize the screen memory available, the characters (text) are kept separate from the video attributes and have a separate segment address. This allows 64K for text and 64K for attribute storage yielding 480 lines of screen memory. SPEED Direct transfers from Video Memory to the scroll buffers has been implemented. This saves an extra transfer through an intermediate memory buffer. The direct transfer is used only during normal receive character processing, not for scroll-back processing. ATTRIBUTES This implementation provides for line attribute control as well as character video attributes. This is done by temporarily storing the line attribute in the high nibble of the first character of a line's video attribute. The line attribute uses only 3 bits and the character attribute uses only the low order 4 bits. ACCURACY Every attempt has been made to maintain the accuracy of the video scroll-back memory. If you scroll back and then a character is received from the host the emulator restores the screen to the proper place before putting the received character to the screen. Split screen (scrolling regions) are also handled as well as the origin mode (absolute vs. relative). BUGS The Rainbows hardware and firmware are very complex and a number of bugs in v2.29 were located and fixed. Smooth scroll coupled with auto-wrap was one problem which has been corrected. Apparently smooth scroll affects the ability of the firmware to maintain its wrap-pending flag accurately if the previous line is still moving when a new line tries to auto-wrap. The symptom of this problem is that multiple duplicate top lines are saved into scroll memory and several (more at slow scroll, less at fast scroll) characters which should have wrapped are lost. Protection has also been added so the scroll-back routines don't try to display lines they don't have. 1.11.5 Printer and Dump Support Complete support for all printer port functions has been included in this version of the emulator. The emulator now performs all of the same functions available through the Rainbow's "Terminal Mode" emulator. This includes support for the "PRINT EXTENT" and "PRINT TERM CHAR" which are settable via SET-UP or through host software (Ansi SET/RESET sequences). In addition, the emulator also supports the VT100 line drawing character set so that garbage does not get sent to the printer port. The method of implementation is the same as provided by DEC in the firmware's terminal emulation mode. It has been tested using video line monitors attached to the Rainbow's printer port. Video attributes are also processed so the net result is an accurate representation of what was on the screen at the time of the print/dump request. The Rainbow emulator assumes that the device attached to the printer port is a DEC compatible printer and issues the appropiate Ansi/DEC escape and control sequences. For printers, the video attributes of bold and underline will come out if the printer supports them. The reverse and blinking attributes, as well as the line attributes (double hi/wide), are also sent; however, most printers just ignore them. The screen dump to disk utilities have been integrated with the printer port support so that the same results are obtained. Dumping a complex screen to disk and then "playing it back" via the MS-DOS type command yields an exact duplicate of the original screen. The following VT100 Ansi compatible sequences are supported: Name Mnemonic Sequence ---- -------- -------- Print form feed on DECPFF [?18h Print form feed off DECPFF [?18l Print extent (Full screen) DECPEX [?19h Print extent (Scrolling region) DECPEX [?19l Media copy (Enter auto print) MC [?5i Media Copy (Exit auto print) MC [?4i Media Copy (Enter printer controller) MC [5i Media Copy (Exit printer controller) MC [4i Media Copy (Print screen) MC [i or [1i Media Copy (Print cursor line) MC [?i or [?1i notes: 1. The DECPFF and DECPEX sequences are used in MC (Print Screen) only. 2. Except for using DECPFF and DECPEX the Kermit Special Function "\000 Print Screen" is the same as MC (Print screen). 3. Kermit Special Function "\023,\024,\025 Auto-print" duplicate the Ansi compatible MC (Enter/Exit auto print) sequences. 4. Kermit Special Function "\011 Print Current Line" is the same as the Media Copy (Print cursor line). 5. Kermit Special Functions "\015,\016,\017 Media Copy" are similar to the Media Copy (Enter/Exit printer controller). The one difference is that if you use the Kermit function to "Enter", you must also use it to "Exit" printer controller mode. This is to allow all characters (including a possible Media Copy (exit printer controller) sequence) to be routed to the printer port. The Kermit Special Function "Media Copy" can be used to turn off a host generated media copy (enter printer controller) sequence. 6. Auto-print means that the line will be printed immediately before the cursor moves off the current line. 7. Printer-controller means that all characters (except x-on/x-off,nulls, DEL's, and [?4i MC (exit printer controller)) will be passed without interpretation to the printer port. 1.11.6 Connect Mode Interactive Help The general form of this routine is a menu which allows a selection of five different functions. Each function is a completly independent routine which can be assigned individually to a key if desired. All routines overlay the top 15 lines of the current video display in reverse video and completly restore them when finished. The bottom line is always high-lighted and contains instructions for the current function. 1. display...... M A I N H E L P M E N U Select a Function: ----> Show all Key Definitions Set Interactive Hot Key to Special Function Set Interactive Hot Key to an Ascii String Show Special Interactive Status Show Kermit Diagnostics and Internals Set File Name for Raw Transmit -------------------------------------------------------------------------------