;
                                  CMD.COM                                     

             Size (recs) CRC   Version    Author/Latest Issue      Disk
CMD.COM        2k (12)   B8EE  1.4        Bruce Morgen 4/91        Z3COM2
CMD.3OM        2k (12)   4C79  1.4        Bruce Morgen 4/91        Z3COM2
CMD.4OM        2k (16)   C82C  1.4        Bruce Morgen 4/91        Z3COM2

  1- Syntax  2- Notes  3- Examples of Use  4- CMDPATCH.Z80                    

   CMD  is  used  to define and run a command line.   It  either  accepts  the 
command line (including semicolons) which follow the verb CMD into the command 
line  buffer or,  if no input is provided,  it prompts the user for input  and 
then  places this into the command line buffer.   Vs 1.0 (7/19/84) by R. Conn.

   The  problem  that CMD addresses is the case where the main  program  in  a 
shell  sequence  knows nothing about shells,  and it is desired to  leave  the 
sequence sometime.   CMD provides this out.  It was built specifically for use 
with the SHSET command, although it may find other applications.
:1

   Syntax    CMD cmd1&cmd2;... or CMD (prompted input)

   The sequence of commands "cmd1;cmd2;..." becomes the command line.

   Accepts the '&' substitute command separator and aborts  the current shell,
if any, if a Ctrl-C is entered in prompted mode.
:2
 CMD Notes - 1/2 

   a. CMD sets the ERROR message of  ZCPR3,  so that programs on down the line
      can determine if input was made when CMD was run.   If the  user  simply
      strikes a RETURN in response to the  CMD prompt,  an error is indicated.
      Tests can later be made,  like  IF ERROR,  to  check  this  and make the
      command flow change depending on the outcome.

   b. Version 1.4 updates (3/23/91, Bruce Morgen):
      - Major change in prompted operation  --  CMD now reinvokes itself after
        each command until an  empty  command  line  (a  RETURN  alone)  or  a
        Control-C is entered.  Control-C also exits the current shell (if any)
        as in Version 1.3.   In this way,  CMD can act like an  MS-DOS or UNIX 
        "secondary shell" invocation for true  Z-System  shells as well as for
        "ZCPR2-style" shells like MEX with MEX2Z or Sage-modified WS4.

   c. Version 1.3 updates (8/16/88, Bruce Morgen):
      - Pre-release tweak to shell name printing code.
 CMD Notes - 2/2 

   d. Version 1.2 updates (3/9/88, Bruce Morgen):
      - Now accepts the  "&"  substitute  command  separator  and  aborts  the
        current shell, if any, if a control-C is entered in prompted mode.  
      - Prompt shows current shell instead of silly "Noname" message.
      - Z33 type format with safety header, Z80 code with SYSLIB4 and DSEG.
:3
 Examples of Use 

   a. SHSET MU3;CMD       <-- This will run MU3, allow the user to do what 
                              he wants, and then reenter MU3.  'SHCTRL POP' 
                              would  pop the shell stack and break the 
                              'MU3;CMD' loop.
:4
                              CMDPATCH.Z80 

             Size (recs) CRC   Version    Author/Latest Issue      Disk
                               1.0        Jay Sage 4/87            Z3UTIL10
==============================================================================

   CMDPATCH.Z80 is  an overlay  which patches  two changes into version 1.0 of 
CMD.  The  first change  makes it reset  the shell  bit in  the message buffer 
command status  flag so  that the external or  internal error  handler will be 
invoked for  bad commands.  Before,  the error  was treated  as a shell error, 
which resulted  in the  entire shell  stack being  cleared.  The second change 
eliminates  the  extra space  after the  prompt character  '>' in  the command 
prompt.  This extra space was confusing in cases where one wanted deliberately 
to enter a command with  a leading  space to  force invocation  of the  ZCPR33 
extended command processor.

   CMDPATCH.Z80 should  be assembled  to  a HEX  file  and overlaid on CMD.COM 
using the MLOAD command line: MLOAD CMDNEW=CMD.COM,CMDPATCH1.
