;
                                 STATPAT.Z80                                  

             Size (recs) CRC   Version    Author/Latest Issue      Disk
               4k (30)   0B9A  4.0        Bruce Morgen 8/91        Z3COM8

  1- Assembly  2- Notes                                                       


   STATPAT.Z80 patches STAT.COM to work under ZCPR 3.3+.   
   
   Original (6/18/87) by Howard Goldstein.
:1
 Assembly 


   To install this patch,  
   
      1) assemble to a HEX file

      2) overlay STAT.COM using MLOAD or a debugger:

         MLOAD STAT.COM=STAT.COM,STATPAT.HEX
:2
 STATPAT Notes - 1/2 

   a. Vs 4.0 updates (8/26/91, Bruce Morgen):
      - Added DU:/DIR: support  --  STAT B0:*.LBR now works as  expected under
        Z33+,  seemingly no effect on other  functions or  on  operation under
        CP/M.

   b. Vs 3.0 updates (8/26/87, Howard Goldstein):
      - The previous version failed to remove leading spaces from the command
        tail when copying it into the FCB.   This has been fixed and the code
        has been somewhat shortened (test of the command tail length byte was
        unnecessary since the BADDU flag would  never be set if there were no
        command tail).

   c. Vs 2.0 updates (8/9/87, Joe Wright):
      - The original patch somehow caused  STAT  not to  work  properly  under
        CP/M.   It seems the DR-CCP uses the default fcb to load the .COM file
        and after then parsing the command line into it,  does  not  bother to
        clear the record count byte (fcb+15).  Therefore the check for zero is
        invalid.  Further,  ZCPR33  sets  the  drive  byte  (fcb+0)  and  this
 STATPAT Notes - 2/2 

        confuses the hell out of  STAT,  which  expects  it  to  be 0.  I have
        changed the patch to check fcb+15 for 0ffh  and to reconstruct the fcb
        entry as if  DR-CCP had  done it.   The resulting  STAT  works equally
        well with CP/M or ZCPR33.

   d. Vs 1.0 updates (6/18/87, Howard Goldstein):
      - Some of the options of DRI's STAT.COM do not work under ZCPR 3.3.   In
        particular,  the options that end with a colon,  such  as  DSK:  DEV:,
        etc., fail because of the way Z33 sets  up the default  FCB's  when it
        can't resolve a directory spec.  (That's what it thinks these commands
        are!)   This patch checks the bad directory flag in the first  default
        FCB.   If it is set and the file name field is blank,  this code makes
        the file name nonblank and clears the drive byte.   When STAT sees the
        FCB set up in this way, it assumes that one of its special commands is
        present and processes the command by reading it from the command tail.
