         << LINES .001/.009 ARE RESERVED FOR SYSTEMS INTEGRATION >>     00000001
                                                               << 1505>>00260010
This fix doubled the number of buffers to 32 (30 for terminal) << 1505>>00260020
   MERLIN         = ( DTYPE = 3 LAND STYPE = 6 )#,             << 1321>>00346000
   CARTRIDGE'TAPE = ( D7911ETALL OR BUFFALO OR MERLIN)#,       << 1321>>00350000
   BUFFMAXFREE = 32, << Max. number of device buffers >>       << 1505>>00550000
   TERMINALMAXFREE = 30, << Max. number of bufs for terms >>   << 1505>>00555000
  LOGICAL SAVE'REQ'COUNT; << save lpdt'serv'req'count  >>      << 9279>>01021000
  LOGICAL REQ'FOUND; << set to false if no request found >>    << 9279>>01022000
<< if down pending then down the device >>                              02236000
TOS := @LDT;                                                            02236100
TOS := LDT'DST;                                                         02236200
TOS := INDEV * SIZE'OF'LDT'ENTRY;                                       02236300
TOS := SIZE'OF'LDT'ENTRY;                                               02236400
ASSEMBLE (MFDS 4);                                                      02236500
LDT'INDEX := 0;                                                         02236600
IF LDT'DOWN'PENDING THEN                                                02236700
   BEGIN                                                                02236800
   LDT'AVAIL'TO'SYS := FALSE;                                           02236900
   LDT'DOWN'PENDING := FALSE;                                           02237000
   TOS := LDT'DST;                                                      02237200
   TOS := INDEV * SIZE'OF'LDT'ENTRY;                                    02237300
   TOS := @LDT;                                                         02237400
   TOS := SIZE'OF'LDT'ENTRY;                                            02237500
   ASSEMBLE (MTDS 4);                                                   02237600
   END;                                                                 02237700
                                                                        02237800
REQ'FOUND := TRUE; << to get into the loop the 1st time >>     << 9279>>02871000
COMMENT                                                        << 9279>>02891000
  DEVREC's old strategy was to go thru the LPDT until the      << 9279>>02892000
  serv'req'count = 0. If the count was somehow incorrect,      << 9279>>02893000
  (s)he may be in the loop forever. This did happened!!.       << 9279>>02894000
  The new strategy now is:                                     << 9279>>02895000
    * within the loop, go thru the entire LPDT once.           << 9279>>02896000
    * if no request is found, adjust the request count.        << 9279>>02897000
    * if count is still > 0, go thru loop again.               << 9279>>02897100
; << end comment  >>                                           << 9279>>02898000
                                                               << 9279>>02898100
DISABLE;                                                                02911000
IF (INTEGER(LPDT'SERV'REQ'COUNT)) < 0  THEN                    << 9279>>02912000
   LPDT'SERV'REQ'COUNT := 0;  << just in case it's negative >> << 9279>>02913000
ENABLE;                                                        << 9279>>02914000
REQ'FOUND := FALSE; << will be true if a request is found >>   << 9279>>02916000
SAVE'REQ'COUNT := LPDT'SERV'REQ'COUNT;                         << 9279>>02917000
WHILE (LPDT'INDEX := LPDT'INDEX +                              << 9279>>02920000
      REQ'FOUND := TRUE;                                       << 9279>>02956000
            IF (INDEV <> OUTDEV) OR LDT'CLASS'INDEX THEN       << 9293>>03060000
         << if ldt'class'index is set, the variable OUTDEV  >> << 9293>>03061000
         << contains the Dev Class Table index, so in <> out>> << 9293>>03062000
disable;                                                                03436000
IF NOT REQ'FOUND AND LPDT'SERV'REQ'COUNT > 0  THEN             << 9279>>03436100
   LPDT'SERV'REQ'COUNT := LPDT'SERV'REQ'COUNT-SAVE'REQ'COUNT;  << 9279>>03436200
   << decrement current count to correct number  >>            << 2081>>03436300
enable;                                                                 03436400
IF INT AND ( INDEV = OUTDEV ) THEN  << prompt  >>                       04255000
IF INDEV <> OUTDEV THEN OUTDEV := 0; << console  >>                     04880000
