         << LINES .001/.009 ARE RESERVED FOR SYSTEMS INTEGRATION >>     00000001
<< Fixed PLABEL to print 6 digits of directory size.         >><<P9265>>00107000
<< Several procedures used to set LPDT'RDY'SER'FRN'DISC and >> <<A9301>>00107001
<< LPDT'SERIAL to indicate a mounted serial  disc.  All  of >> <<A9301>>00107002
<< these  references  have been deleted, because these bits >> <<A9301>>00107003
<< must indicate an unmounted serial disc or other routines >> <<A9301>>00107004
<< which wake PVPROC to do automatic AVR will  not  do  so. >> <<A9301>>00107005
<< The  FOREIGN command processor still sets these bits ap- >> <<A9301>>00107006
<< propriately for foreign discs so that  the  "IF  FOREIGN >> <<A9301>>00107007
<< THEN  INAPPROPRIATE" tests in several command processors >> <<A9301>>00107008
<< will continue to work.  All remaining  statements  which >> <<A9301>>00107009
<< set bits in the LPDT have been bracketed by DISABLE/ENA- >> <<A9301>>00107010
<< BLE statements, in accordance with MPE conventions.      >> <<A9301>>00107011
<< Fixed SF672 which occurred if disc cacheing was enabled on>><<d9301>>00107100
<< the FROM device and a read error occurred during COPY.    >><<d9301>>00107200
<< Fixed by changing all disc ATTACHIO calls to P'ATTACHIO.  >><<d9301>>00107300
<<    Kludged serial disc labels for cartridges to read      >><<*9351>>00107301
<< subtype 0, whether it's a Buffalo or Linus.               >><<*9351>>00107302
DEFINE DISABLE = ASSEMBLE(SED 0)#,                             <<A9301>>00980000
       ENABLE  = ASSEMBLE(SED 1)#;                             <<A9301>>00981000
      ,vierr140 = 240 <<Disc Cache Errror on Fdev>>            <<d9301>>01538100
      ,vierr141 = 241 <<Disc Cache error on Tdev>>             <<d9301>>01538200
DOUBLE PROCEDURE P'attachio (ldnum, qmisc, dstx, offset,       <<d9301>>02368100
                 function, count, p1, p2, flags,               <<d9301>>02368200
                 extent'base, extent'length);                  <<d9301>>02368300
   VALUE ldnum, qmisc, dstx, offset, function, count, p1,      <<d9301>>02368400
         p2, flags, extent'base, extent'length;                <<d9301>>02368500
   INTEGER ldnum, qmisc, dstx, offset, function, count, p1,    <<d9301>>02368600
           p2, flags, extent'length;                           <<d9301>>02368700
   DOUBLE extent'base;                                         <<d9301>>02368800
   OPTION PRIVILEGED, UNCALLABLE, EXTERNAL, VARIABLE;          <<d9301>>02368900
                                                                        02369000
PROCEDURE Uncache'Ldev (ldev, statr);                          <<d9301>>02369100
   VALUE ldev;                                                 <<d9301>>02369200
   INTEGER ldev, statr;                                        <<d9301>>02369300
   OPTION PRIVILEGED, UNCALLABLE, EXTERNAL;                    <<d9301>>02369400
                                                                        02369500
PROCEDURE Cache'Ldev (ldev, statr);                            <<d9301>>02369600
   VALUE ldev;                                                 <<d9301>>02369700
   INTEGER ldev, statr;                                        <<d9301>>02369800
   OPTION PRIVILEGED, UNCALLABLE, EXTERNAL;                    <<d9301>>02369900
     INTEGER DST,FL := 1;                                      <<d9301>>02806000
$EDIT VOID=02824000                                            <<d9301>>02816000
     TOS:=P'ATTACHIO(LDEV,0,0,@BUFP,SET'ADDR'SEC,0,0,0,FL);    <<d9301>>02848000
     TOS:=P'ATTACHIO(LDEV,0,DST,@BUFP,FUNCT,WC,ADDR1,ADDR2,FL);<<d9301>>02878000
     IF FL = BLOCKED'IO THEN                                   <<d9301>>02884000
        DISABLE;                                               <<A9301>>09349000
        ENABLE;                                                <<A9301>>09353000
