;
                                  Z3LIB.REL                                   

             Size (recs) CRC   Version    Author/Latest Issue      Disk
Z3LIB.REL     11k (88)   A768  4.4a       Harold Bower 7/91        Z3LIB4
Z3LIBS.REL    10k (80)   D062  4.4a       Harold Bower 7/91        Z3LIB4

  1- Introduction  2- Extended Environment Definition  3- Help Files          

   Z3LIB, the ZCPR3-specific libraries, provide:
   Access to the ZCPR3 Environment - (Command Line, CRT/PRT Data, External
                                      FCB, Environment, FCP Address, File 
                                      Names, Initialize)
   Access to the ZCPR3 Environment - (IOP, DU/Max DU, Messages, Named Dir,
                                      Path, Processor Speed, Quiet Flag, 
                                      RCP Address, Shell Stack, Wheel Byte)
   Flow and ZEX Control Under ZCPR3   
   Access to the ZCPR3 Messages
   General-Purpose ZCPR3 Utilities

:1
 Introduction - 1/2 

   Z3LIB is one  of three libraries provided with the ZCPR3 System,  the other
two being SYSLIB and VLIB.   Z3LIB contains  a host of support utilities which 
provide access to ZCPR3-specific features and capabilities.   SYSLIB is a host
of general-purpose  utilities and VLIB is  a set  of machine-independent  (via
Z3TCAP) utilities which support CRT control and utilitization.

   SYSLIB is documented in a collection of SYSLIB*.HLP files, as is VLIB.

 Introduction - 2/2 
     Z3LIB routines can be divided into four categories:

          1.   ZCPR3 Environment Access 
               -- Those utilities which allow the programmer to easily extract
data from the Z3 Environment  Descriptor  and  modify  certain  Z3 environment 
parameters

          2.  ZCPR3 Flow Control 
               -- Those  utilities  which  permit  the  programmer  to  easily 
manipulate  the flow  control environment of ZCPR3,  enabling him to raise the 
level or lower the level of the current IF condition and to toggle the current
IF condition as desired

          3.  ZCPR3 Messages 
               -- Those utilities  providing  access  to  the  ZCPR3 messages, 
allowing the program to read and write messages from and to the system

          4.  ZCPR3 Utilities 
               -- Useful  utilities   which   relieve   the   programmer  from 
constantly reprogramming some  commonly-used ZCPR3 features
:2
 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
:3
 Help Files 

   Comprehensive help on Z3LIB can be accessed from Z3HELP-Y.LBR.
   