         << LINES .001/.009 ARE RESERVED FOR SYSTEMS INTEGRATION >>     00000001
        will be enabled.  If the QPARM 2 parameter is one, immediate    02765000
        report for writes will be disabled.                             02770000
         3 |             Logical device number             | DLDEV      03170000
         6 |RW|RU|SH|GR|  |PF|          |EOV|PP|IR| EI  |PA| DSAVE      03200000
        12 | IOT |/////////////////|     Phys. unit #      | DUNIT      03251010
           |--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|            03252010
        13 | Holds the time out request entry index while  | DRQST      03255000
           |--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|            03265000
        14 | Error log. Contains 6 bytes of status from    | DDEVSTAT   03270000
        15 | the previous operation.                       |            03275000
        16 |                                               |            03280000
              GR - Good retries on previous operation.                  03511010
         2 |             Logical device number             | QLDEV      04135000
Comment:                                                       <<J9175>>06700000
08/28/84  Jesse Chin                                                    06781010
          F0828 - Fix retries problem SR#117184 BR592                   06781020
                - Fix problem related to handle the completion          06781030
                  of IOQ'ABORT condition SR#121491 BR733                06781040
                                                               <<J9175>>06781050
09/07/84  Jesse Chin                                           <<J9175>>06781060
          F0907 - Fix DIT DLDEV , DUNIT and IOQ QLDEV size     <<J9175>>06781070
                - SR#123927 fix stream mode 2 -> 0             <<J9175>>06781080
10/30/84  Jesse Chin                                           <<J9400>>06781090
          F1030 - SR#128911/BR996 on multireel STORE, aborting <<J9400>>06781100
                  rewind would got rewind error, motion stop.  <<J9400>>06781110
                  Replace REWIND/OFFLINE with REWIND then      <<J9400>>06781120
                  REWIND/OFFLINE because REWIND/OFFLINE gets   <<J9400>>06781130
                  immediate completion, REWIND would complete  <<J9400>>06781140
                  upon sensing BOT, this fix use a flag        <<J9400>>06781150
                  bit in DIT DSAVE for rewind pending to       <<J9400>>06781160
                  prevent issuing an idle program if user      <<J9400>>06781170
                  aborting this operation while rewinding.     <<J9400>>06781180
                                                               <<J9400>>06781190
11/15/84  Jesse Chin                                           <<J9459>>06782010
          F1115 - SR#134106 fix problem with write ring check  <<J9459>>06782020
                  causes FS error 29 due to error in restart   <<J9459>>06782030
                  channel program after transparent status     <<J9459>>06782040
                  report from the tape drive.                  <<J9459>>06782050
01/08/85  Jesse Chin                                           <<J9891>>06782060
          F0129 - SR#139964/BR1261 fix problem with Rewind/    <<J9891>>06782070
                  Offline followed by another Rwd/Offline.     <<J9891>>06782080
01/23/85  Jesse Chin                                           <<J9891>>06782090
                - SR#141465/BR1281 workaround a multiple PFail <<J9891>>06782100
                  of SPU at 200 ms hang system in a loop.      <<J9891>>06782110
4/1/85    Jan Helmbolt                                         <<*1112>>06782200
        F44HOTMM Changes the DIT'ERR'LOG'INDEX to point to the <<*1112>>06782210
                 correct word in the DIT for the STATUS words  <<*1112>>06782220
                 so LISTLOG5 will report correct status        <<*1112>>06782230
06/26/85  Jesse Chin                                           <<01331>>06782300
          F0626 - SR#139014 fix problem with single byte xfer  <<01331>>06782310
                  from left byte. Some old GIC has timing      <<01331>>06782320
                  problem which would missing EOI in this case.<<01331>>06782330
                                                               <<J2161>>06782340
03/14/86  Jesse Chin                                           <<J2161>>06782350
          F0314 - SR#5000-109439                               <<J2161>>06782360
                  Allow read larger than 16K block data        <<J2161>>06782370
                                                               <<J2161>>06782380
05/02/86  Jesse Chin SR#5000-105502                            <<J2184>>06782390
          FEOF - Fix EOF processing                            <<J2184>>06782400
                                                               <<J2184>>06782410
