home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / cpm86 / c86xap.txt < prev    next >
Text File  |  2020-01-01  |  6KB  |  143 lines

  1.         ** NOTES ON KERMIT-86 FOR THE NEC APC **
  2.  
  3. * Port selection *
  4.  
  5. Currently only the standard serial port is supported, and not the H14 auxiliary
  6. port.  The SET PORT command is not implemented.
  7.  
  8.  
  9. * Escaping from terminal mode *
  10.  
  11. While in Kermit's terminal emulation mode, local commands are initiated by a
  12. two-character sequence consisting of the "escape character" followed by one
  13. other character identifying the command.  (Make the second character a '?' to
  14. see a list of the valid commands.)  As distributed, the standard Kermit-86
  15. uses the control-backslash character as the escape character in terminal mode.
  16. The trouble is that the CP/M-86 BIOS in the APC ignores a keyboard entry of
  17. Control-\ (i.e. holding down the CTRL key while striking the '\' key), making
  18. it difficult (impossible) to use this method to get out of terminal mode.
  19.  
  20. One solution is to perform a "SET ESCAPE ^" command before entering terminal
  21. mode to change the escape character to a caret (or any other character the
  22. APC keyboard will generate).  This command could be placed in your KERMIT.INI
  23. file for automatic execution every time Kermit is started.
  24.  
  25. The simpler solution is to realize that the character code for a Control-\ is
  26. a hexadecimal 1C, and that this is the code generated by the INS key on the
  27. numeric keypad.  Once you can remember that every reference to Control-\
  28. should be interpreted as a reference to the INS key, this is actually easier
  29. to use than the two-key Control-\ sequence.
  30.  
  31.  
  32. * The DEL key *
  33.  
  34. In the standard CP/M-86 BIOS, the unshifted DEL key generates a Control-X
  35. character (hexadecimal 18).  This is the CP/M command to erase the current
  36. input line, and is very useful for local processing.  Most mainframes do not
  37. use the Control-X character at all, so it becomes much less useful during
  38. terminal emulation.  The DEL character (hexadecimal 7F), on the other hand,
  39. is often used by mainframes and can only be generated on the APC by holding
  40. down the SHIFT key while striking the DEL key (this capability is not mentioned
  41. anywhere in the documentation).
  42.  
  43. Because the Control-X character is so seldom used while the DEL character is
  44. commonly used, the initialization procedure in Kermit-86 modifies the CP/M-86
  45. BIOS so that the DEL key generates the DEL character whether shifted or not.
  46. Control-X can still be generated if necessary by holding down the CTRL key
  47. while striking the 'X' key.  The CP/M-86 BIOS is returned to its original state
  48. when Kermit terminates.
  49.  
  50.  
  51. * Terminal emulation *
  52.  
  53. The APC uses escape sequences which have been standardized by the American
  54. National Standards Institute (ANSI) to control cursor movement, screen erasing,
  55. and character attribute manipulation.  Perhaps the best-known other terminal
  56. which follows ANSI guidelines is the DEC VT100.  The APC only recognizes a few
  57. of the more important ANSI commands, and not the complete set which the VT100
  58. supports.
  59.  
  60. The ANSI/VT100 features that the NEC APC supports are:
  61.     direct cursor addressing (by row and column)
  62.     relative cursor addressing (up, down, left, right)
  63.     line erasing (cursor to end, beginning to cursor, entire line)
  64.     screen erasing (cursor to end, beginning to cursor, entire screen)
  65.     character attributes (underline, reverse video, blink, but not bold)
  66.  
  67. In addition, the first four grey function keys (unshifted) generate the escape
  68. sequences associated with PF1 through PF4 on the VT100 keyboard.  The arrow
  69. keys and numeric keypad DO NOT generate the corresponding VT100 sequences.
  70.  
  71. These functions are enough to support simple command line editing on most
  72. systems, and allow mailers or paged file display programs to clear the screen
  73. before each display.  Underlining and reverse video are also useful in some
  74. applications.  This is not enough to support the more sophisticated screen
  75. control required by screen editors such as EMACS or KED.  At present there
  76. are no plans to add these capabilities; you are welcome to do so.
  77.  
  78.  
  79. * The Home-cursor bug in CP/M-86 *
  80.  
  81. Due to a bug in the implementation of the CP/M-86 BIOS, the sequence ordinarily
  82. used to home the cursor (esc [ H) does not work correctly.  The following patch
  83. to the APC CPM.SYS will fix this bug.
  84.  
  85. This patch example is taken from CP/M-86 version 1.106.  The relevant patch
  86. addresses for 1.104 and 1.107 are also given.  This patch is to the ESCCUP0
  87. routine in the APC BIOS and the correct addresses can be obtained for any
  88. version by displaying the CBIOS.LST file that came with the CP/M-86 release
  89. and adding 80H (hex) to the addresses it shows for that routine.
  90.  
  91. As an elementary precaution, use a scratch disk for the initial modification
  92. and testing of the patch, and always leave the release disk in its original
  93. form.  In the DDT86 example that follows, your entry is indicated by square
  94. brackets [], but these should not be typed.
  95.  
  96.  
  97. A>[DDT86]
  98. DDT86 1.1
  99. -[RCPM.SYS]                ; Load the file to modify.
  100.   START     END
  101. 0800:0000 0800:6EFF
  102.  
  103. -[L3505]                ; List the beginning of ESCCUP0:
  104. 0800:3505 PUSH    SI            ;   the 'JNZ 3540' at location 3515
  105. 0800:3506 MOV    SI,5C68            ;   should actually read 'JA 3540'.
  106. 0800:3509 CMP    BYTE [5C67],00        ;
  107. 0800:350E JZ    3517            ; For version 1.104: [L3203]
  108. 0800:3510 CMP    BYTE [5C67],02        ;     version 1.107: [L366E]
  109. 0800:3515 JNZ    3540
  110. 0800:3517 MOV    AX,[SI]
  111. 0800:3519 CMP    AL,00
  112. 0800:351B JZ    3525
  113. 0800:351D SUB    AL,01
  114. 0800:351F CMP    AL,18
  115. 0800:3521 JB    3525
  116.  
  117. -[S3515]                ; For version 1.104: [S3213]
  118. 0800:3515  75  [77]            ;     version 1.107: [S367E]
  119. 0800:3516  29  [.]
  120.  
  121. -[L3505]                ; Verify the correction.
  122. 0800:3505 PUSH    SI
  123. 0800:3506 MOV    SI,5C68
  124. 0800:3509 CMP    BYTE [5C67],00
  125. 0800:350E JZ    3517
  126. 0800:3510 CMP    BYTE [5C67],02
  127. 0800:3515 JA    3540            ; This should be the only change.
  128. 0800:3517 MOV    AX,[SI]
  129. 0800:3519 CMP    AL,00
  130. 0800:351B JZ    3525
  131. 0800:351D SUB    AL,01
  132. 0800:351F CMP    AL,18
  133. 0800:3521 JB    3525
  134.  
  135. -[WCPM.SYS]                ; Save the file and exit with ^C.
  136. -^C
  137. A>
  138.  
  139.  
  140. Then reboot your system with the FNC, CTRL, and Break/Stop sequence to load
  141. the new version of CPM.  After you've tried out the new version and verified
  142. that it works, copy it to your working disks.
  143.