<< NOTE:  The comments and code from here to the end of the >> <<A9301>>09360100
<< procedure are obsolete, except perhaps for the final  IF >> <<A9301>>09360200
<< statement (Dtype = 3 or 4), which is the only reason all >> <<A9301>>09360300
<< of this is left in here.  We now do NOT want to set bits >> <<A9301>>09360400
<< in the LPDT, because this will  prevent  other  routines >> <<A9301>>09360500
<< from  waking PVPROC to do AVR on serial discs which were >> <<A9301>>09360600
<< loaded when the system came up.                          >> <<A9301>>09360700
                                                               <<A9301>>09360800
   <<   IF Dtype = 2 THEN                                      <<A9301>>09450000
   <<      BEGIN                                               <<A9301>>09452000
   <<      LPDT'RDY'SER'FRN'DISC := TRUE;                      <<A9301>>09454000
   <<      LPDT'SERIAL'OR'FOREIGN := LPDT'SERIAL;              <<A9301>>09456000
   <<      END                                                 <<A9301>>09458000
   <<   ELSE >>  IF Dtype = 3 LOR Dtype = 4 THEN               <<A9301>>09460000
   LOCK'DFS'DATA'SEG (LDEV);                                   <<d9301>>10681000
             trklen,fsubtype,tsubtype,                         <<d9301>>12026000
             cached'fdev, cached'tdev, cache'stat;             <<d9301>>12027000
     EQUATE cache'error    = 2;                                <<d9301>>12095000
     EQUATE cached         = 0;                                <<d9301>>12095100
$EDIT VOID=12214000                                            <<A9301>>12200000
<< Stop disc caching if any on both to and from devices     >> <<d9301>>12338100
     UNCACHE'LDEV (FDEV, CACHED'FDEV);                         <<d9301>>12338200
     IF CACHED'FDEV = CACHE'ERROR THEN                         <<d9301>>12338300
        BEGIN                                                  <<d9301>>12338400
        GENMSG (PVMSGSET, VIERR140);                           <<d9301>>12338500
        GOTO XIT;                                              <<d9301>>12338600
        END;                                                   <<d9301>>12338700
     UNCACHE'LDEV (TDEV, CACHED'TDEV);                         <<d9301>>12338800
     IF CACHED'TDEV = CACHE'ERROR THEN                         <<d9301>>12338900
        BEGIN                                                           12339000
        GENMSG (PVMSGSET, VIERR141);                           <<d9301>>12339100
        GOTO XIT;                                              <<d9301>>12339200
        END;                                                   <<d9301>>12339300
                                                                        12339400
$EDIT VOID=12502000                                                     12500000
$EDIT VOID=12510000                                                     12508000
           BEGIN                                               <<d9301>>12522100
           WAITFORIO(WIOQ);  << clean up write IOQ >>          <<d9301>>12523000
           END;                                                <<d9301>>12525000
     DISABLE;                                                  <<A9301>>12684200
     LPDT'RDY'SER'FRN'DISC := FALSE;                           <<A9301>>12684400
     ENABLE;                                                   <<A9301>>12684600
     IF CACHED'FDEV = CACHED THEN CACHE'LDEV(FDEV,CACHE'STAT); <<d9301>>12697000
     IF CACHED'TDEV = CACHED THEN CACHE'LDEV(TDEV,CACHE'STAT); <<d9301>>12697100
     DOUBLE Ddirsize;                                          <<P9265>>14161000
                    "  Dir. Base:     , Dir. Size:       ";    <<*9351>>14288000
                    Ddirsize := double(vlab(ldirsize));        <<P9265>>14292000
                    Dascii(Ddirsize,10,pbuf(30));              <<P9265>>14293000
                    FWRITE(OUTF,PBUFW,-36,0);                  <<P9265>>14294000
          << Kludge for SDC:  Make all cartridges subtype 0 >> <<*9351>>15707000
          << in the serial disc label, even though Buffalo  >> <<*9351>>15707100
          << is really subtype 3.  This is for purposes of  >> <<*9351>>15707200
          << media and drive compatibility between Linus    >> <<*9351>>15707300
          << and Buffalo.                                   >> <<*9351>>15707400
                                                               <<*9351>>15707500
          Subtype := 0;                                        <<*9351>>15710000
$EDIT VOID=16040000                                            <<A9301>>16038000
DISABLE;                                                       <<A9301>>16287000
ENABLE;                                                        <<A9301>>16291000
<< Flags      - Passed directly to P'ATTACHIO.               >><<d9301>>25540000
$EDIT VOID=25550000                                            <<d9301>>25542000
$EDIT VOID=25624000                                            <<d9301>>25624000
$EDIT VOID=25634000                                            <<d9301>>25632000
$EDIT VOID=25732000                                            <<d9301>>25652000
   D'Iostat := P'Attachio(Ldev,Qmisc,0,@Bufp,Funct,Wc,         <<d9301>>25770000
