ZCPR2 Feature-Specific Utilities
Initialization Routines
ZCPRQ Status Routine
Multiple Command Line Pointer Routine
Path-Oriented File Search Routine
File Status Routine
:Introduction

    Thi� modul� contain� � serie� o� routine� whic� ar� designe� �
t� allo� th� programme� t� tak� advantag� o� ke� ZCPR�� Feature� �
withou� doin� � lo� o� programmin� fo� himself��  I� particular� �
facilitie� suc� a� th� followin� ar� provided:

         �  Initializatio� -- Settin� th� locatio� o� the
                   multiple command line buffer
         .  Initialization -- Defining the location of a command
                   search path
         .  Initialization -- Setting the current disk/user
                   character definition
         .  Initialization -- Setting all ZCPR2-Specific buffers
                   from the standard utility buffers
         .  Utility -- Returning a pointer to the first byte
                   of the next command
         .  Utility -- Searching for a file along the command
                   search path
         .  Utility -- Determining the attributes of a file

:Initialization Routines

    Routine Name:  ZINIMC
    Function�
         ZINIM� define� th� bas� addres� o� th� multipl� comman� �
lin� buffe� fo� th� ZCPR� system��  Th� initializatio� performe� �
b�� thi� routin� i� use� b� th� ZMCPT� routin� t� retur� th� �
pointer to the first character of the next command.
    Inputs:  HL = base address of multiple command line buffer
    Outputs:  None
    Registers Affected:  None
    SYSLIB Routines Called:  None
    Specia� Erro� Conditions�  None
    Note��  I� thi� routin� i� no� called�� i� i� assume� tha� �
multiple command lines are not supported.


    Routine Name:  ZINIEXT
    Function�
         ZINIEXԠ define� th� bas� addres� o� � comman� searc� �
path��  Th� ZPFINĠ routin� use� thi� bas� addres� t� star� it� �
searc� fo� � file��  Not� tha� thi� provide� adde� flexibilit� i� �
tha� thi� nee� no� necessaril� b� th� bas� addres� o� th� ZCPR� �
Syste� comman� searc� path� bu� i� ma� b� th� bas� addres� o� an� �
path (such as a separate path to look for HLP files).
    Inputs:  HL = base address of path
    Outputs:  None
    Registers Affected:  None
    SYSLIB Routines Called:  None
    Specia� Erro� Conditions�  None
    Note��  I� thi� routin� i� no� called�� th� externa� pat� �
default� t� a� empt� path�� s� n� har� i� don� an� n� searc� ca� �
b� performed.


    Routine Name:  ZCPRSET
    Function�
         ZCPRSEԠ perform� tw� function� -- i� define� th� �
characte� use� t� specif� th� curren� dis� o� use� (defaul� valu� �
i� $� an� i� set� th� DM� addres� fo� dis� fil� transfer� (use� �
b�� ZFSTAT)��  I� thi� routin� i� no� called�� the� th� curren� �
indicator is defaulted to $ and the DMA address is set to 80H.
    Inputs:  A = Current Indicator, HL = DMA Address
    Outputs:  None
    Registers Affected:  None
    SYSLIB Routines Called:  None
    Specia� Erro� Conditions�  None
    Note��  I� thi� routin� i� no� called�� Curren� Indicato� �
defaults to $ and DMA Address defaults to 80H.


    Routine Name:  ZGPINS
    Function�
         ZGPINӠ initialize� th� ZCPR2-Specifi� Buffer� fro� th� �
ZCPR�� Utilit� Standar� General-Purpos� Installatio� Forma� Buf�
fers��  Thi� i� t� b� use� b� ZCPR� Utilities�� suc� a� XDIR3� t� �
completel� initializ� al� th� necessar� buffers.
    Th� buffer� i� th� utilitie� ar� locate� a� indicate� i� th� �
ZCPR� Utilitie� Manual.

    Inputs:  None
    Outputs:  None
    Registers Affected:  None
    SYSLIB Routines Called:  MOVEB, ZINIMC, ZINIEXT, ZCPRSET,
                             ZFNINIT
    Specia� Erro� Conditions�  None

:ZCPRQ Status Routine

    Routine Name:  ZCPRQ
    Function�
         ZCPRѠ querie� th� statu� o� th� SZCPҠ module�� whic� �
contains these routines.  On exit, this routine returns:
              HL = Base Address of External Path
              DE = Base Address of Multiple Command Buffer
              A = Multiple Command Available Flag (0=No)
    Inputs:  None
    Outputs:  HL = Base Address of External Path
              DE = Base Address of Multiple Command Buffer
              A = Multiple Command Available Flag (0=No)
    Registers Affected:  HL, DE, A
    SYSLIB Routines Called:  None
    Specia� Erro� Conditions�  None

:Multiple Command Line Pointer Routine

    Routine Name:  ZMCPTR
    Function�
         ZMCPTҠ return� � pointe� t� th� nex� characte� i� th� �
multipl� comman� lin� i� multipl� command� ar� enabled��  �� fla� �
is returned which says if multiple commands are enabled or not.
    Inputs:  None
    Outputs:  HL pts to next char in line
              A=0 and Zero Flag Set (Z) if multiple commands
                   are not available; NZ otherwise
    Registers Affected:  HL, PSW
    SYSLIB Routines Called:  None
    Specia� Erro� Conditions�  None

:Path-Oriented File Search Routine

    Routine Name:  ZPFIND
    Function�
         ZPFINĠ searche� fo� � fil� alon� th� comman� searc� �
pat� whos� bas� addres� wa� define� whe� th� programme� calle� ��ZINIEXT��  I� log� int� eac� dis� an� use� are� alon� th� path� �
lookin� fo� th� fil� whos� FC� i� pte� t� b� DE�� unti� i� eithe� �
find� th� fil� o� reache� th� en� o� th� pat� (fil� no� found)�  �
I� th� fil� i� found�� i� return� th� dis� an� use� are� i� whic� �
th� fil� resides��  ZPFIN� alway� return� th� proces� t� th� dis� �
and user area it is "currently" logged into.

    Inputs:  DE pts to the FCB of the file to find
             B is a flag; if B <> 0, search the current disk and
                   user area first; if B=0, do not search the
                   current disk and user area first


ZPFIND, Con't

    Outputs:  Zero Flag Clear (NZ) and A=0FFH if file found
              B = Disk (B=0 if Disk A), C=User if file found
              Zero Flag Set (Z) and A=0 if file not found

    Registers Affected:  BC, PSW

    SYSLIB Routines Called:  BDOS

    Specia� Erro� Conditions�  None

:File Status Routine

    Routine Name:  ZFSTAT
    Function�
         ZFSTAԠ determine� th� attribute� o� th� fil� i� th� �
curren� dis� an� use� are� whos� FC� i� pte� t� b� DE��  I� tell� �
the programmer if the file is SYSTEM or not and READ/ONLY or not.
    Inputs:  DE pts to FCB of file
    Outputs:  B=0 means file is NOT System, B<>0 means file is
              C=0 means file is NOT R/O, C<>0 means file is
              Zer� Fla� Se� (Z� an� A=� i� fil� foun� an� BC
                   valid, and Zero Flag Clear (NZ) if file not
                   found
    Registers Affected:  BC, PSW
    SYSLIB Routines Called:  BDOS
    Specia� Erro� Conditions�  None
    Note:  ZFSTAT does NOT do a search.