;
                                    CD.COM                                    

             Size (recs) CRC   Version    Author/Latest Issue      Disk
CD.COM         3k (20)   8DF6  3.7        Carson Wilson 5/89       Z3COM2
CD.3OM         3k (19)   7D90  3.7        Carson Wilson 5/89       Z3COM2

  1- Syntax  2- Usage  3- ST.COM  4- Notes  5- Err Msgs  6- Examples of Use   


   Change Directory is used to move from one directory to another by using the 
names or literal DU forms associated with the directories.  CD first logs into 
the referenced directory,  and, if there is a file named ST.COM in it, CD will 
log the user into the referenced directory and invoke ST.COM.   If there is no 
file named ST.COM, CD will simply log the user in.  

   Original by R. Conn, 4/84.
:1


    Syntax  CD or CD //      <-- Print help message

            CD du[:]         <-- Activates ST.COM upon logging into directory

        or  CD du password   <-- Allows changing to a passworded directory

        or  CD dir[:]        <-- Activates ST.COM upon logging into directory

        or  CD dir password  <-- Allows changing to a passworded directory
:2
 Usage - 1/2 

   Under ZCPR3, there are two basic ways to log into a directory.   One way is
by using the DU: or DIR: prefix, like:

          B1:ASM>TEXT:     ...or
          B1:ASM>C7:

The other way is by using CD, like:

          B1:ASM>CD TEXT:  ...or
          B1:ASM>CD C7:

   The tradeoff  is  in user efficiency.  If a directory is always  used for a 
particular function, such as cataloging disks, CD may be preferred because  it 
will not only log the user in but  will also run ST.COM,  which can set up his
environment,  such  as by  running MENU  or  some  other  program  or group of 
programs.
 Usage - 2/2 

   The user's environment can change drastically by using CD to log into a new
directory.  The names of the directories he can access can change (LDR changes 
the Memory-Based  names),  the command search  path he uses can change, and he 
can even find himself in a MENU environment or  other front-end instead  of  a 
ZCPR3 command environment.
 
   As distributed, ZCPR3 permits 14 named directories simultaneously in memory 
(though it's  easy to allocate more memory buffer space, 18 bytes per name, if 
that's desired).   By  running ST,  a different named directory  file  can  be 
loaded for each directory entered,  permitting  up to  448 names per (logical) 
drive (14 names x 32 areas). 
:3

 ST.COM 

   ST.COM  is  an  alias  file  used to  establish  desired  conditions  in  a 
directory.  The only purpose of ST is to load the multiple command line buffer 
with  a  command line when it is executed without any options.   This  command 
line may contain a reasonable number of commands which perform any desired set 
of  functions.   ST.COM  is searched for in the  current  directory.   CD  may 
require a password to move to the new directory.  

   In the ZCPR3 environment, good candidate commands to be executed by running
ST via CD include the following:

          LDR file.NDR   <-- Set up a new directory environ
          PATH path-exp  <-- Set up a new Command Search Path
          MENU           <-- Invoke the MENU Preprocessor
          ECHO message   <-- Print a Message to the User
:4
 CD Notes - 1/1 

   a. Version 3.7 updates:
      - Puts back space following STCL and LOGCL,  which were  deleted  due to 
        poor Z3LIB documentation on  the PUTCL routine.   Though the help file 
        says PUTCL takes a "null  terminated  command line"  as  a  parameter, 
        PUTCL really  requires  a command BUFFER the size  of the current ZCPR 
        multiple command  line  buffer.   CD  uses 256  bytes,  which  is  the 
        current maximum for  Z-System.   PUTCL should implement its own buffer 
        rather than requiring the user to provide one for it.

   b. Version 3.6 updates:
      - Bruce Morgen pointed out that  a type-3 header does  not  prevent ZCPR 
        3.0 from  loading  a  type-3  program  compiled  to  run  at  100 hex.  
        CDxx.3OM therefore is  no longer a  type-3 program,  and now tests for 
        ZCPR33  or above via  the  Z3LIB Z33CHK routine.   Z33CHK also returns 
        false if BGii is present.
      - If you  are  using  BGii  you  should  run  CDxx.1OM as  BGii does not
        implement  the  message  buffer  drive  and  user  bytes  required  by  
        CDxx.3OM.
 CD Notes - 2/2 

      - Removed extra pages of space following labels STCL and LOGCL.
      - Removed BGii existence check from CDxx.3OM, as Z33CHK handles this.
      - Added ZSYSCHK for CDxx.1OM to test for ZCPR environment.

   c. Version 3.5 updates:
      - All Z33 errors chain to error handler.
      - All Z30 errors give message and abort.
      - Only NON-error status messages are suppressed  by the ZCPR Quiet Flag.
      - Uses Z3LIB GETCCP routine to  find  CCP,  allowing  CD  to  work under 
        Z3PLUS.
      - Implements assembly-time equate TYPE3 instead  of using Z33CHK,  which 
        was inconsistent since  a type-3  header  would  have  prevented  CD's 
        running under type-1 no  matter  what  Z33CHK said,  and  compiled two 
        versions:  CD35.1OM is type 1 and  should  be installed with Z3INS and
        used for ZCPR 3.0.  CD35.3OM is type 3 and is for ZCPR 3.3 and 3.4 and
        Z3PLUS.  It has a type-3 header so will not run under ZCPR 3.0.
:5


 Selected Error Messages 

   "Command Line Overflow" 

      -- there was not enough room in the command line to insert the command
         to invoke ST.COM.
:6


 Examples of Use 

   a. B0:WORK>cd text:<cr>     <-- Log into  directory TEXT:.  An ST alias
      PW? mypass<cr>               in TEXT: might then load a new .NDR, set
      C7:TEXT>                     up a new command search path and place
                                   the user in a menu.
