UPDATE# THE APC ESCAPE SEQUENCE The handling of the CSI ? 34 h / l escape sequences by the VT220 and VT320 terminal emulators changed between versions 3.12 and 3.13 in order to support Hebrew VT220/320/420 terminal emulation, and because DEC software such as DECforms expects to use these sequences to control screen-writing direction. Old way (described on pages 180-181 of "Using MS-DOS Kermit"): CSI ? 34 h / l invoked the TERMINALR and TERMINALS macros, if you had them defined. This required each Kermit user to define them, for example in their MSCUSTOM.INI files, a big management problem for large user communities. New way: CSI ? 34 h / l controls screen-writing direction, left-to-right or right-to-left (for Hebrew and Arabic), as it does on real Hebrew-model VT terminals (see Hebrew section above). To replace the TERMINALR/TERMINALS function, MS-DOS Kermit 3.13 now supports the Application Program Command (APC) escape sequence, which is accepted by MS-DOS Kermit 3.13's VT emulators, VT100 and above: APC ST In the 7-bit environment, APC is ESC _ and ST (string terminator) is ESC \. In the 8-bit environment, APC is decimal 159 and ST is 156 decimal. The can be any MS-DOS Kermit command or list of commands, separated by commas, and can be up to 1024 bytes in length. Upon receipt of this escape sequence, MS-DOS Kermit executes the command(s) in the string and then automatically resumes CONNECT mode. NOTE: In this respect, APC differs from the old TERMINALR/TERMINALS mechanism, which did NOT automatically re-enter CONNECT mode. Thus, if you are recycling your TERMINALR/TERMINALS macros for APC use, be sure to remove the ", connect" from the end of their definitions, or else you will have to escape back twice the next time you want the MS-Kermit> prompt. For safety, the APC mechanism cannot be used to invoke certain MS-DOS Kermit commands that might do damage, like deleting your files. Included in this category is the RUN command, which provides access to DOS and to other applications. This new MS-DOS Kermit command regulates the APC mechanism: SET TERMINAL APC { ON, OFF, UNCHECKED } ON (the default) means that Kermit will execute only safe commands. OFF means Kermit will not execute any commands and will ignore APCs. UNCHECKED means Kermit will execute ANY commands sent via APC. Use UNCHECKED at your own risk. APC is much more flexible than the old TERMINALS/TERMINALR mechanism, and can be used for any purpose at all. For example, it can be used to configure MS-DOS Kermit for use with a particular host or application by sending the appropriate list of SET commands: communication parameters like parity, protocol parameters like packet-length and window size, key mappings, etc. It can also be used to initiate file transfers automatically from the host without having to escape back to MS-DOS Kermit. Here's an example you can use with C-Kermit 5A. In your C-Kermit 5A customization file (.mykermrc or CKERMOD.INI), add commands like this: define autosend set delay 0, apc receive, send \%1 \%2, statistics define autoreceive apc {send \%1 \%2}, statistics Try it! Nothing special is required on the PC side. Note: The APC command is new to C-Kermit 5A(189); if you have an earlier release you can define APC as a macro: define apc output \27_\%1\27\92 You can set up similar procedures with IBM mainframe Kermit, e.g. in VM/CMS by stacking commands and using XECHO to emit the escape sequences. You can expand these commands to handle text and binary mode if you want to: ; Text transfers define tsend set del 0, set file type text, apc receive, send \%1, stat define treceive apc {set fil typ text, send \%1 \%2}, stat ; ; Binary transfers define bsend set del 0, set file type binary, apc receive, send \%1, stat define breceive apc {set fil typ binary, send \%1 \%2}, stat Use your imagination, the possibilities are endless! .