;                                                              <<J9175>>06785000
$EDIT VOID=7095000                                             <<01331>>07011100
  << The following command bytes are shifted to high order >>  <<01331>>07011200
  << byte in order to serve as a hardware workaround for a >>  <<01331>>07011300
  << single command transfer, some old GIC does not have   >>  <<01331>>07011400
  << enough time to attach EOI to the command byte in the  >>  <<01331>>07011500
  << right byte of a word.  SR#4700-134106                 >>  <<01331>>07011600
  TC'FILE'MARK      = [8/6 ,8/0], << Write EOF.                   >>    07011700
  TC'GAP'TAPE       = [8/7 ,8/0], << Write gap.                   >>    07011800
  TC'READ           = [8/8 ,8/0], << Read record.                 >>    07011900
  TC'NEXT'RECORD    = [8/9 ,8/0], << Forward space to next record.>>    07012000
  TC'PREV'RECORD    = [8/10,8/0], << Backspace to prior record.   >>    07012100
  TC'NEXT'FILE      = [8/11,8/0], << Forward space to next file.  >>    07012200
  TC'PREV'FILE      = [8/12,8/0], << Backspace to prior file.     >>    07012300
  TC'REWIND         = [8/13,8/0], << Rewind tape.                 >>    07012400
  TC'REWIND'OFFLINE = [8/14,8/0], << Rewind tape and offline.     >>    07012500
  TC'DENSITY'6250   = [8/16,8/0], << 6250 BPI (GCR).              >>    07012600
  TC'DENSITY'1600   = [8/17,8/0], << 1600 BPI (PE).               >>    07012700
  TC'DENSITY'800    = [8/18,8/0], << 800 BPI (NRZI).              >>    07012800
  TC'START'STOP     = [8/20,8/0], << Enable start/stop mode.      >>    07012900
  TC'STREAM         = [8/21,8/0], << Enable streaming mode.       >>    07013000
  TC'DISABLE'IMMED  = [8/22,8/0], << Disable immediate report.    >>    07013100
  TC'ENABLE'IMMED   = [8/23,8/0], << Enable immediate report.     >>    07013200
  TC'DEV'STATUS     = [8/24,8/0], << Read device status.          >>    07013300
  DIT'ERR'LOG'INDEX    = 12   ,                                <<*1112>>07290000
  COMPLETOR'STATE      = 3    ,                                <<J9400>>07311010
  STREAM               = 0    , <<SR#123927>>                  <<J9175>>07400000
  DUNIT     = %12,                                             <<J9175>>07501010
  DRQST     = %13,                                             <<J9175>>07505000
  DDEVSTAT1 = %14,                                             <<J9175>>07510000
  DDEVSTAT2 = %15,                                             <<J9175>>07515000
  DDEVSTAT3 = %16;                                             <<J9175>>07520000
                                                               <<J9175>>07560000
  DSAVE'GR'BIT      = ( 3:1)#,                                          07576010
  DSAVE'RP'BIT      = ( 4:1)#,                                 <<J9400>>07576020
  DIT'LDEV             =  P'DIT (DLDEV    )                  #,<<J9175>>07780000
  DIT'GOOD'RETRY       =  P'DIT (DSAVE    ).DSAVE'GR'BIT     #,         07811010
  DIT'REWIND'PEND      =  P'DIT (DSAVE    ).DSAVE'RP'BIT     #,<<J9400>>07811020
  [8/15, 8/%21], << DIT size, not core res.>>                  <<J9175>>09555000
                 << idle chan pgm, type 1. >>                  <<J9175>>09555010
              0, << DIT'LDEV             >>                    <<J9175>>09615000
         %40000, << HPIB TYPE DEVICE     >>                    <<J9175>>09646010
