$page "Logical Disc Request Defines/Equates"                            00000100
<<                                                               >>     00001000
                                                                        00002000
                                                                        00003000
                                                                        00004000
<<                         INCLLDR4                              >>     00005000
                                                                        00006000
                                                                        00007000
<<===============================================================>>     00008000
<<                                                               >>     00009000
<<            L            DDDD         RRRRR       4    4       >>     00010000
<<            L            D   D        R   R       4    4       >>     00011000
<<            L            D   D        RRRRR       4444444      >>     00012000
<<            L            D   D        R  R             4       >>     00013000
<<            LLLLLL       DDDD         R   R            4       >>     00014000
<<===============================================================>>     00015000
                                                                        00016000
                                                                        00017000
                                                                        00018000
$IF X8 = OFF                                                            00019000
$CONTROL NOLIST                                                         00020000
$IF                                                                     00021000
COMMENT                                                                 00022000
                                                                        00023000
                LOGICAL DISC REQUEST ELEMENT FORMAT                     00024000
                                                                        00025000
                                                                        00026000
              0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15            00027000
            |--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|           00028000
     Word 00|           |I |B |C |D |S |Q |M |  |  |D |L |M |           00029000
            |           |O |K |O |O |E |U |O |  |  |I |D |S |           00030000
            |           |W |D |M |' |R |E |V |  |  |S |R |G |           00031000
            |           |A |  |P |P |I |U |D |  |  |A |E |D |           00032000
            |           |K |  |  |O |A |E |O |  |  |B |Q |O |           00033000
            |           |E |  |  |S |L |D |N |  |  |  |  |N |           00034000
            |           |  |  |  |T |  |  |E |  |  |  |  |  |           00035000
            |-----------------------------------------------|           00036000
     Word 01|         HODA of extent limit                  | EXT'L'HODA00037000
            |-----------------------------------------------|           00038000
     Word 02|                              LDEV #           | LDEVN     00039000
            |-----------------------------------------------|           00040000
     Word 03|          Mapped Domain CDT entry number       | LDR'CDT   00041000
            |-----------------------------------------------|           00042000
     Word 04| S|          DST      (IF PROCESS DISC I/O)    | DSTN      00043000
            |- - - - - - - - - - - - - - - - - - - - - - - -| S=STACK   00044000
            |           BANK       (IF SEGMENT TRANSFER)    |           00045000
            |-----------------------------------------------|           00046000
     Word 05| OFFSET INTO DATA SEG  (IF PROCESS DISC I/O)   | ADDR      00047000
            |- - - - - - - - - - - - - - - - - - - - - - - -|           00048000
            |     ADDRESS IN BANK   (IF SEGMENT TRANSFER)   |           00049000
            |-----------------------------------------------|           00050000
     Word 06|     STRATEGY          |       FUNCTION        | FUNC      00051000
            |-----------------------------------------------|           00052000
     Word 07|          COUNT/XLOG/CONTROL RETURNS           | XFERCNT   00053000
            |-----------------------------------------------|           00054000
     Word 08|         P1 (HODA IF SEGMENT TRANSFER          | PAR1      00055000
            |-----------------------------------------------|           00056000
     Word 09|         P2 (LODA IF SEGMENT TRANSFER          | PAR2      00057000
            |-----------------------------------------------|           00058000
     Word 10|          PCBN            | QUALIFIER | STATUS | STAT      00059000
            |-----------------------------------------------|           00060000
     Word 11|SYSBASE RELATIVE INDEX OF PREV REQUEST IN QUEUE| PREVREQP  00061000
            |-----------------------------------------------|           00062000
     Word 12|SYSBASE RELATIVE INDEX OF NEXT REQUEST IN QUEUE| NEXTREQP  00063000
            |-----------------------------------------------|           00064000
     Word 13|        HODA of extent base                    | EXT'B'HODA00065000
            |-----------------------------------------------|           00066000
     Word 14|        LODA of extent base                    | EXT'B'LODA00067000
            |-----------------------------------------------|           00068000
     Word 15|        LODA of extent limit                   | EXT'L'LODA00069000
            |-----------------------------------------------|           00070000
                                                                        00071000
Note: Upon return to free list, word (#1) becomes index of next  EE     00072000
 free entry.                                                            00073000
                                                                        00074000
Word 0 - QFLAG - Request dependent flags                                00075000
Bit 0     .ABORT        Request has been aborted externally.            00076000
                                                                        00077000
Bit 1     .MMREQ        Request is for a segment transfer.              00078000
                                                                        00079000
Bit 2     .DIAG         Diagnostic request (not used).                  00080000
                                                                        00081000
Bit 3     .SBUF         System Buffer. Target is a system buffer        00082000
                        whose index is relative to the start of         00083000
                        the SBUF table.                                 00084000
                                                                        00085000
Bit 4     .IOWAKE       Wake caller on completion of request.           00086000
                                                                        00087000
Bit 5     .BLOCKED      Blocked I/O.  Caller is waited in ATTACHIO until00088000
                        request is completed.                           00089000
                                                                        00090000
Bit 6     .COMPLETED    Request has been completed and caller woken if  00091000
                        he had specified.                               00092000
                                                                        00093000
                                                                        00094000
Bit 7     .DO'POST      The disc request must be completed prior        00095000
                        to completion notification (on writes).         00096000
                                                                        00097000
Bit 8     .SERIAL'POST  If this is a write request, it must be placed   00098000
                        in the "serialized" disc request queue.         00098100
                                                                        00099000
Bit 9     .LDR'QUEUED   Request is queued into CDT's active queue.      00100000
                                                                        00101000
Bit 10    .MOVE'DONE    Cache move (of data) to/from region has occured.00102000
                                                                        00103000
Bit 11    .???          Open.                                           00104000
                                                                        00105000
Bit 12    .???          Open.                                           00106000
                                                                        00107000
Bit 13    .DISABLED     Request is disabled.                            00108000
                                                                        00109000
Bit 14    .LDREQ        This bit is set if this entry is a logical disc 00110000
                        request.  If it is not set, this entry is a     00111000
                        normal physical disc request.                   00112000
                                                                        00113000
Bit 15    .MSGDONE      A message request reply has completed.          00114000
                                                                        00115000
Word 1 - High order disc address of current disc extent's limit.        00116000
                                                                        00117000
Word 2 - QLDEV.QLDEVN - Logical Device Number                           00118000
                                                                        00119000
Word 3 - LDR'CDT.  This word contains the CDT entry index for this      00120000
                   request.                                             00121000
                                                                        00122000
Word 4                                                                  00123000
QDSTN - If SYSBUFRs is clear then this is the DST number of the target  00124000
        data segment.If bit 0 is set then buffer address is a DB offset 00125000
        value instead of segment relative offset (implemented for       00126000
        NOWAIT IO and NOBUFF).                                          00127000
Word 5                                                                  00128000
QADDR - Offset in data segment or sys buff table to target data buffer. 00129000
                                                                        00130000
Word 6                                                                  00131000
QFUNC.STRAT- Strategy number to be applied to this request.             00132000
QFUNC.FUNC - Function code and qualifiers as specified by driver.       00133000
                                                                        00134000
Word 7                                                                  00135000
QXFERCNT-On initiation specifies the word count if positive or byte     00136000
        count if negative.  At completion of the request this location  00137000
        contains the actual transmission count in the same units as the 00138000
        call.  Certain control requests return data through this        00139000
        location.                                                       00140000
                                                                        00141000
Word 8                                                                  00142000
QPAR1 - HODA of requested sector.                                       00143000
                                                                        00144000
Word 9                                                                  00145000
QPAR2 - LODA of requested sector.                                       00146000
                                                                        00147000
Word 10                                                                 00148000
QSTAT.PCBN - PCB Number of process which made this request.  Zero if    00149000
             not associated with any process and IOQ is to be returned  00150000
             by the system.                                             00151000
     .QUALIFIER - A code which further defies or qualifies the          00152000
                  general status.  Defined by driver.                   00153000
     .STATUS - General Status.  Indicates current and result state of   00154000
               the request according to the following codes.            00155000
                0 - not started or awaiting completion.                 00156000
                1 - successful completion.                              00157000
                2 - end of file detected.                               00158000
                3 - unusual condition.                                  00159000
                4 - irrecoverable error.                                00160000
                                                                        00161000
NOTE: See I/O System Status Returns.                                    00162000
                                                                        00163000
;                                                                       00164000
$CONTROL LIST                                                           00165000
<<   TO PEG THIS SET OF DECLARATIONS THE PROCEDURE MUST HAVE   >>       00166000
<<   THE USER MUST HAVE A LOGICAL VARIABLE:  LDR'ENTRY'INDEX   >>       00167000
<<   WHICH IS ASSIGNED THE   VALUE OF THE WORD INDEX OF THE     >>      00168000
<<   OF THE DESIRED LDR.                                       >>       00169000
<<   EG     LDR'ENTRY'INDEX := MY'LDR'S'TABLE'WORD'INDEX       >>       00170000
                                                                        00171000
                                                                        00172000
LOGICAL POINTER LDR = %31;     << SYSTEM TABLE DEFINITION FOR LDR >>    00173000
                                                                        00174000
                                                                        00175000
EQUATE                                                                  00176000
                                                                        00177000
    LDR'FLAGS'INDEX   =  0,                                             00178000
    LDR'L'HODA'INDEX  =  1,                                             00179000
    LDR'LDEV'INDEX    =  2,                                             00180000
    LDR'CDT'INDEX     =  3,                                             00181000
    LDR'BUFDST'INDEX  =  4,                                             00182000
    LDR'BUFADR'INDEX  =  5,                                             00183000
    LDR'FUNCT'INDEX   =  6,                                             00184000
    LDR'COUNT'INDEX   =  7,                                             00185000
    LDR'PARM1'INDEX   =  8,                                             00186000
    LDR'PARM2'INDEX   =  9,                                             00187000
    LDR'PCBSTAT'INDEX =  10,                                            00188000
    LDR'PREVQ'INDEX   =  11,                                            00189000
    LDR'NEXTQ'INDEX   =  12,                                            00190000
    LDR'B'HODA'INDEX  =  13,                                            00191000
    LDR'B'LODA'INDEX  =  14,                                            00192000
    LDR'L'LODA'INDEX  =  15;                                            00193000
                                                                        00194000
DEFINE                                                                  00195000
                                                                        00196000
    LDR'FLAGS   =   LDR(<<LDR'FLAGS'INDEX+>>LDR'ENTRY'INDEX)#,          00197000
    LDR'L'HODA  =   LDR(LDR'L'HODA'INDEX+LDR'ENTRY'INDEX)#,             00198000
    LDR'LDEV    =   LDR(LDR'LDEV'INDEX+LDR'ENTRY'INDEX)#,               00199000
    LDR'CDT     =   LDR(LDR'CDT'INDEX+LDR'ENTRY'INDEX)#,                00200000
    LDR'BUFDST  =   LDR(LDR'BUFDST'INDEX+LDR'ENTRY'INDEX)#,             00201000
    LDR'BUFADR  =   LDR(LDR'BUFADR'INDEX+LDR'ENTRY'INDEX)#,             00202000
    LDR'FUNCT   =   LDR(LDR'FUNCT'INDEX+LDR'ENTRY'INDEX)#,              00203000
    LDR'COUNT   =   LDR(LDR'COUNT'INDEX+LDR'ENTRY'INDEX)#,              00204000
    LDR'PARM1   =   LDR(LDR'PARM1'INDEX+LDR'ENTRY'INDEX)#,              00205000
    LDR'PARM2   =   LDR(LDR'PARM2'INDEX+LDR'ENTRY'INDEX)#,              00206000
    LDR'PCBSTAT =   LDR(LDR'PCBSTAT'INDEX+LDR'ENTRY'INDEX)#,            00207000
    LDR'PREVQ   =   LDR(LDR'PREVQ'INDEX+LDR'ENTRY'INDEX)#,              00208000
    LDR'NEXTQ   =   LDR(LDR'NEXTQ'INDEX+LDR'ENTRY'INDEX)#,              00209000
    LDR'B'HODA  =   LDR(LDR'B'HODA'INDEX+LDR'ENTRY'INDEX)#,             00210000
    LDR'B'LODA  =   LDR(LDR'B'LODA'INDEX+LDR'ENTRY'INDEX)#,             00211000
    LDR'L'LODA  =   LDR(LDR'L'LODA'INDEX+LDR'ENTRY'INDEX)#;             00212000
                                                                        00213000
                                                                        00214000
                                                                        00215000
DEFINE                                                                  00216000
                                                                        00217000
    LDR'DBREL   =   LDR'BUFDST.(0:1)#,    << 1 => IO IS DB REL. >>      00218000
    LDR'PCB     =   LDR'PCBSTAT.(0:8)#,   << PCB INDEX FOR PROCESS >>   00221000
    LDR'STAT    =   LDR'PCBSTAT.(8:8)#,   << UNIFORM STATUS RETURN >>   00222000
    LDR'FUNC    =   LDR'FUNCT.(8:8)#,     << REQUEST FUNCTION      >>   00223000
    LDR'STRATEGY=   LDR'FUNCT.(0:8)#,     << CACHE STRATEGY TO USE >>   00224000
                                                                        00225000
                                                                        00226000
<< The following 4 bit defines are not used >>                          00226100
    LDR'ABORT   =   LDR'FLAGS.(0:1)#,     << LDR IS TO BE ABORTED >>    00227000
    LDR'MMREQ   =   LDR'FLAGS.(1:1)#,     << SEGMENT XFER REQ. >>       00228000
    LDR'DIAG    =   LDR'FLAGS.(2:1)#,     << A DIAGNOSTIC REQUEST >>    00229000
    LDR'SBUF    =   LDR'FLAGS.(3:1)#,     << REQ USES SBUFS  >>         00230000
                                                                        00230100
    LDR'IOWAKE  =   LDR'FLAGS.(4:1)#,     << WAKE CALLER WHEN DONE >>   00231000
    LDR'BLOCKED =   LDR'FLAGS.(5:1)#,     << REQ WAITED IN ATTACHIO>>   00232000
    LDR'DONE    =   LDR'FLAGS.(6:1)#,     << REQ IS DONE  >>            00233000
    LDR'DO'POST =   LDR'FLAGS.(7:1)#,     << Must  wait for physical >> 00234000
                                          << I/O completion.         >> 00235000
    LDR'SERIAL'POST=LDR'FLAGS.(8:1)#,     << Serialize writes   >>      00236000
    LDR'CDTQUED =   LDR'FLAGS.(9:1)#,     << REQ IS QUEUED ACT ON CDT >>00237000
    LDR'MOVE'DONE = LDR'FLAGS.(10:1)#,    << Cache move performed    >> 00238000
<<  LDR'PFAIL   =   LDR'FLAGS.(11:1)#,  >><< A POWERFAIL OCCURED >>     00239000
    LDR'CUR'REQ =   LDR'FLAGS.(12:1)#,    << 1=active/cur. request  >>  00240000
    LDR'DISABLE =   LDR'FLAGS.(13:1)#,    << REQUEST IS DISABLED  >>    00241000
    LDR'LDREQ   =   LDR'FLAGS.(14:1)#;    << This is a LDR entry   >>   00242000
<<  LDR'MSGDONE =   LDR'FLAGS.(15:1)#;  >><< MESSAGE HAS COMPLETED >>   00243000
