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 DMA address
          .  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
          ®  Utilitù -- Returninç á Pointeò tï thió Module'ó 
                    buffers
: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:  ZINIDMA
     Functionº
          ZINIDMÁ defineó thå DMÁ addresó tï bå useä bù thå ZCPR² �
routines.  If this routine is not called, 80H is assumed.
     Inputs:  HL = DMA Address
     Outputs:  None
     Registers Affected:  None
     SYSLIB Routines Called:  None
     Speciaì  Erroò Conditionsº  None
     Noteº   Iæ thió routinå ió noô called¬  DMÁ Addresó defaultó �
tï 80H.


     Routine Name:  ZINICI
     Functionº
          ZINICÉ  defineó  thå currenô user/disë indicatoò tï  bå �
useä bù thå ZCPR² routines®   Iæ thió routinå ió noô called¬  '$§ �
ió assumed.
     Inputs:  A = Indicator
     Outputs:  None
     Registers Affected:  None
     SYSLIB Routines Called:  None
     Speciaì  Erroò Conditionsº  None
     Noteº   Iæ  thió  routinå  ió  noô  called¬  thió  indicatoò �
defaults to the character '$'.


     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, ZINIDMA,
                              ZINICI, ZFNINIT
     Speciaì  Erroò Conditionsº  None

:ZCPRQ Status Routine

     Routine Name:  ZCPRQ
     Functionº
          Thió routinå returnó á pointeò tï thå firsô bytå oæ thå �
firsô ZCPR² moduleó internaì buffers®   Theså bufferó contaiî keù �
informatioî  necessarù  foò thå propeò operatioî oæ thió  seô  oæ �
ZCPR2 routines.  The structure of this buffer area is:
               Byte 0:  Multiple Command Flag; 0 says no multiple
                         command line buffer is available (No
                         command line is assumed)
               Bytes 1-2:  Address of Multiple Command Line
                         Buffer if it is available
               Bytes 3-4:  Address of ZCPR2 External Path
                         (Points to an empty path if not
                         initialized)
               Byte 5:  Current User/Disk Indicator ($ if not
                         initialized)
               Bytes 6-7:  DMA Address (80H assumed)

     Inputs:  None
     Outputs:  HL = Base Address of Internal Buffers
     Registers Affected:  HL
     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.




.
