<<                                                               >>     00005000
                                                                        00010000
                                                                        00015000
                                                                        00020000
<<                         INCLDRQ5                              >>     00025000
                                                                        00030000
                                                                        00035000
<<===============================================================>>     00040000
<<                                                               >>     00045000
<<             DDDD         RRRRR       QQQQQ       V       V    >>     00050000
<<             D   D        R   R       Q   Q        V     V     >>     00055000
<<             D   D        RRRRR       Q  QQ         V   V      >>     00060000
<<             D   D        R  R        QQQQQQ         V V       >>     00065000
<<             DDDD         R   R            Q          V        >>     00070000
<<===============================================================>>     00075000
                                                                        00080000
                                                                        00085000
                                                                        00090000
$IF X8 = OFF                                                            00095000
$CONTROL NOLIST                                                         00100000
$IF                                                                     00105000
COMMENT                                                                 00110000
                      DISC REQUEST ELEMENT FORMAT                       00115000
                                                                        00120000
                                                                        00125000
              0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15            00130000
            |--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|           00135000
     Word 00|A |M |D |S |I |B |C |D |M |Q |S |P |C |D |D |M |           00140000
            |B |M |I |B |O |K |O |A |M |U |I |F |U |I |I |S |           00145000
            |O |R |A |U |W |D |M |T |E |E |O |A |R |S |S |G |           00150000
            |R |E |G |F |A |  |P |A |R |U |F |I |R |A |A |D |           00155000
            |T |Q |  |  |K |  |  |F |R |E |A |L |E |B |T |O |           00160000
            |  |  |  |  |E |  |  |  |  |  |I |  |Q |  |  |N |           00165000
            |  |  |  |  |  |  |  |  |  |  |L |  |  |  |  |  |           00170000
            |-----------------------------------------------|           00175000
     Word 01|             REQUEST URGENCY CLASS             | URGCLASS  00180000
            |-----------------------------------------------|           00185000
     Word 02|             LOGICAL DEVICE NUMBER             | LDEVN     00190000
            |-----------------------------------------------|           00195000
     Word 03|                 MISCELLANEOUS                 | MISC      00200000
            |-----------------------------------------------|           00205000
     Word 04| S|          DST      (IF PROCESS DISC I/O)    | DSTN      00210000
            |- - - - - - - - - - - - - - - - - - - - - - - -| S=STACK   00215000
            |           BANK       (IF SEGMENT TRANSFER)    |           00220000
            |-----------------------------------------------|           00225000
     Word 05| OFFSET INTO DATA SEG  (IF PROCESS DISC I/O)   | ADDR      00230000
            |- - - - - - - - - - - - - - - - - - - - - - - -|           00235000
            |     ADDRESS IN BANK   (IF SEGMENT TRANSFER)   |           00240000
            |-----------------------------------------------|           00245000
     Word 06|        UNIT #         |       FUNCTION        | FUNC      00250000
            |-----------------------------------------------|           00255000
     Word 07|          COUNT/XLOG/CONTROL RETURNS           | XFERCNT   00260000
            |-----------------------------------------------|           00265000
     Word 08|         P1 (HODA IF SEGMENT TRANSFER          | PAR1      00270000
            |-----------------------------------------------|           00275000
     Word 09|         P2 (LODA IF SEGMENT TRANSFER          | PAR2      00280000
            |-----------------------------------------------|           00285000
     Word 10|//////////////////////////| QUALIFIER | STATUS | STAT      00290000
            |-----------------------------------------------|           00295000
     Word 11|               PCB NUMBER                      | PCBN      00300000
            |-----------------------------------------------|           00305000
     Word 12|        INDEX OF PREV REQUEST IN QUEUE         | PREVREQP  00310000
            |-----------------------------------------------|           00315000
     Word 13|        INDEX OF NEXT REQUEST IN QUEUE         | NEXTREQP  00320000
            |-----------------------------------------------|           00325000
     Word 14|                                               |           00330000
            |-       SEGIDENTIFIER  (IF SEG TRANSFER)      -|SEGIDENT   00335000
     Word 15|                                               |           00340000
            |-----------------------------------------------|           00345000
     Word 16|DISPLACEMENT OF READ OR WRITE FROM SEG BASE(MM)|SEGDISP    00350000
            |-----------------------------------------------|           00355000
                                                                        00360000
Note: Upon return to free list, word (#1) becomes index of next  EE     00365000
 free entry.                                                            00370000
                                                                        00375000
Word 0 - QFLAG - Request dependent flags                                00380000
Bit 0     .ABORT        Request has been aborted externally.            00385000
                                                                        00390000
Bit 1      .MMREQ       Request is for a segment transfer.              00395000
                                                                        00400000
Bit 2     .DIAG         Diagnostic request (not used).                  00405000
                                                                        00410000
Bit 3     .SBUF         System Buffer. Target is a system buffer        00415000
                        whose index is relative to the start of         00420000
                        the SBUF table.                                 00425000
                                                                        00430000
Bit 4     .IOWAKE       Wake caller on completion of request.           00435000
                                                                        00440000
Bit 5     .BLOCKED      Blocked I/O.  Caller is waited in ATTACHIO until00445000
                        request is completed.                           00450000
                                                                        00455000
Bit 6     .COMPLETED    Request has been completed and caller woken if  00460000
                        he had specified.                               00465000
                                                                        00470000
                                                                        00475000
Bit 7     .DATAFRZN     Data segment has been made present and is       00480000
                        frozen.                                         00485000
                                                                        00490000
Bit 8     .MAMERRORD    MAM error on data segment make present.         00495000
                                                                        00500000
Bit 9     .PREQQUEUED   Request is queued into disc's req queue         00505000
                                                                        00510000
Bit 10    .SFAIL        Start SIO failure in GIP.                       00515000
                                                                        00520000
Bit 11    .PFAIL        The I/O has been aborted because of a powerfail.00525000
                                                                        00530000
Bit 12    .CURREQ       Request is device's current request.            00535000
                                                                        00540000
Bit 13    .DISABLED     Request is disabled.                            00545000
                                                                        00550000
Bit 14    .IS'LDRQT     REQUEST IS A LOGICAL DRQ.              <<*7640>>00555000
                                                                        00560000
Bit 15    .INLOCAL      A DST HAS BEEN ADDED TO USER'S LOCALITY<<*7640>>00565000
                                                                        00570000
Word 2 - QLDEV.QLDEVN - Logical Device Number                           00575000
Word 3 - QMISC - Device dependent.                                      00580000
                                                                        00585000
Word 4                                                                  00590000
QDSTN - If SYSBUFRs is clear then this is the DST number of the target  00595000
        data segment.If bit 0 is set then buffer address is a DB offset 00600000
        value instead of segment relative offset (implemented for       00605000
        NOWAIT IO and NOBUFF).                                          00610000
Word 5                                                                  00615000
QADDR - Offset in data segment or sys buff table to target data buffer. 00620000
Word 6                                                                  00625000
QFUNC.FUNC - Function code and qualifiers as specified by driver.       00630000
                                                                        00635000
Word 7                                                                  00640000
QXFERCNT-On initiation specifies the word count if positive or byte     00645000
        count if negative.  At completion of the request this location  00650000
        contains the actual transmission count in the same units as the 00655000
        call.  Certain control requests return data through this        00660000
        location.                                                       00665000
Word 8                                                                  00670000
QPAR1 - Parameter one, defined by driver                                00675000
Word 9                                                                  00680000
QPAR2 - Parameter two, defined by driver                                00685000
QMISC - Miscellaneous request dependent storage available to driver.    00690000
Word 10                                                                 00695000
QSTAT.PCBN - PCB Number of process which made this request.  Zero if    00700000
             not associated with any process and IOQ is to be returned  00705000
             by the system.                                             00710000
     .QUALIFIER - A code which further defies or qualifies the          00715000
                  general status.  Defined by driver.                   00720000
     .STATUS - General Status.  Indicates current and result state of   00725000
               the request according to the following codes.            00730000
                0 - not started or awaiting completion.                 00735000
                1 - successful completion.                              00740000
                2 - end of file detected.                               00745000
                3 - unusual condition.                                  00750000
                4 - irrecoverable error.                                00755000
                                                                        00760000
NOTE: See I/O System Status Returns.                                    00765000
                                                                        00770000
;                                                                       00775000
$CONTROL LIST                                                           00780000
<<   TO PEG THIS SET OF DECLARATIONS THE PROCEDURE MUST HAVE   >>       00785000
<<   THE USER MUST HAVE A LOGICAL VARIABLE:  DRQ'ENTRY'INDEX   >>       00790000
<<   WHICH IS ASSIGNED THE   VALUE OF THE WORD INDEX OF THE     >>      00795000
<<   OF THE DESIRED DRQ.                                       >>       00800000
<<   EG     DRQ'ENTRY'INDEX := MY'DRQ'S'TABLE'WORD'INDEX       >>       00805000
                                                                        00810000
                                                                        00815000
LOGICAL POINTER DRQ = %17;     << SYSTEM TABLE DEFINITION FOR DRQ >>    00820000
                                                                        00825000
                                                                        00830000
EQUATE                                                                  00835000
                                                                        00840000
    DRQ'FLAGS'INDEX   =  0,                                             00845000
    DRQ'URGCLAS'INDEX =  1,                                             00850000
    DRQ'FRE'LNK'INDEX =  1,                                             00855000
    DRQ'LDEV'INDEX    =  2,                                             00860000
    DRQ'QMISC'INDEX   =  3,                                             00865000
    DRQ'BUFDST'INDEX  =  4,                                             00870000
    DRQ'BUFADR'INDEX  =  5,                                             00875000
    DRQ'FUNC'INDEX    =  6,                                             00880000
    DRQ'COUNT'INDEX   =  7,                                             00885000
    DRQ'PARM1'INDEX   =  8,                                             00890000
    DRQ'PARM2'INDEX   =  9,                                             00895000
    DRQ'STATUS'INDEX  =  10,                                            00900000
    DRQ'PCB'INDEX     =  11,                                            00905000
    DRQ'PREVQ'INDEX   =  12,                                            00910000
    DRQ'NEXTQ'INDEX   =  13,                                            00915000
    DRQ'SEGID1'INDEX  =  14,                                            00920000
    DRQ'SEGID2'INDEX  =  15,                                            00925000
    DRQ'SEGDISP'INDEX =  16;                                            00930000
DEFINE                                                                  00935000
                                                                        00940000
    DRQ'FLAGS   =   DRQ(DRQ'ENTRY'INDEX)#,                     <<07412>>00945000
    DRQ'URGCLAS =   DRQ(DRQ'URGCLAS'INDEX+DRQ'ENTRY'INDEX)#,            00950000
    DRQ'FREELINK=   DRQ(DRQ'FRE'LNK'INDEX+DRQ'ENTRY'INDEX)#,            00955000
    DRQ'LDEV    =   DRQ(DRQ'LDEV'INDEX+DRQ'ENTRY'INDEX)#,               00960000
    DRQ'QMISC   =   DRQ(DRQ'QMISC'INDEX+DRQ'ENTRY'INDEX)#,              00965000
    DRQ'BUFDST  =   DRQ(DRQ'BUFDST'INDEX+DRQ'ENTRY'INDEX)#,             00970000
    DRQ'BUFADR  =   DRQ(DRQ'BUFADR'INDEX+DRQ'ENTRY'INDEX)#,             00975000
    DRQ'UNITFNC =   DRQ(DRQ'FUNC'INDEX+DRQ'ENTRY'INDEX)#,               00980000
    DRQ'COUNT   =   DRQ(DRQ'COUNT'INDEX+DRQ'ENTRY'INDEX)#,              00985000
    DRQ'PARM1   =   DRQ(DRQ'PARM1'INDEX+DRQ'ENTRY'INDEX)#,              00990000
    DRQ'PARM2   =   DRQ(DRQ'PARM2'INDEX+DRQ'ENTRY'INDEX)#,              00995000
    DRQ'STAT    =   DRQ(DRQ'STATUS'INDEX+DRQ'ENTRY'INDEX)#,             01000000
    DRQ'PCB     =   DRQ(DRQ'PCB'INDEX+DRQ'ENTRY'INDEX)#,                01005000
    DRQ'PREVQ   =   DRQ(DRQ'PREVQ'INDEX+DRQ'ENTRY'INDEX)#,              01010000
    DRQ'NEXTQ   =   DRQ(DRQ'NEXTQ'INDEX+DRQ'ENTRY'INDEX)#,              01015000
    DRQ'SEGID1  =   DRQ(DRQ'SEGID1'INDEX+DRQ'ENTRY'INDEX)#,             01020000
    DRQ'SEGID2  =   DRQ(DRQ'SEGID2'INDEX+DRQ'ENTRY'INDEX)#,             01025000
    DRQ'SEGDISP =   DRQ(DRQ'SEGDISP'INDEX+DRQ'ENTRY'INDEX)#;            01030000
                                                                        01035000
                                                                        01040000
DEFINE                                                                  01045000
                                                                        01050000
       << THESE FIELD DEFINTION SHOULD AGREE WITH INCLOBJ >>            01055000
   DRQ'SEGID'TYPE     = DRQ'SEGID1.(0:4)#,    << TYPE OF SEGID >>       01060000
   DRQ'SEGID'CSTBLK   = DRQ'SEGID1.(4:12)#,   << INDEX INTO CSTBLK >>   01065000
   DRQ'SEGID'NUMFIELD = DRQ'SEGID2#;          << APPROPRIATE VALUE >>   01070000
                                                                        01075000
                                                                        01080000
DEFINE                                                                  01085000
                                                                        01090000
    DRQ'DBREL   =   DRQ'BUFDST.(0:1)#,    << 1 => IO IS DB REL. >>      01095000
    DRQ'BUF'DSTN=   DRQ'BUFDST.(1:15)#,   <<  DST NUMBER ONLY >>        01100000
    DRQ'UNIT    =   DRQ'UNITFNC.(0:8)#,   << UNIT # ON CONTROLLER >>    01105000
    DRQ'FUNC    =   DRQ'UNITFNC.(8:8)#,   << FUNCTION REQUESTED  >>     01110000
                                                                        01115000
                                                                        01120000
    DRQ'ABORT   =   DRQ'FLAGS.(0:1)#,     << DRQ IS TO BE ABORTED >>    01125000
    DRQ'MMREQ   =   DRQ'FLAGS.(1:1)#,     << SEGMENT XFER REQ. >>       01130000
    DRQ'DIAG    =   DRQ'FLAGS.(2:1)#,     << A DIAGNOSTIC REQUEST >>    01135000
    DRQ'SBUF    =   DRQ'FLAGS.(3:1)#,     << REQ USES SBUFS  >>         01140000
    DRQ'IOWAKE  =   DRQ'FLAGS.(4:1)#,     << WAKE CALLER WHEN DONE >>   01145000
    DRQ'BLOCKED =   DRQ'FLAGS.(5:1)#,     << REQ WAITED IN ATTACHIO>>   01150000
    DRQ'DONE    =   DRQ'FLAGS.(6:1)#,     << REQ IS DONE  >>            01155000
    DRQ'DATAFRZN=   DRQ'FLAGS.(7:1)#,     << DATA IS FROZEN IN MEM >>   01160000
    DRQ'MAMERR  =   DRQ'FLAGS.(8:1)#,     << MAKE PRESENT ERROR >>      01165000
    DRQ'PREQ    =   DRQ'FLAGS.(9:1)#,     << REQ IS QUEUED      >>      01170000
    DRQ'SFAIL   =   DRQ'FLAGS.(10:1)#,    << START IO FAILED   >>       01175000
    DRQ'PFAIL   =   DRQ'FLAGS.(11:1)#,    << A POWERFAIL OCCURED >>     01180000
    DRQ'CUR'REQ =   DRQ'FLAGS.(12:1)#,    << 1=CURRENT REQUEST      >>  01185000
    DRQ'DISABLE =   DRQ'FLAGS.(13:1)#,    << REQUEST IS DISABLED  >>    01190000
    DRQ'IS'LDRQ =   DRQ'FLAGS.(14:1)#,    << REQUEST IS LDR  >><<*7640>>01195000
    DRQ'INLOCAL =   DRQ'FLAGS.(15:1)#,    <<  DST IN LOCALITY>><<*7640>>01200000
    DRQ'MSGDONE =   DRQ'FLAGS.(15:1)#,    <<  DO NOT USE !!! >><<*7640>>01205000
    SERWQFLAG =(8:1)#,                                                  01210000
    DRQ'ON'FREELIST=DRQ'PCB.(0:1)#,       << 1 MEANS ON FREE LIST  >>   01215000
    DRQ'SERWQ  = DRQ'FLAGS.SERWQFLAG#;                                  01220000
