home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / beehive / program / ws4pat.arc / WS4PAT.INF < prev    next >
Encoding:
Text File  |  1991-08-11  |  6.3 KB  |  190 lines

  1.  
  2. This is the header section of WS4PAT.MAC.  The .HEX file is released
  3. today for your use and comments.  The source is not available yet.
  4.  
  5. I have been reading of the problems involving the ZCPR3 shell stack.
  6. This patch does not address that at all.  If we determine that WS4 
  7. could solve the problem itself, I will put the necessary code in the
  8. next WS4PAT.
  9.  
  10. ; Overlay: WS4PAT.MAC
  11. ; Author:  Joe Wright
  12. ; Date:    20 November 87
  13. ; Version: 1.0
  14.  
  15. VERS    EQU    10        ; Release
  16.  
  17. MONTH    EQU    11        ; November
  18. DAY    EQU    20        ; 20th
  19. YEAR    EQU    87        ; 1987
  20.  
  21. ; The purpose of this overlay is to provide a generic ZCPR3 version of
  22. ; WordStar which will not require specific terminal installation but will
  23. ; take its lead from the TCAP.  NZTCAP is expanded to include all (and more)
  24. ; that WordStar requires for its operation.
  25.  
  26. ; Based on PATCH.LST in the WordStar 4.0 release, this overlay installs
  27. ; all but Printer patches.  All new code is at EXTRA.  MORPAT and CRTPAT
  28. ; areas are unused and therefore still available for small patches.
  29.  
  30. ; Assemble WS4PAT.MAC to a .HEX file with SLRMAC and overlay your current
  31. ; WS.COM with it as follows:
  32.  
  33. ;    MLOAD WSZ.COM=WS.COM,WS4PAT.HEX
  34.  
  35. ; The overlay supports video attributes of the TeleVideo 955 and Wyse 60.
  36. ; It was tested only superficially for VT-100, using the Wyse 60 in VT-100
  37. ; emulation mode.
  38.  
  39. ; This overlay expects a ZCPR3 system with extended NZTCAP.  All the code
  40. ; at VIDATT: and EXTRA: is my own.  Before running WordStar with this
  41. ; overlay, you must create and install a NZTCAP for your terminal.  I have
  42. ; provided an example here for TeleVideo 955 and the file NZWYS60.MAC
  43. ; as prototypes for your NZTCAP.  If you run it with your normal TCAP,
  44. ; WordStar will not know how to do LINE INSERT and LINE DELETE functions
  45. ; and will slow a little and paint the screen more.
  46.  
  47. ;----------------------------------------------------
  48. ;
  49. ; NZCPR TERMINAL CAPABILITIES DATA
  50. ;  In order determine specific terminals without regard to the ascii name,
  51. ;  we now use the last byte of the name field as a 'type' byte.  Until now,
  52. ;  the types are assigned as follows:
  53. ;
  54. ;    ASCII types (0-15)
  55. ;
  56. ;    TeleVideo 955    00h
  57. ;    TeleVideo 925    01h
  58. ;    Wyse 60        02h
  59. ;    Wyse 50        03h
  60. ;
  61. ;    ANSI types (16-31)
  62. ;
  63. ;    VT-100        10h
  64. ;
  65. ; WS4PAT simply looks at bit 4 to determine ASCII or ANSI types.
  66. ;
  67. ;NZTCAP:
  68. ;    DB    'TVI-955        ' ; Name of terminal (Always 15 characters)
  69. ;    DB    0        ; ASCII type (TeleVideo 955)
  70. ;    DB    'K'-'@'        ; Cursor up
  71. ;    DB    'J'-'@'        ; Cursor down (re-programmed from ^V)
  72. ;    DB    'L'-'@'        ; Cursor right
  73. ;    DB    'H'-'@'        ; Cursor left
  74. ;    DB    0        ; CL delay
  75. ;    DB    0        ; CM delay
  76. ;    DB    0        ; CE delay
  77. ;    DB    ESC,'+',0    ; CL string        1st (NZTCAP+17H)
  78. ;    DB    ESC,'=%+ %+ ',0    ; CM string        2nd
  79. ;    DB    ESC,'T',0    ; CE string        3rd
  80. ;    DB    ESC,')',0    ; SO string        4th
  81. ;    DB    ESC,'(',0    ; SE string        5th
  82. ;    DB    0        ; TI string        6th
  83. ;    DB    0        ; TE string        7th
  84. ;
  85. ; Extensions to Standard Z3TCAP
  86. ;
  87. ;    DB    ESC,'R',0    ; Line Delete        8th
  88. ;    DB    ESC,'E',0    ; Line Insert        9th
  89. ;    DB    ESC,'G',0    ; Set Attributes    10th
  90. ;
  91. ;  FILL UNUSED SPACE WITH NULLS
  92. ;
  93. ;    REPT    128-($-NZTCAP)
  94. ;    DB    0
  95. ;     ENDM
  96. ;----------------------------------------------------
  97. ;
  98. ; WS4PAT will treat the full complement of TeleVideo functions and attributes.
  99. ; Any of the functions may be omitted (replaced with null) with the exception
  100. ; of the CM (Cursor Movement) string.  WordStar will work around any other
  101. ; missing capabilities if your particular terminal doesn't support them.
  102. ; The custom routine POSCUR uses WordStar's cursor position in HL and sends
  103. ; the expanded CM string to the terminal.
  104. ;
  105. ; The CM string in NZTCAP is a macro of sorts.  Characters in the string will
  106. ; be sent to the terminal as they appear.  The special case is the COMMAND
  107. ; lead-in character '%'.  The character following the '%' indicates the action
  108. ; required.  Nine commands are supported as follows:
  109. ;
  110. ;    %I        Increment Row/Col by 1 (before D, 2, 3 or .)
  111. ;    %D        Send Row/Col as one, two or three ascii digits
  112. ;    %2        Send Row/Col as two ascii digits
  113. ;    %3        Send Row/Col as three ascii digits
  114. ;    %.        Send Row/Col as binary
  115. ;
  116. ;    %R        Send Col before Row
  117. ;    %+        Add the next character to Row/Col and send it
  118. ;    %N        Send a NULL (00h)
  119. ;
  120. ;    \        Send the next character literally (except null)
  121. ;
  122. ; The %N command, new in NZTCAP, allows a null (00h) to be sent to the
  123. ; terminal (no nulls are allowed within CM strings).
  124. ;
  125. ; The \ command permits sending a literal % or \ to the terminal.
  126. ; Use '\%' to send the percent sign or '\\' to send backslant.
  127. ;
  128. ; These commands allow virtually any terminal to be supported by WordStar.
  129. ;
  130. ; The prototype TeleVideo command is  ESC = ROW COL  where row and col
  131. ; are biased by the space character (20h).  The CM string for this in
  132. ; assembly language:  1BH,'=%+ %+ ',0  or..
  133. ;
  134. ;    DB    1BH,'='        ; Lead-in string
  135. ;    DB    '%+ '        ; Send Row + 32
  136. ;    DB    '%+ '        ; Send Col + 32
  137. ;    DB    0        ; Terminate the string (not sent)
  138. ;
  139. ; The prototype ANSI (VT-100) command is  ESC [ ROW ; COL H  where row and
  140. ; col are ascii decimal digits beginning with 1 rather than 0.  The CM string
  141. ; for this is:  1BH,'[%I%D;%DH',0  or if you prefer..
  142. ;
  143. ;    DB    1BH,'['        ; Lead in string
  144. ;    DB    '%I'        ; Row/Col begin at 1 instead of 0
  145. ;    DB    '%D'        ; Send Row in decimal
  146. ;    DB    ';'        ; Send delimiter
  147. ;    DB    '%D'        ; Send Col in decimal
  148. ;    DB    'H'        ; Send trailing H
  149. ;    DB    0        ; Terminate the string (not sent)
  150. ;
  151. ; The Hazeltine 1500 is strange enough to demonstrate NZTCAP flexibility.
  152. ; The CM string is  7EH,11H,'%R%.%+ ',0  or..
  153. ;
  154. ;    DB    7EH,11H        ; Lead-in string
  155. ;    DB    '%R'        ; Reverse Row/Col
  156. ;    DB    '%.'        ; Send Col in binary
  157. ;    DB    '%+ '        ; Send Row + 32
  158. ;    DB    0        ; Terminate the string (not sent)
  159. ;
  160. ; In order to use this powerful parser for attribute strings as well as
  161. ; CM strings, enter PARSE with HL pointing to the first character of a
  162. ; null-terminated string and DE containing the value to be parsed.
  163. ; A complex VT-200 SGR string is prototyped as:
  164. ;
  165. ;SGR:    DB    ESC,'[%R%D;%Dm',0
  166. ;
  167. ; You would clear attributes with the following code.
  168. ;
  169. ;    LXI    H,SGR
  170. ;    LXI    D,0
  171. ;    CALL    PARSE
  172. ;    ...
  173. ;
  174. ; The resulting string to the terminal is:
  175. ;
  176. ;    ESC [ 0 ; 0 m
  177. ;
  178. ; To set the VT-200 to blinking:
  179. ;
  180. ;    LXI    H,SGR
  181. ;    LXI    D,4
  182. ;    CALL    PARSE
  183. ;
  184. ; The terminal gets:
  185. ;
  186. ;    ESC [ 0 ; 4 m
  187. ;
  188. ; End of WS4PAT.INF
  189.