<< 5   >>   %2000,                                             <<01331>>09785000
<< 22  >>   %2000,                                             <<01331>>10020000
<< 42  >>   %2000,                                             <<01331>>10240000
<< 54  >>   %2000,                                             <<01331>>10400000
<< 66  >>   %2000,                                             <<01331>>10560000
<< 78  >>   %2000,                                             <<01331>>10720000
<< 109 >>   %2000, << CEND'IDLE'BANK, >>                       <<01331>>11155000
<< 126 >>   %2000,                                             <<01331>>11375000
<< 138 >>   %2000,                                             <<01331>>11530000
<< 143 >>   %1000, << CEND'DATA'CMD.   >>                      <<01331>>11605000
<< 144 >>   %4000, << CEND'CMPL'CMD.   >>                      <<01331>>11610000
<< 152 >>   %2000, << CEND'IDLE'CMD.   >>                      <<01331>>11650000
IF DIT'REWIND'PEND AND                                         <<J9400>>13930010
  DIT'PENDING'ABORT AND                                        <<J9400>>13930020
  NOT DIT'POWERFAIL AND                                        <<J9891>>13930030
  IOQ'INDEX = 0 THEN                                           <<J9891>>13930040
  BEGIN                                                        <<J9891>>13930050
    DRIVER'STATE := REQUEST'COMPLETE;                          <<J9891>>13930060
    RETURN;                                                    <<J9891>>13930070
  END;                                                         <<J9891>>13930080
  IP'CHAN'PGM (CEND'IDLE'BANK) := %2000 ;                      <<01331>>13985000
  IF IOQ'FUNCTION'CODE = FC'REWIND'OFFLINE AND                 <<J9400>>14096010
    NOT IOQ'POWERFAIL AND                                      <<J9400>>14096020
    DIT'REWIND'PEND THEN                                       <<J9400>>14096030
    BEGIN                                                      <<J9400>>14096040
      DIT'PENDING'ABORT := TRUE;                               <<J9400>>14096050
      IF DRIVER'STATE = COMPLETOR'STATE THEN                   <<J9891>>14096060
        IF IP'CHAN'PGM (CCMD'DSJ0-1) >= 0 THEN                 <<J9891>>14096070
        GO TO COMPLETE'REQUEST ELSE                            <<J9891>>14096080
        BEGIN                                                  <<J9891>>14096090
          DRIVER'STATE := INTERRUPT'WAIT;                      <<J9891>>14096100
          RETURN;                                              <<J9891>>14096110
        END;                                                   <<J9891>>14096120
      DRIVER'STATE := REQUEST'COMPLETE;                        <<J9891>>14096130
      IOQ'IO'STATUS := SYSTEM'ABORT;                           <<J9891>>14096140
      RETURN;                                                  <<J9891>>14096150
    END;                                                       <<J9891>>14096160
    GO TO COMPLETE'SYS'ABORT;                                  <<J9160>>14225000
      DIT'GOOD'RETRY := 1;                                     <<J9160>>15191010
      IF IOQ'FUNCTION'CODE = FC'WRITE and                      <<J9459>>15245000
      ioq'transfer'count <> 0 then                             <<J9459>>15245100
   TRANSFER'COUNT > MAXIMUM'TRANSFER AND                       <<J2161>>16025000
   IOQ'FUNCTION'CODE <> FC'READ THEN                           <<J2161>>16025100
       NOT DIT'UNIT'ONLINE << don't bother,its already there.>><<J9891>>17670000
       or dit'load'point and not dit'unit'online then          <<J9891>>17670100
    IP'CHAN'PGM (CCMD'DSJ0 - 1) := -1             ;            <<J9891>>17746000
    IP'CHAN'PGM (CTAPE'CMD  ) := TC'REWIND;                    <<J9400>>17750000
    DIT'REWIND'PEND := TRUE;                                   <<J9400>>17750010
    TOS := BUF'BANK'ADR; << SHIFT COMMAND BYTE TO LEFT >>      <<01331>>19495000
    ASSEMBLE (LSEA);                                           <<01331>>19495100
    ASSEMBLE (LSL 8);                                          <<01331>>19495200
    ASSEMBLE (SSEA);                                           <<01331>>19495300
    DDEL;                                                      <<01331>>19495400
    IP'CHAN'PGM (CWR'BANK    ) := BUF'BANK; << left byte. >>   <<01331>>19495500
IF IOQ'FUNCTION'CODE = FC'REWIND'OFFLINE AND                   <<J9400>>23350010
  DIT'REWIND'PEND AND                                          <<J9400>>23350020
  DIT'UNIT'ONLINE THEN                                         <<J9400>>23350030
  BEGIN                                                        <<J9400>>23350040
    IP'CHAN'PGM (CSTART'JVEC) := 0;                            <<J9400>>23350050
    IP'CHAN'PGM (CCMD'DSJ0  ) := 20;                           <<J9400>>23350060
    IP'CHAN'PGM (CTAPE'CMD  ) := TC'REWIND'OFFLINE;            <<J9400>>23350070
    DIT'REWIND'PEND := FALSE;                                  <<J9400>>23350080
    GO TO START'CHAN'PGM;                                      <<J9400>>23350090
  END;                                                         <<J9400>>23350100
COMPLETE'SYS'ABORT:                                            <<J9160>>23531010
  IF IOQ'FUNCTION'CODE = FC'REWIND'OFFLINE                     <<J9400>>23600010
  THEN DIT'REWIND'PEND := FALSE;                               <<J9400>>23600020
  IF IOQ'BACKSPACE'EOF THEN                                    <<J2184>>23906000
  BEGIN                                                        <<J2184>>23906100
    DRIVER'STATE := REQUEST'COMPLETE;                          <<J2184>>23906200
    RETURN;                                                    <<J2184>>23906300
  END;                                                         <<J2184>>23906400
ELSE IF DIT'GOOD'RETRY AND IOQ'RETRY'COUNT > 0 THEN            <<J9160>>25536010
BEGIN                                                          <<J9160>>25536020
  IOQ'IO'STATUS := GOOD'RETRY;                                 <<J9160>>25536030
  DIT'GOOD'RETRY := 0;                                         <<J9160>>25536040
END                                                            <<J9160>>25536050
