File MSR232.UPD MS DOS KERMIT 11 December 1988 (See below about version 2.32/A, 22 Jan 89) Changes between MS Kermit version 2.31 (1 July 1988) and 2.32 (11 Dec 1988) --------------------------------------------------------------------------- General: - Show current Kermit Connect mode escape character in main HELP display rather than just the default Control-]. - Add copyright notice display as a reminder that Kermit-MS is not in the Public Domain yet it may be distributed at no cost. - Ensure the received file display shows 100% done when the whole file has arrived, whether or not the remote system tells us the file is a different size. This reassures users even though a remote host may have told MS Kermit a file size based on its own file system rather than on MS DOS. - Fix Tektronix emulation in Victor 9000 version, which reportedly has not worked right since 2.29 release. Computing free disk space, as either SPACE command or during file reception: - Account for file destinations of screen and printer when checking for sufficient disk space while receiving files. Correct bug of using incorrect disk when checking space available. - When computing free disk space allow extra large disk partitions (greater than 32MB) such as now supported by DOS 4.0. - The test for available disk space when receiving files with attributes packets inflated the disk space rather than the file size. Revised to proper form: inflate file size by 17/16, decline file if not enough disk space. Additionally, the disk is sought from DOS internal information, rather than from the filename string, so that bridged or joined disks can be used effectively in the space computation (uses the fundamental device rather than a pseudo device letter created by utilities). Thanks to Henrik Levkowetz for this as well as the IBM-PC Ungermann Bass material. Improved handling of Control-Z during file transfers: - Include special handling for files destined for the printer to compensate for DOS's refusal to send Control-Z to a printer. Under the default and normal case of SET EOF NOCTRL-Z the Control-Z is converted to a space; SET EOF CTRL-Z lets the output buffer be terminated by DOS. Subsequent output buffers will be handled similarly. - Let SET EOF {Ctrl-Z | Noctrl-Z} end of file test apply to TRANSMIT command. SET EOF Ctrl-Z now ends the file when a Control-Z is read. Scripts, Take file, Macro enhancements: - See the IBM-PC section for new host-reachable macros for those machines. - Allow TRANSMIT command prompt be a literal ascii character or a \number. - Apply control SET INPUT ECHO {ON | OFF} to script OUTPUT command so when OFF the OUTPUT command will not read and display characters from the serial port as helpful echos. When SET INPUT ECHO is ON, OUTPUT reads and displays arriving characters until 10 milliseconds elapse with no new character. With SET INPUT ECHO OFF, all new host material remains stored in the serial port (or network) buffer for reading by later commands, such as CONNECT. INPUT and REINPUT can read the echos; scripts should be checked if this causes unexpected results. - Detect and prevent collisions between macros and active Take file buffers; they share some work space. Messages are shown when the space is exhausted. - Correct bug requiring spaces after formal labels. - Supress "?Timeout" message while in a Take file or macro. - Allow strings in curly braces {a string} to be used as a "word" when passing words as arguments to a macro. Example: Kermit-MS> DEFINE testing echo \%1 and \%2 Kermit-MS> testing One Two Three One and Two Kermit-MS> testing {Hello ladies} gentlemen. Hello ladies and gentlemen. Variable \%1 becomes a string rather than the normal first word after the name of macro testing. \%1 becomes "Hello ladies" and \%2 "gentlemen." - Fix bug in finding labels in scripts, as in the commands GOTO end :end1 commands :end could let label ":end1" be jumped to by mistake if ":end1" appeared first. A note on the label in a GOTO phrase. The label can be a variable name, which is immediately replaced by the definition string. The target label, however, is not expanded by presence of variable names. Thus, GOTO lab\%b is replaced by GOTO lab and can be used to select labels based on earlier text held in a variable. - Three new commands are added for scripts. ASK ASK displays the indicated prompt and reads a line of text from the key board (or pipe if redirected) and stores it in the selected macro or variable. A variable (form of \%character) is the more useful of the two. The line is echoed and may be edited the same way as a Kermit command line. If a comma is entered it is stored in numerical form, \{44}, so that it is not mistaken for a command separator but is still a comma when the string is sent or used in other ways. IF [NOT] EQUAL word1 word2 command The two words are compared for the same spelling, and optionally the same case if SET INPUT CASE is set to OBSERVE, and if they match the following Kermit command is executed. Modifier NOT may be used to invert the sense of the test. Substitution variables may be used in this IF command, but if the variable's definition is more than one word it may confuse the testing; i.e., Kermit-MS> ask \%a Enter your name: Enter your name: my name is Chris Kermit-MS> if equal \%a Chris goto welcome is immediately expanded to Kermit-MS> if equal my name is Chris Chris goto welcome and fails because the words being compared are "my" and "name", and the command becomes "is Chris Chris goto welcome". If either word is stated as @filespec then the first word of the file is read and used as the test word; this is useful for some username/password automation in scripts. If the file starts with @filespec the process nests to the final file. ASSIGN macro-name definition-string ASSIGN is just like the normal DEFINE command, except that when a substitution variable name occurs in the definition-string field the variable is replaced with its ultimate definition. DEFINE stores the variable name instead. Example: DEFINE \%a an example DEFINE test echo this is \%a Here macro "test" has a definition string of "echo this is \%a" ASSIGN test2 echo this is \%a which is immediately expanded to read ASSIGN test2 echo this is an example and thus macro "test2" has a definition of "echo this is an example" The effect of ASSIGN can be thought of as a copy command when we use it as ASSIGN \%t \%a i.e., variable \%t is given the current definition string of variable \%a. Whereas DEFINE \%t \%a defines \%t as the string "\%a" - Hint on passing Batch file arguments to Kermit variables: Suppose file test.bat holds the line Kermit define \%%1 %1, define \%%a %2, stay Invoking the Batch file by C> test one two results in creating Kermit variables \%1 with definition of "one" and \%a with definition "two". The doubled percent symbols in the Batch file are needed to compensate for one of them being consumed by the DOS Batch processor. %1 is the first Batch argument word, %2 is the second word. The syntax \%%1 is converted by Batch to be \%1 when seen by Kermit, without further substitution by Batch. - Hint on dynamically controlling scripts from the keyboard. set alarm 1 ; alarm goes true 1 second from now pause 1 ; exits prematurely if any key is pressed if alarm goto nextlabel ; alarm becomes true if no key was pressed set input case ignore ; upper and lower cases are the same now ask \%r Continue or Exit [C/E]? ; get user input to macro \%r if equal \%r e stop ; if E stop the script :nextlabel ; do the rest of script The command Set Alarm acts as a watchdog timer. Pause will exit early if a key is pressed (or was in the typeahead buffer of DOS) and thus when the script tests the alarm with "If Alarm" it finds the test condition false. The Ask command solicits directions as a letter and the If Equal command checks the letter. If no key were typed Pause would use all the alarm time and the query section would be skipped. Thanks to Mark Zinzow for this clever technique. Server related enhancements: - Add command SET SERVER TIMEOUT to control the time between NAKs sent by the server while waiting for a request. 0 means wait forever, if necessary, without NAKs. This latter case is especially useful when Kermit connects to a computer data-switch which retains a connection if there is any traffic within a few minutes; 0 prevents the Kermit server from unnecessarily stimulating such switches. - Add new command REMOTE LOGIN {username {password {account}}}. All three items may contain embedded spaces and Kermit non-editing characters. Username may be on the same line as REMOTE LOGIN; otherwise, it will be requested by a prompt. Password and account are always solicted via prompts. A carriage return response corresponds to an empty entry. REMOTE LOGIN applies only to a remote Kermit server and not to a remote operating system; an MS Kermit server does not understand the command. - Allow password for REMOTE CWD command to contain embedded spaces and other Kermit non-editing characters. General file transfer improvements: - Fix a bug that has existed since 2.31, in which use of the SET SEND TIMEOUT command would cause misinterpretation of certain Send-Init parameters, sometimes resulting in incorrect decoding of file data (e.g. #M#J could appear in files). - Correct long standing problem of local 8-bit quoting requirement not following current operating conditions. - Change formatted file transfer screen line from "Last warning" to "Last message". - Allow dollar signs in received error messages. - Accept any character, except the start of packet character, in the End of Line position of a packet. - Display messages in ACK packets, permit interspersed 'M' message packets. ---------------------------------------------------------------------------- Items specific to IBM-PCs at this time. - Supress Hangup message while in a Take file or macro. - Separate the comma on German keyboard keypads from the regular comma, for SET KEY definitions. Serial port and networking details: - Revise printing strategy within Connect mode to buffer 132 characters and to send XOFF/XON to the host while the buffer is written to DOS. This helps prevent serial port overruns noted with slow PCs at high baud rates when the printer is attached to a network which may keep interrupts off for significant periods of time. - Allow NULL bytes to be observed when DEBUG is ON. - Correct bug clearing VT102 Connect mode tab stops by CLEAR command. - Ungermann Bass Net One support had two fatal bugs, now fixed. - The Bios in some machines objected to the stray interrupt generated when Kermit disconnected from the serial port. Fixed. Also solves problem of an earlier task, such as Smartcom II or PC-Talk III, forgetting to replace the serial port interrupt it borrowed and causing a crash during Kermit operations. The problem evidently was from the MS Basic compiler. - A serial port with COM2 addressing (port 02E8H, IRQ 3) placed in the COM1 Bios data area, such as happens with some PC jrs, could not be found. Corrected to switch to COM2 addressing if the Bios data area for COM1 is 02E8H. COM1 is normally port 03F8H and IRQ 4. - Preserve the parity found in the serial port UART chip around Kermit operations. Kermit itself performs parity in software and operates the UART in no parity mode (N,8,1). Preservation of the hardware parity restores it for other uses of the port outside of Kermit. In particular, COM1 is set up when Kermit initializes. If COM1 were used for a serial printer with Even parity, for example, and COM2 for communications then preservation restores COM1 to Even parity when Kermit is not using it. Terminal emulator improvements: - New command SET TERMINAL CLEAR-SCREEN clears old startup screen by doing a terminal reset (same as verb \Kreset, ALT-=). SET TERMINAL conditions are preserved; these are the analogue of a VT102's setup values. - Express many tab stops easily by adding the optional syntax SET TERMINAL TABS AT : and SET TERMINAL TABS CLEAR AT : Example: set terminal tabs at 1:8 sets tab stops in columns 1, 9, 17, 25, ... up to column 132. The rule is place a tab in the "start-column", add "spacing" value, insert next tab, add "spacing" value, insert next tab, etc up to column 132. The VT102 emulator starts with tabs in column 9, 17, 25, ... (9:8); having a tab in column 1 does nothing. Thus, 1:8 and 9:8 are effectively the same. - Support the Tseng Labs MultiPAK display adapter, a monochrome/Hercules type, for switching between 80 and 132 column modes. The user needs to have run Tseng Labs program BIGSCR /R:25, or equivalent, before starting Kermit. Kermit will then use the board as a monochrome text and Hercules graphics device. Although the board also supports 28 and 44 screen lines Kermit cannot discover this fact and thus uses only 25 lines (the /R:25 item). Thanks are due to Tseng Labs for generously supporting this addition. - Try harder to discover the natural screen coloring for terminal emulator use when Kermit is started with a cleared (usually black) background screen yet DOS text is written with a colored background. This happens frequently when Kermit follows programs which do not restore coloring across the whole screen. The emulator will now assume the colors of the written characters rather than those directly under the cursor at Kermit startup. - Make the VT102 screen be scrolled into the roll back buffer when a screen clear escape sequence arrives (ESC [ 2 J). This preserves screens otherwise cleared and rewritten by many mainframe utilities (such as VMS Mail). Thanks to David Lassner for this neat suggestion. - Correct small problem selecting Block or Underline cursors in the VT102 emulator. - Permit the Transparent Printing escape sequences ESC [ 5 i and ESC [ 4 i (on and off, resp.) to contain additional numerical arguments with semicolons. Arguments are applied in the order encountered, after the full escape sequence has been read. Thanks to Dale McElroy of Boeing Computer for pointing out the problem in sufficient detail. - Absorb without action the escape sequences ESC * char, ESC + char, and ESC in the VT102 emulator. Thanks to Terry Kennedy. Major enhancements to the VT102 emulator for multi-lingual support: - Add SET TERMINAL DIRECTION {LEFT-TO-RIGHT | RIGHT-TO-LEFT} to support right to left screen writing while in Connect mode; for national language support. The cursor does not move when changing writing direction. Thanks to Baruch Cochavy, IIT, Haifa, Israel, for inventing this material. - Add SET TERMINAL CHARACTER-SET ALTERNATE-ROM to map accent grave and the lower case letters to be national characters in the IBM video adapter. That is, character codes of 60h to 7Ah (accent grave, lower case a-z) are mapped to codes 80h to 9Ah. Thanks again to Baruch Cochavy. This makes these high bit characters available by active user selection, or by reception of the escape sequences below to associate them with one of the two VT102 character set pointers called G0 (normal) and G1 (alternate). ESC ( 1 G0 points to the national characters above ESC ) 1 G1 points to the national characters above The related escape sequences below are extracted from the MS Kermit manual: ESC ( A G0 points to UK symbols (ASCII with Pound Sterling sign) ESC ) A G1 points to UK symbols ESC ( B G0 points to ASCII symbols (ASCII with US pound sign #) ESC ) B G1 points to ASCII symbols ESC ( 0 G0 points to special (line drawing) graphics ESC ) 0 G1 points to special (line drawing) graphics ESC ( 2 G0 points to alt char ROM - US symbols ESC ) 2 G1 points to alt char ROM - US symbols Arrival of Control-O selects the G0 set (default) and Control-N the G1 set. The other two choices for this command remain US-ASCII and UK-ASCII. - Add two special Macro names TERMINALR and TERMINALS which can be invoked within the VT102 emulator by reception from the host of ESC [ ? 34 h (invokes macro TERMINALS) ESC [ ? 34 l (lower case L, invokes macro TERMINALR) and/or by using new keyboard "verbs" (not preassigned to keys) \Kterminals (invokes macro TERMINALS) \Kterminalr (invokes macro TERMINALR) When these macros are invoked within the terminal emulator and if they are defined then Connect mode is exited and the macro is executed. There is no automatic return to Connect mode at the completion of the macro. If the macro is not defined then Connect is not exited and nothing happens. Initially neither macro is defined. If a return to Connect mode is desired then include CONNECT in the macro. Any legal action is permitted in these macros, including invoking other macros and Take files. The purpose of these two names and macros is to allow a host or the local user to interactively select two local operations while within the terminal emulator, such as changing language specific setups or other desirable things, which are much more involved than an existing keyboard verb. There is no restriction on what the macros may do since Kermit is then operating not in Connect mode but at the Kermit command prompt level, as it is for other macros. The escape sequences above are a Kermit specific extensions of Digital Equipment Corporation's private escape sequences to set and reset modes; hence the letters S and R in the macro names. - One suggestion for employing SET TERM DIRECTION, SET TERM CHARACTER, and the macros TERMINALR and TERMINALS to facilitate mixed Hebrew and English communications is the simple Take file below: File Hebrew.tak - ----------------- ; Define macros hebrew and english to do all the work def hebrew set term dir right, set term char alt, hkey, comkey def english set term dir left, set term char us, set key clear, comkey ; Define host-reachable macros for on the fly changes while ; staying in the emulator def terminalr english,connect def terminals hebrew, connect ; Define IBM-PC F1 key as switch to English, F2 as switch to Hebrew. ; Done here to be remembered despite SET KEY CLEAR in macro English. ; F1 and F2 thus are user-level commands during emulation. def comkey set k \315 \Kterminalr,set k \316 \Kterminals ; Define SET KEYs for Hebrew keyboard layout via macro hkey def hkey set k \x27 \x2c,set k \x2c \x9a,set k . \x95,set k / \x2e,- set k \x3b \x93,set k \x60 \x3b,set k a \x99,set k b \x90, hkey1 def hkey1 set k c \x81,set k d \x82,set k e \x97,set k f \x8b,set k g \x92,- set k h \x89,set k i \x8f,set k k \x87,set k l \x8c,set k m \x8a, hkey2 def hkey2 set k m \x96,set k n \x8e,set k o \x8d,set k p \x94,set k q /,- set k r \x98,set k s \x83,set k t \x80,set k u \x85,set k v \x84, hkey3 def hkey3 set k x \x91,set k y \x88,set k z \x86 ----------------- After TAKE HEBREW.TAK, one may switch Connect mode language support between Hebrew (right to left, national display characters, similarly translate outgoing keyboard characters) and English by stating a single keyword at the Kermit prompt Hebrew or English or Terminals or Terminalr (respectively) or while within Connect mode by pushing the F1 or F2 keys (in this example), or by reception of ESC [ ? 34 h or l from the host. All the work is done from memory material and is essentially instantaneous. Clearly, other languages can utilize these tools. MS Kermit 2.31 allows macro names to be used the same way as predefined Kermit key words, by omitting the leading word DO in "DO macro-name." Joe R. Doupnik jrd@cc.usu.edu, jrd@usu.Bitnet, usu::jrd.SPAN Dept of Electrical Engineering Utah State University Logan, Utah 84322 (801) 750-2982 work ----------------------------------------------------------------------------- Changes from MS Kermit 2.32 to 2.32/A, 21 Jan 1989 Items common to all machines supported by MS Kermit - 1. Correct a problem negotiating 8-bit prefixing when MS Kermit is operating with parity of NONE yet the other side requests that such quoting be done. Version 2.32 had a problem and would receive the 8-bit quoting character "&" as ordinary text and hence produce a corrupted file. Setting parity to SPACE on the PC with version 2.32 might be a suitable workaround. 2. Correct ENABLE/DISABLE MESSAGE commands to work properly. Previously the sense was inverted and the command applied to SEND rather than MESSAGE. 3. Formally decode messages in ACKs to data or filename packets before displaying them. 4. Add analysis of prompt text in the ASK command so that \number forms are converted to binary before displaying the prompt. This makes the prompt field behave the same as in the ordinary SET PROMPT command. A dollar sign will terminate the text string for either command. Example: ASK \%1 \27[31mEnter password\27[37m 5. Correct small textual errors in the SET command main help screen. 6. Allow command REMOTE MESSAGE to use three character text messages. Items specific to the IBM-PC version of MS Kermit - 7. Delay accessing a communications port until the port is actually needed. This prevents the automatic probing of COM1 at Kermit startup, even before file mskermit.ini or equivalent is read. COM1 remains the default port unless another is selected by a SET PORT command. The effect of this change is transparent except where Kermit has been operated under a multi-tasking Environment such as Concurrent-DOS, Desqview, DoubleDos, or MS Windows. These situations have experienced difficulty when a second copy of Kermit is started while the first copy is actively using COM1; the disturbance is created when COM1 is prepared for use as part of the Kermit startup process. The present change prevents this disturbance by selecting but not touching a port until a Kermit command requires it. Note that STATUS, SHOW COMMUNICATIONS, SHOW MODEM, SET BAUD, SET SPEED, and SET PORT commands do access the selected port for information; to avoid possible interference between users of COM1 perform the desired SET PORT command to select and initialize another port before using these latter commands. 8. Add several small improvements to video screen support for the VT102 terminal emulator when Video 7 boards are used. Preserve 43 line mode whenever possible. Defeat 132 column mode for Video 7 VGA boards used with fixed frequency analogue displays (31.5KHz), such as the IBM 85xx series. Prevent using wrong display buffer address when an unknown proprietary video mode is encountered from many EGA and VGA style boards. 9. Put the VT102 screen into the rollback buffer when clearing the entire screen with any escape sequence combination. Partial screen erasures do not cause preservation in the rollback buffer. 10. Support character 9Bh, ANSI "CSI", as equivalent to reception of "ESC [" in the VT102 emulator. 11. Preserve character set pointers and related items in the VT102 emulator when the screen width is changed. 12. Avoid unnecessary flow control commands when Control-Print Screen is active. The files which have been changed since version 2.32 are MSSDEF.H new release ident and date MSSKER.ASM, MSSSEN.ASM, MSSSER.ASM, MSSSET.ASM, MSSTER.ASM and for IBM-PC's MSXIBM.ASM, MSYIBM.ASM, MSZIBM.ASM Joe Doupnik 22 Jan 1989 ----------------------------------------------------------------------------