;
       I  - Introduction to Z3LIB

       0  - Extended Environment Definition

       1  - Access to the ZCPR3 Environment
              Command Line, CRT/PRT Data, External FCB,
              Environment, FCP Addr, File Names, Initialize

       2  - Access to the ZCPR3 Environment
              IOP, DU/Max DU, Messages, Named Dir, Path,
              Processor Speed, Quiet Flag, RCP Address,
              Shell Stack, Wheel Byte

       3  - Flow and ZEX Control Under ZCPR3

       4  - Access to the ZCPR3 Messages

       5  - General-Purpose ZCPR3 Utilities
:I

Z3LIB contains support utilities which provide access to ZCPR3-
specific features and capabilities.  Z3LIB routines can be
divided into four categories:

1.  ZCPR3 Environment Access  -- Utilities enabling you to
easily extract data from the Z3 Environment Descriptor and
modify certain Z3 environment parameters

2.  ZCPR3 Flow Control  -- Utilities allowing you to easily
manipulate ZCPR3's Flow Control environment by raising/lowering
the current IF level and toggling the current IF condition

3.  ZCPR3 Messages  -- Utilities providing access to ZCPR3
messages, enabling programs to read and write messages from and
to the system

4.  ZCPR3 Utilities  -- Utilities which relieve you from
constantly reprogramming some commonly-used ZCPR3 features

:0
           Extended Environment Description 

Version 4 of Z3LIB incorporates many enhanced functions
developed by Joe Wright and Jay Sage in NZCOM and ZCPR33 and 34.
Due to redefinition of some of the bytes in the Environment
Descriptor, a few of the original modules will not perform as
originally intended.  For example, only one Console (CRT
device) is supported.  The remaining space in the ENV contains
vectors to system segments.

Some programs such as Plu*Perfect Systems' JETLDR and Alpha
Systems' NZCOM set an existing Environment Descriptor to
reflect the necessary extended definitions.  If you do not
routinely use either of these products, you should create a new
SYS.ENV file for use with your existing ZCPR3 system.  The new
definitions are marked with an asterisk (*) in the following
source code sample Environment Descriptor.

 ; Library:  NZENV.LIB
 ; Author:   Joe Wright
 ; Version:  1.0
 ; Date:     29 Nov 87

 ; Adapted from Rick Conn's original SYSENV.LIB circa 1984

Z3ENV:	JP	CBIOS+6		;* Real BIOS Addr (+6) for your
				;  system (* Was JP 0 *)

	DEFB	'Z3ENV'		; Environment ID

	DEFB	80H		;* Extended Env shown by Bit 7

	DEFW	EXPATH		; External Path address
	DEFB	EXPATHS		; # of 2-byte elements in Path

	DEFW	RCP		; RCP address
	DEFB	RCPS		; # of 128-byte blocks in RCP

	DEFW	IOP		; IOP address
	DEFB	IOPS		; # of 128-byte blocks in IOP

	DEFW	FCP		; FCP address
	DEFB	FCPS		; # of 128-byte blocks in FCP

	DEFW	Z3NDIR		; NDR address
	DEFB	Z3NDIRS		; # of 18-byte entries in NDR

	DEFW	Z3CL		; ZCPR3 Command Line
	DEFB	Z3CLS		; # of bytes in Command Line

	DEFW	Z3ENV		; ZCPR3 Environment Descriptor
	DEFB	Z3ENVS		; # of 128-byte blks in ENV

	DEFW	SHSTK		; Shell Stack address
	DEFB	SHSTKS		; # SHSIZE-byte entries in Stk
	DEFB	SHSIZE		; Size of a Shell Stack entry

	DEFW	Z3MSG		; ZCPR3 Message Buffer

	DEFW	EXTFCB		; ZCPR3 External FCB

	DEFW	EXTSTK		; ZCPR3 External Stack

	DEFB	0		; Quiet flag (0=not quiet)

	DEFW	Z3WHL		; Address of Wheel Byte

	DEFB	4		; Processor Speed in MHz

	DEFB	'P'-'@'		; Maximum Disk
	DEFB	31		; Maximum User
	DEFB	1		; 1=Ok to accept DU:, 0=Not Ok

	DEFB	0		;* CRT Selection   (* Unused *)
	DEFB	0		; Printer Sel (only 0 or 1)

	DEFB	80		; Width of CRT 0
	DEFB	24		; Number of lines on CRT 0
	DEFB	22		; Number of text lines on CRT 0

 ; CRT 1 descriptor is replaced with this Valid Drive Vector.
 ; The Command Processor ignores 'Maximum disk' above, and uses
 ; this vector instead.  This allows 'holes' in the disk map.
 ; A user might have drives A, B, E, F and G for example. In
 ; this case, his vector would look like:
 ;	DEFW	0000000001110011B
 ; The Command Processor will treat drive C the same as drive H
 ; (unavailable) and take appropriate action.  

	DEFW	1111111111111111B ;* Valid drive vector (16)
	DEFB	0		;* Not used

	DEFB	80		; Width of Printer 0
	DEFB	66		; Number of lines on Printer 0
	DEFB	58		; Number of text lines on Ptr 0
	DEFB	1		; H/W Form Feed (0=can't,1=can)

	DEFB	102		; Width of Printer 1
	DEFB	66		; Number of lines on Printer 1
	DEFB	58		; Number of text lines on Ptr 1
	DEFB	1		; H/W Form Feed (0=can't,1=can)

 ;* Descriptors for Printers 2 and 3 replaced with System Data

	DEFW	CCP		;* ZCPR 3.x start loc'n	   3FH
	DEFB	CCPS		;* Size in records	   41H

	DEFW	DOS		;* DOS starting location   42H
	DEFB	DOSS		;* Size in records	   44H

	DEFW	BIOS		;* NZBIO starting location 45H

	DEFB	'SH      '	; Shell Variable Filename
	DEFB	'VAR'		; Shell Variable Filetype

	DEFB	'        '	; Filename 1
	DEFB	'   '		; Filetype 1

	DEFB	'        '	; Filename 2
	DEFB	'   '		; Filetype 2

	DEFB	'        '	; Filename 3
	DEFB	'   '		; Filetype 3

	DEFB	'        '	; Filename 4
	DEFB	'   '		; Filetype 4

	DEFB	0		;* Public drive OFF	   7EH
	DEFB	0		;* Public user OFF	   7FH
				;  (* Only defined for ZRDOS *)

 ; This dummy Terminal Capabilities description (Z3TCAP) will
 ; normally be replaced with a tailored MYTERM.Z3T on start up.

ENVORG2: DEFB	'               ' ; Terminal Name (15 chars)
	DEFB	0		; No terminal attributes
	DEFB	'E'-'@'		; Cursor Up
	DEFB	'X'-'@'		; Cursor Down
	DEFB	'D'-'@'		; Cursor Right
	DEFB	'S'-'@'		; Cursor Left
	DEFB	0		; Cl delay
	DEFB	0		; Cm delay
	DEFB	0		; Ce delay

	DEFB	0		; Cl string
	DEFB	0		; Cm string
	DEFB	0		; Ce string
	DEFB	0		; So string
	DEFB	0		; Se string
	DEFB	0		; Ti string
	DEFB	0		; Te string

 ; File filled with Zeros to end of 128-byte segment

:1:Z3LIB1.HLP
:2:Z3LIB2.HLP
:3:Z3LIB3.HLP
:4:Z3LIB4.HLP
:5:Z3LIB5.HLP
