home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / UTILS / DIRUTL / D-42A.LBR / NZCPRFIX.DQC / NZCPRFIX.DOC
Text File  |  2000-06-30  |  3KB  |  64 lines

  1.                   NZCPRFIX.DOC
  2.                  --------------
  3.                       from
  4.               Horn Engineering Associates
  5.              -----------------------------
  6.  
  7.     [This fix for NZCPR and ZCMD is required for WHATSNEW (D-41  and
  8.     later versions) to work correctly if your CCP is based on NZCPR]
  9.  
  10.     This fix for NZCPR, probably for all versions, and probably  for
  11.     ZCMD  as well, corrects a problem with the user auto-search that
  12.     will sometimes fail to search all user areas.  In our  case  the
  13.     problem was with NZCPR, Version 1.6.  The problem shows up when,
  14.     for example, you are in USER 4 on DRIVE B and try to  execute  a
  15.     file,  such  as WHATSNEW, that is on B0. NZCPR will first search
  16.     B4; then the  user  area  designated  as  your    restricted  area
  17.     (RESUSER)  if the WHEEL is set for full access; then B0 (if that
  18.     is the DEFUSER that you have specified by  assembly  default  or
  19.     have  set with the DFU function).  In this example WHATSNEW will
  20.     be found on B0, and it will be executed.  If  it  had  not  been
  21.     found  there  the  search  would have continued to DRIVE A, USER
  22.     DEFUSER (in our example, A0).
  23.  
  24.     Now for the problem.  Suppose that the system had done    just  as
  25.     described  above  and WHATSNEW was found on B0 and executed.  If
  26.     WHATSNEW were to be immediately executed again the search  would
  27.     skip  the  search  of  B0 and go to DRIVE A for the search.  The
  28.     problem is in the NZCPR search code.  When this code  determines
  29.     that  a  target  file  is  not on DRIVE B, it sets a flag called
  30.     DFLAG as an in-line code patch.  After not finding the    file  on
  31.     B0,  the  flag    directs  the system to log-on DRIVE A and search
  32.     USER 0.  The problem is - DFLAG IS SET BEFORE  B0  IS  SEARCHED.
  33.     This does not prevent B0 from being searched the first time but,
  34.     if the target file is found there, it is executed without  DFLAG
  35.     being  reset.  The next time the search is made from a user area
  36.     on DRIVE B other than USER 0, DFLAG will send the search directy
  37.     to A0 without searching B0.
  38.  
  39.     The fix for this problem requires the addition of four bytes  of
  40.     code.     This addition will probably not cause an overrun of the
  41.     2K allocation for NZCPR because it only applies when the  SECURE
  42.     assembly  option is selected, in which case considerable code is
  43.     probably not assembled.  That is; if CPRTYP, CPRLST,  or  CPRDIR
  44.     have  been set FALSE.  The new code unconditionally resets DFLAG
  45.     at any time that a file has been found and loaded.  It is  added
  46.     immediately  following    the  label MLA1: just before the file is
  47.     loaded for execution.  This label will be found  very  near  the
  48.     end of the program.  Add the following code:
  49.  
  50.         IF SECURE
  51.         XRA    A        ;get a zero
  52.         STA    DFLAG        ;reset DFLAG
  53.         ENDIF    ;SECURE
  54.  
  55.     This code will be followed by the existing label, LOADADR.
  56.  
  57.     Sorry, but  now  you  must  reassemble    NZCPR,    using  MAC,  and
  58.     reinstall  in  in  your system.  If you have forgotten how to do
  59.     this, look for a library file called CCPLOC.LBR for the details.
  60.  
  61.                         Regards...
  62.                         Charles Horn
  63.                         4 November 1984
  64. is, look for a