home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / zsus / z3help / y.lbr / VLIB1.HZP / VLIB1.HLP
Encoding:
Text File  |  1990-04-24  |  9.5 KB  |  276 lines

  1. :   ZCPR-3 Terminal Capabilities (TCAP) Extended Definition 
  2.  
  3.         as of 3 February 1990 (HFB+JWW)
  4.  
  5. The ZCPR-3 TCAP is a 128-byte area positioned immediately after
  6. the Environment Descriptor.  The configuration has been changed
  7. from the original descriptions contained in Richard Conn's book,
  8. "ZCPR3: The Manual."  The layout here is designed for backward
  9. compatibility with the original scheme while adding extensions
  10. to accommodate rudamentary business graphics and pull-down menus
  11. described in Dennis Wright's GRXLIB and portions of GRWLIB.
  12.  
  13. Offsets in this description are from the base of the Z3 TCAP.
  14.  
  15.  Offset     Item              Description 
  16.  
  17.   0     Terminal Name    13 characters, alphanumeric.  The first
  18.          character must NOT be a space.  (A leading space means
  19.          uninstalled TCAP.)  By convention, a terminal name is
  20.          unique in its first eight characters and the name
  21.          is terminated with a space.
  22.  
  23.   13     Offset to the GOELD entry
  24.  
  25.   14     High Terminal Characteristics (Bit 7 set (80h))
  26.  
  27.   15     Low Terminal Characteristics now defined as follows:
  28.  
  29.         B15 b0    Standout    0 = Dim, 1 = Reverse Video
  30.         B15 b1    Power Up    0 = None, 1 = 10-second delay
  31.         B15 b2    No Wrap        0 = Wrap, 1 = No Wrap
  32.         B15 b3    No Scroll    0 = Scroll, 1 = No Scroll
  33.         B15 b4    ANSI        0 = ASCII, 1 = ANSI
  34.  
  35. The following four bytes are for single-byte cursor movement
  36. codes FROM the terminal.  If your terminal has no independant
  37. cursor movement keys, or implements cursor movement with multi-
  38. byte sequences, use any convenient single-key sequence you
  39. desire.  The familiar WordStar "diamond" comprised of Control-E
  40. (Up), Control-X (Down), Control-D (Right) and Control-S (Left)
  41. is commonly used.
  42.  
  43.   16      Cursor Up    Cursor UP code from terminal (^E)
  44.   17      Cursor Dowm    Cursor DOWN code from terminal (^X)
  45.   18      Cursor Right    Cursor RIGHT code from terminal (^D)
  46.   19      Cursor Left    Cursor LEFT code from terminal (^S)
  47.  
  48. Some terminals need delays to perform certain functions.  This
  49. may be more important as interface speeds increase.  Delays are
  50. in milliseconds.  Consult your terminal manual for the correct
  51. values to insert.
  52.  
  53.   20      Clear Screen    Delay in milliseconds (0 to 255)
  54.   21      Move Cursor    Delay in milliseconds (0 to 255)
  55.   22      Clear to EOL    Delay in milliseconds (0 to 255)
  56. Beginning at Offset 23 from the beginning of the TCAP, a
  57. sequence of Null-terminated strings define the Command Strings
  58. needed to make the Terminal respond as desired.  If particular
  59. features are not implemented on nor needed by your terminal, a
  60. single Null (binary 0) disables that feature.  
  61.  
  62.   Clear Screen         (CL) - Clear Screen & Home Cursor
  63.  
  64.   Cursor Movement     (CM) - Parsed string for cursor posi-
  65.              tioning.  See ZCPR3, The Manual for details.  
  66.              "%N" string added to send Binary 0 to Terminal.
  67.  
  68.   Clear to End-of-Line     (CE) - Clear from Cursor Position to
  69.              the end of the current line.
  70.  
  71.   Standout Begin     (SO) - Enter Standout Mode
  72.              If terminal uses DIM or Reduced intensity, the 
  73.              Initialization string (TI below) should set to
  74.              reduced intensity, and this sets normal intensity.
  75.   Standout End             (SE) - End Standout Mode
  76.              If you use DIM or reduced intensity with normal
  77.              for "Standout", this restores the DIM mode.
  78.  
  79.   Initialize Terminal     (TI) - Initialize the terminal (see SO/SE above)
  80.  
  81.   De-initialize Term     (TE) - Restore Terminal to normal mode (see SO/SE)
  82.  
  83.   Delete Line         (LD) - Delete line on which the cursor resides
  84.              and move lines below it up.  Bottom line is blank.
  85.  
  86.   Insert Line         (LI) - Insert blank line before the one on which
  87.              the cursor positioned and move lines below down.
  88.  
  89.   Clear to EOS         (CD) - Clear screen from current cursor
  90.              position to the End-of-Screen.
  91.  
  92.   Set Attributes     (SA) - Set character attributes.
  93.  
  94.   Attributes         (AT) - Attribute characters for this terminal.
  95.              Usually Normal, Blink, Reverse and Underscore.
  96.  
  97.   Read Cursor Position  (RC) - Return Cursor in HL.
  98.   Read Terminal Line     (RL) - Return current Line.
  99.  
  100. The following definitions implement portions of the GRXLIB and
  101. GRWLIB functionality, but in different TCAP locations.
  102.  
  103.   Graphics Delay     (GOELD) - Delay for Graphics On/Off.  Use
  104.                 greater of the two delay times
  105.                 in milliseconds. Values of 0 to
  106.                 255 are acceptable
  107.   Graphics Mode On     (GO) - Set Terminal to Graphics Mode
  108.   End Graphics Mode     (GE) - Restore Terminal to normal
  109.                 Alphanumeric mode
  110.   Cursor Off         (CDO)- Disable Cursor display.  Needed
  111.                 for Pull Down Menus
  112.   Cursor On         (CDE)- Enable Cursor display.  Needed
  113.                 for Pull Down Menus
  114. Several graphics strings are needed to implement the desired
  115. level of functionality.  Each of these is needed in the
  116. specified order.  The terminal should first be placed in the
  117. graphics mode, then the desired string sent.  If strings for
  118. all terminals are only a single character, this may be reduced
  119. to a character array in the future.
  120.  
  121.   Upper-Left Corner     (GULC) - String for now
  122.   Upper-Right Corner     (GURC) -   "     "   "
  123.   Lower-Left Corner     (GLLC) -   "     "   "
  124.   Lower-Right Corner     (GLRC) -   "     "   "
  125.   Horizontal Line     (GHL)  -   "     "   "
  126.   Vertical Line     (GVL)  -   "     "   "
  127.   Solid (Full) Block     (GFB)  -   "     "   "
  128.   Hashed Block         (GHB)  -   "     "   "
  129.   Upper Intersect     (GUI)  -   "     "   "
  130.   Lower Intersect     (GLI)  -   "     "   "
  131.   Intersection         (GIS)  -   "     "   "
  132.   Right Intersect     (GRTI) -   "     "   "
  133.   Left Intersect     (GLTI) -   "     "   "
  134. The remainder of the TCAP should be filled with binary Zeros to
  135. properly handle future additions.
  136.  
  137. Example TermCap:
  138.  
  139. ; NZTCAP:  NZWYS60.Z80
  140. ; Author:  Joe Wright
  141. ; Date:    12 October 87
  142. ; Version: 1.0
  143.  
  144. ; VERSION: 2.2   3 February 90
  145. ;
  146. ; Moved the CD (clear to end of screen) string back after LI string.
  147. ; Define B13 as offset from NZTCAP to GOELD.
  148.  
  149. ; VERSION: 2.1  19 January 90
  150.  
  151. ; Added Read Cursor and Read Line functions.
  152. ; Graphics characters now in a table instead of individual strings.
  153.  
  154. ; VERSION: 2.0    12 December 89
  155.  
  156. ; Modified for new VLIB4 graphics and for new SETATT and SETATR routines.
  157. ; The SA: macro string is modified for the routines and a new string,
  158. ; AT: is added to contain the four main attributes for this terminal:
  159. ;    Normal, Blink, Reverse, Underscore
  160.  
  161. ; Extended Termcap Data for NZ
  162.  
  163. ; This is the proposed TermCap Data for the New Z-System.
  164. ; It more fully describes the terminal and its capabilities.
  165.  
  166. ESC    EQU    27        ; ASCII escape character
  167.  
  168. ; I have adopted the convention that a terminal name is terminated
  169. ; with a space character, therefore no spaces within the name.
  170. ; Also that the terminal name is unique in the first eight characters.
  171. ;
  172. NZTCAP:    DB    'WYSE-60D     ' ; Name of terminal (13 bytes)
  173.  
  174. ;
  175. ; The Graphics section is no longer fixed so we must provide an
  176. ; offset to it.  One byte is sufficient for a two-record TCAP.
  177. ;
  178. B13:    DB    GOELD-NZTCAP    ; Offset to GOELD
  179. ;
  180. ; Bit 7 of B14 indicates the new Extended TCAP.  Bits 6-0 are undefined.
  181. ;
  182. B14:    DB    10000000B    ; Extended TCAP
  183. ;
  184. ; It is often desirable to differentiate terminals with other than
  185. ; their commands.  For example TeleVideo 955 has the same command
  186. ; set as Wyse 60 but takes less time to initialize (reset).
  187.  
  188. ;
  189. ; 16 bits are now reserved for indicating terminal charactistics
  190. ; which cannot be known from the strings.  I have defined five
  191. ; of these bits for my own purposes.  
  192. ;
  193. ; B15 b0    Standout    0 = Half-Intensity, 1 = Reverse Video
  194. ; B15 b1    Power Up Delay    0 = None, 1 = 10-second delay
  195. ; B15 b2    No Wrap        0 = Line Wrap, 1 = No Wrap
  196. ; B15 b3    No Scroll    0 = Scroll, 1 = No Scroll
  197. ; B15 b4    ANSI        0 = ASCII, 1 = ANSI
  198. ;
  199. B15:    DB    00000010B    ; Power Up Delay
  200. ;
  201.  
  202.     DB    'K'-'@'        ; Cursor up
  203.     DB    'J'-'@'        ; Cursor down
  204.     DB    'L'-'@'        ; Cursor right
  205.     DB    'H'-'@'        ; Cursor left
  206.     DB    00        ; Cl delay
  207.     DB    00        ; Cm delay
  208.     DB    00        ; Ce delay
  209.  
  210. ; Strings start here.
  211.  
  212. CL:    DB    ESC,'+',0    ; Cl string            0
  213.     DB    ESC,'=%+ %+ ',0    ; Cm string            1
  214.     DB    ESC,'T',0    ; Ce string            2
  215.     DB    ESC,')',0    ; So string            3
  216.     DB    ESC,'(',0    ; Se string            4
  217.     DB    0        ; Ti string            5
  218.     DB    ESC,'(',0    ; Te string            6
  219.  
  220. ;
  221. ; Extensions to Standard Z3TCAP 
  222. ;
  223. LD:    DB    ESC,'R',0    ; Line Delete            7
  224. LI:    DB    ESC,'E',0    ; Line Insert            8
  225. CD:    DB    ESC,'Y',0    ; Clear to end of screen    9
  226. ;
  227. ; Set Attribute strings once again included.
  228. ;
  229. SA:    DB    ESC,'G%+0',0    ; Set Attributes        10
  230. AT:    DB    '0248',0    ; Attributes            11
  231. ;
  232. ; These two allow reading the Terminal's screen.
  233. ;
  234. RC:    DB    ESC,'?',0    ; Read current cursor position    12
  235. RL:    DB    ESC,'6',0    ; Read line until cursor    13
  236.  
  237. ;
  238. ; Graphics start here.    Wyse-60 goes graphic with bit 7 set.
  239. ;
  240. GOELD:    DB    0        ; On/Off Delay            0
  241. ;
  242. ; Graphics strings offset from Delay value.
  243. ;
  244.     DB    0        ; Graphics On            1
  245.     DB    0        ; Graphics Off            2
  246.     DB    ESC,'`0',0    ; Cursor Off            3
  247.     DB    ESC,'`1',0    ; Cursor On            4
  248.  
  249. ; Graphics Characters
  250.  
  251.     DB    'Z'+80H        ; Upper Left Corner        5
  252.     DB    '?'+80H        ; Upper Right Corner        6
  253.     DB    '@'+80H        ; Lower Left Corner        7
  254.     DB    'Y'+80H        ; Lower Right Corner        8
  255.  
  256.     DB    'D'+80H        ; Horizontal Line        9
  257.     DB    '3'+80H        ; Vertical Line            10
  258.     DB    '['+80H        ; Full Block            11
  259.     DB    '2'+80H        ; Hashed Block            12
  260.     DB    'B'+80H        ; Upper Intersect        13
  261.     DB    'A'+80H        ; Lower Intersect        14
  262.     DB    'E'+80H        ; Mid Intersect            15
  263.     DB    '4'+80H        ; Right Intersect        16
  264.     DB    'C'+80H        ; Left Intersect        17
  265. ;
  266. ;  Fill unused space with nulls
  267. ;
  268.     REPT    128-($-NZTCAP)
  269.     DB    0
  270.      ENDM
  271. ;
  272.     END
  273. ;
  274. ;  End of NZTCAPD
  275. ;------------- End of Sample TermCap -------------
  276.