** NOTES ON KERMIT-86 FOR THE NEC APC ** * Port selection * Currently only the standard serial port is supported, and not the H14 auxiliary port. The SET PORT command is not implemented. * Escaping from terminal mode * While in Kermit's terminal emulation mode, local commands are initiated by a two-character sequence consisting of the "escape character" followed by one other character identifying the command. (Make the second character a '?' to see a list of the valid commands.) As distributed, the standard Kermit-86 uses the control-backslash character as the escape character in terminal mode. The trouble is that the CP/M-86 BIOS in the APC ignores a keyboard entry of Control-\ (i.e. holding down the CTRL key while striking the '\' key), making it difficult (impossible) to use this method to get out of terminal mode. One solution is to perform a "SET ESCAPE ^" command before entering terminal mode to change the escape character to a caret (or any other character the APC keyboard will generate). This command could be placed in your KERMIT.INI file for automatic execution every time Kermit is started. The simpler solution is to realize that the character code for a Control-\ is a hexadecimal 1C, and that this is the code generated by the INS key on the numeric keypad. Once you can remember that every reference to Control-\ should be interpreted as a reference to the INS key, this is actually easier to use than the two-key Control-\ sequence. * The DEL key * In the standard CP/M-86 BIOS, the unshifted DEL key generates a Control-X character (hexadecimal 18). This is the CP/M command to erase the current input line, and is very useful for local processing. Most mainframes do not use the Control-X character at all, so it becomes much less useful during terminal emulation. The DEL character (hexadecimal 7F), on the other hand, is often used by mainframes and can only be generated on the APC by holding down the SHIFT key while striking the DEL key (this capability is not mentioned anywhere in the documentation). Because the Control-X character is so seldom used while the DEL character is commonly used, the initialization procedure in Kermit-86 modifies the CP/M-86 BIOS so that the DEL key generates the DEL character whether shifted or not. Control-X can still be generated if necessary by holding down the CTRL key while striking the 'X' key. The CP/M-86 BIOS is returned to its original state when Kermit terminates. * Terminal emulation * The APC uses escape sequences which have been standardized by the American National Standards Institute (ANSI) to control cursor movement, screen erasing, and character attribute manipulation. Perhaps the best-known other terminal which follows ANSI guidelines is the DEC VT100. The APC only recognizes a few of the more important ANSI commands, and not the complete set which the VT100 supports. The ANSI/VT100 features that the NEC APC supports are: direct cursor addressing (by row and column) relative cursor addressing (up, down, left, right) line erasing (cursor to end, beginning to cursor, entire line) screen erasing (cursor to end, beginning to cursor, entire screen) character attributes (underline, reverse video, blink, but not bold) In addition, the first four grey function keys (unshifted) generate the escape sequences associated with PF1 through PF4 on the VT100 keyboard. The arrow keys and numeric keypad DO NOT generate the corresponding VT100 sequences. These functions are enough to support simple command line editing on most systems, and allow mailers or paged file display programs to clear the screen before each display. Underlining and reverse video are also useful in some applications. This is not enough to support the more sophisticated screen control required by screen editors such as EMACS or KED. At present there are no plans to add these capabilities; you are welcome to do so. * The Home-cursor bug in CP/M-86 * Due to a bug in the implementation of the CP/M-86 BIOS, the sequence ordinarily used to home the cursor (esc [ H) does not work correctly. The following patch to the APC CPM.SYS will fix this bug. This patch example is taken from CP/M-86 version 1.106. The relevant patch addresses for 1.104 and 1.107 are also given. This patch is to the ESCCUP0 routine in the APC BIOS and the correct addresses can be obtained for any version by displaying the CBIOS.LST file that came with the CP/M-86 release and adding 80H (hex) to the addresses it shows for that routine. As an elementary precaution, use a scratch disk for the initial modification and testing of the patch, and always leave the release disk in its original form. In the DDT86 example that follows, your entry is indicated by square brackets [], but these should not be typed. A>[DDT86] DDT86 1.1 -[RCPM.SYS] ; Load the file to modify. START END 0800:0000 0800:6EFF -[L3505] ; List the beginning of ESCCUP0: 0800:3505 PUSH SI ; the 'JNZ 3540' at location 3515 0800:3506 MOV SI,5C68 ; should actually read 'JA 3540'. 0800:3509 CMP BYTE [5C67],00 ; 0800:350E JZ 3517 ; For version 1.104: [L3203] 0800:3510 CMP BYTE [5C67],02 ; version 1.107: [L366E] 0800:3515 JNZ 3540 0800:3517 MOV AX,[SI] 0800:3519 CMP AL,00 0800:351B JZ 3525 0800:351D SUB AL,01 0800:351F CMP AL,18 0800:3521 JB 3525 -[S3515] ; For version 1.104: [S3213] 0800:3515 75 [77] ; version 1.107: [S367E] 0800:3516 29 [.] -[L3505] ; Verify the correction. 0800:3505 PUSH SI 0800:3506 MOV SI,5C68 0800:3509 CMP BYTE [5C67],00 0800:350E JZ 3517 0800:3510 CMP BYTE [5C67],02 0800:3515 JA 3540 ; This should be the only change. 0800:3517 MOV AX,[SI] 0800:3519 CMP AL,00 0800:351B JZ 3525 0800:351D SUB AL,01 0800:351F CMP AL,18 0800:3521 JB 3525 -[WCPM.SYS] ; Save the file and exit with ^C. -^C A> Then reboot your system with the FNC, CTRL, and Break/Stop sequence to load the new version of CPM. After you've tried out the new version and verified that it works, copy it to your working disks.