  ZCPR-3 Terminal Capabilities (TCAP) Extended Definition

		     as of 8 March 1989 (HFB)

The ZCPR-3 TCAP is a 128-byte area positioned immediately after
the Environment Descriptor.  The configuration has been changed
from the original descriptions contained in Richard Conn's book,
ZCPR3, The Manual.  The layout here is designed for backward
compatibility with the original scheme while adding extensions
to accomodate rudamentary business graphics and pull-down menus
described in Dennis Wright's GRXLIB and portions of GRWLIB.

Offsets mentioned in this description are from the base of the
TCAP.

Offset   Item			Description

 0	Terminal Name	15 characters, alphanumeric.  The first
			character must NOT be a space.  A
			leading space means uninstalled TCAP.

 15	Characteristics	One byte indicating Terminal details as:

			B0 - 1 = Reverse or Intensify available
			     0 = Dim or reduced intensity avail

			B1 - 1 = Screen wraps on last col write
			     0 = No wrap if last column written

			B2 - 1 = Screen scrolls if last row/col
					position written
			     0 = Screen does NOT scroll if last
					col of last row written

			B3 - 1 = Term needs 10 secs on powerup
			     0 = Terminal instantly ready
The following four bytes are for single-byte cursor movement
codes FROM the terminal.  If your terminal has no independant
cursor movement keys, or implements cursor movement with multi-
byte sequences, use any convenient single-key sequence you
desire.  The familiar WordStar "diamond" comprised of Control-E
(Up), Control-X (Down), Control-D (Right) and Control-S (Left)
is commonly used.

 16	 Cursor Up	Cursor UP code from terminal (^E)
 17	 Cursor Dowm	Cursor DOWN code from terminal (^X)
 18	 Cursor Right	Cursor RIGHT code from terminal (^D)
 19	 Cursor Left	Cursor LEFT code from terminal (^S)

Some terminals need delays to perform certain functions.  This
may be more important as interface speeds increase.  Delays are
in milliseconds.  Consult your terminal manual for the correct
values to insert.

 20	 Clear Screen	Delay in milliseconds (0 to 255)
 21	 Move Cursor	Delay in milliseconds (0 to 255)
 22	 Clear to EOL	Delay in milliseconds (0 to 255)

Beginning at Offset 23 from the beginning of the TCAP, a
sequence of Null-terminated strings define the Command Strings
needed to make the Terminal respond as desired.  If particular
features are not implemented on nor needed by your terminal, a
single Null (binary 0) disables that feature.  

 Clear Screen		(CL) - Clear Screen & Home Cursor
 Cursor Movement	(CM) - Parsed string for cursor posi-
				tioning.  See ZCPR3, The Manual
				for details.  "%N" string added
				to send Binary 0 to Terminal
 Clear to End-of-Line	(CE) - Clear from Cursor Position to
				the end of the current line.
				Cursor stays in current place
 Standout Begin	(SO) - Enter Standout Mode
				If terminal uses DIM or Reduced
				intensity, the Initialization
				string (TI below) should set to
				reduced intensity, and this
				function sets normal intensity

 Standout End		(SE) - End Standout mode
				If you use DIM or reduced
				intensity with normal for
				"Standout", this restores the
				DIM mode.
 Initialize Terminal	(TI) - Initialize the terminal
				See notes for suggestions on
				DIM/Reduced Intensity above
 De-initialize Term	(TE) - Restore Terminal to normal mode
				See above notes
 Delete Line		(LD) - Delete line on which the cursor
				resides and move lines below it
				up by one
 Insert Line		(LI) - Insert blank line before the one
				on which the cursor positioned,
				and move lines below down one.
				Cursor moves to beginning of
				the new blank line
 Clear to EOS		(CD) - Clear screen from current cursor
				position to the End-of-Screen
The following definitions implement portions of the GRXLIB and
GRWLIB functionality, but in different TCAP locations.

 Graphics Delay	     - Delay for Graphics On/Off.  Use
				greater of the two delay times
				in milliseconds. Values of 0 to
				255 are acceptable
 Graphics Mode On	(GO) - Set Terminal to Graphics Mode
 End Graphics Mode	(GE) - Restore Terminal to normal
				Alphanumeric mode
 Cursor Off		(CDO)- Disable Cursor display.  Needed
				for Pull Down Menus
 Cursor On		(CDE)- Enable Cursor display.  Needed
				for Pull Down Menus

Several graphics strings are needed to implement the desired
level of functionality.  Each of these is needed in the
specified order.  The terminal should first be placed in the
graphics mode, then the desired string sent.  If strings for
all terminals are only a single character, this may be reduced
to a character array in the future.

 Upper-Left Corner	(GULC) - String for now
 Upper-Right Corner	(GURC) -   "     "   "
 Lower-Left Corner	(GLLC) -   "     "   "
 Lower-Right Corner	(GLRC) -   "     "   "
 Horizontal Line	(GHL)  -   "     "   "
 Vertical Line	(GVL)  -   "     "   "
 Solid (Full) Block	(GFB)  -   "     "   "
 Hashed Block		(GHB)  -   "     "   "
 Upper Intersect	(GUI)  -   "     "   "
 Lower Intersect	(GLI)  -   "     "   "
 Intersection		(GIS)  -   "     "   "
 Right Intersect	(GRTI) -   "     "   "
 Left Intersect	(GLTI) -   "     "   "

The remainder of the TCAP should be filled with binary Zeros to
properly handle future additions.
Example:
; Z3TCAP:  HEATH19.Z80
; Author:  Harold F. Bower

; Z3 Termcap implementing the Heath/Zenith-19 command set

ESC	EQU	27		; Escape character

; New Terminal Capabilities Data

Z3TCAP:	DEFB	'Heath/Zenith-19' ; Name of terminal (15 chars)

TRMMOD:	DEFB	00000111B	; B3 = 0 - Term Ready quickly
				; B2 = 1 - Rev Video,
				; B1 = 1 - Wrap @ EOL,
				; B0 = 1 - Scroll @ EOP

	DEFB	'E'-'@'		; Cursor up  (WS Diamond)
	DEFB	'X'-'@'		; Cursor down
	DEFB	'D'-'@'		; Cursor right
	DEFB	'S'-'@'		; Cursor left
; Heath-19 doesn't need delays

	DEFB	00		; Cl delay
	DEFB	00		; Cm delay
	DEFB	00		; Ce delay

; Strings start here.

	DEFB	ESC,'E',0	; CL str (Clear, Home Cursor)
	DEFB	ESC,'Y%+ %+ ',0	; CM str (Cursor positioning)
	DEFB	ESC,'K',0	; CE str (Clear to End-of-Line)
	DEFB	ESC,'p',0	; SO str (Go to Reverse Video)
	DEFB	ESC,'q',0	; SE str (Return Normal Video)
	DEFB	0		; TI str (Initialize Terminal)
	DEFB	0		; TE str (De-initialize Term)

; Extensions to Standard TCAP

	DEFB	ESC,'M',0	; LD str (Delete Line)
	DEFB	ESC,'L',0	; LI str (Insert Line)
	DEFB	ESC,'J',0	; CD - Clear to EOS String
	DEFB	0		; GO/GE - Graphics On/Off Delay
	DEFB	ESC,'F',0	; GO - Graphics Mode On
	DEFB	ESC,'G',0	; GE - Graphics Mode End
	DEFB	ESC,'x5',0	; CDO - Cursor Off string
	DEFB	ESC,'y5',0	; CDE - Cursor Enable string

	DEFB	'f',0		; GULC - Upper Left Corner [*]
	DEFB	'c',0		; GURC - Upper Right Corner [*]
	DEFB	'e',0		; GLLC - Lower Left Corner [*]
	DEFB	'd',0		; GLRC - Lower Right Corner [*]
	DEFB	'a',0		; GHL - Horizontal Line [-]
	DEFB	'`',0		; GVL - Vertical Line [|]
	DEFB	'i',0		; GFB - Full Block String [*]
	DEFB	'w',0		; GHB - Hashed Block String [#]
	DEFB	'u',0		; GUI - Upper Intersection [+]
	DEFB	's',0		; GLI - Lower Intersection [+]
	DEFB	'b',0		; GIS - Intersection [+]
	DEFB	'v',0		; GRTI - Right Intersection [+]
	DEFB	't',0		; GLTI - Left Intersection [+]
;  Fill unused space with Nulls

	  REPT	128-[$-Z3TCAP]
	DEFB	0
	  ENDM

	END
;------------- End of Sample TermCap -------------

