         << LINES .001/.009 ARE RESERVED FOR SYSTEMS INTEGRATION >>     00000001
$PAGE "Logical Disc Request Defines/Equates"                            00010000
<<                                                               >>     00015000
                                                                        00020000
                                                                        00025000
                                                                        00030000
<<                         INCLLDR4                              >>     00035000
                                                                        00040000
                                                                        00045000
<<===============================================================>>     00050000
<<                                                               >>     00055000
<<            L            DDDD         RRRRR       4    4       >>     00060000
<<            L            D   D        R   R       4    4       >>     00065000
<<            L            D   D        RRRRR       4444444      >>     00070000
<<            L            D   D        R  R             4       >>     00075000
<<            LLLLLL       DDDD         R   R            4       >>     00080000
<<===============================================================>>     00085000
                                                                        00090000
                                                                        00095000
                                                                        00100000
$IF X8 = OFF                                                            00105000
$CONTROL NOLIST                                                         00110000
$IF                                                                     00115000
COMMENT                                                                 00120000
                                                                        00125000
                LOGICAL DISC REQUEST ELEMENT FORMAT                     00130000
                                                                        00135000
                                                                        00140000
              0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15            00145000
            |--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|           00150000
     Word 00|  STRATEGY |I |B |C |N |  |Q |M |  |  |D |L |M |           00155000
            |           |O |K |O |O |  |U |O |  |  |I |D |S |           00160000
            |           |W |D |M |' |  |E |V |  |  |S |R |G |           00165000
            |           |A |  |P |P |  |U |D |  |  |A |E |D |           00170000
            |           |K |  |  |O |  |E |O |  |  |B |Q |O |           00175000
            |           |E |  |  |S |  |D |N |  |  |  |  |N |           00180000
            |           |  |  |  |T |  |  |E |  |  |  |  |  |           00185000
            |-----------------------------------------------|           00190000
     Word 01|         HODA of extent limit                  | EXT'L'HODA00195000
            |-----------------------------------------------|           00200000
     Word 02|       UNIT #          |      LDEV #           | LDEVN     00205000
            |-----------------------------------------------|           00210000
     Word 03|          Mapped Domain CDT entry number       | LDR'CDT   00215000
            |-----------------------------------------------|           00220000
     Word 04| S|          DST      (IF PROCESS DISC I/O)    | DSTN      00225000
            |- - - - - - - - - - - - - - - - - - - - - - - -| S=STACK   00230000
            |           BANK       (IF SEGMENT TRANSFER)    |           00235000
            |-----------------------------------------------|           00240000
     Word 05| OFFSET INTO DATA SEG  (IF PROCESS DISC I/O)   | ADDR      00245000
            |- - - - - - - - - - - - - - - - - - - - - - - -|           00250000
            |     ADDRESS IN BANK   (IF SEGMENT TRANSFER)   |           00255000
            |-----------------------------------------------|           00260000
     Word 06|     STRATEGY          |       FUNCTION        | FUNC      00265000
            |-----------------------------------------------|           00270000
     Word 07|          COUNT/XLOG/CONTROL RETURNS           | XFERCNT   00275000
            |-----------------------------------------------|           00280000
     Word 08|         P1 (HODA IF SEGMENT TRANSFER          | PAR1      00285000
            |-----------------------------------------------|           00290000
     Word 09|         P2 (LODA IF SEGMENT TRANSFER          | PAR2      00295000
            |-----------------------------------------------|           00300000
     Word 10|          PCBN            | QUALIFIER | STATUS | STAT      00305000
            |-----------------------------------------------|           00310000
     Word 11|SYSBASE RELATIVE INDEX OF PREV REQUEST IN QUEUE| PREVREQP  00315000
            |-----------------------------------------------|           00320000
     Word 12|SYSBASE RELATIVE INDEX OF NEXT REQUEST IN QUEUE| NEXTREQP  00325000
            |-----------------------------------------------|           00330000
     Word 13|        HODA of extent base                    | EXT'B'HODA00335000
            |-----------------------------------------------|           00340000
     Word 14|        LODA of extent base                    | EXT'B'LODA00345000
            |-----------------------------------------------|           00350000
     Word 15|        LODA of extent limit                   | EXT'L'LODA00355000
            |-----------------------------------------------|           00360000
                                                                        00365000
Note: Upon return to free list, word (#1) becomes index of next  EE     00370000
 free entry.                                                            00375000
                                                                        00380000
Word 0 - QFLAG - Request dependent flags                                00385000
Bit 0     .ABORT        Request has been aborted externally.            00390000
                                                                        00395000
Bit 1     .MMREQ        Request is for a segment transfer.              00400000
                                                                        00405000
Bit 2     .DIAG         Diagnostic request (not used).                  00410000
                                                                        00415000
Bit 3     .SBUF         System Buffer. Target is a system buffer        00420000
                        whose index is relative to the start of         00425000
                        the SBUF table.                                 00430000
                                                                        00435000
Bit 4     .IOWAKE       Wake caller on completion of request.           00440000
                                                                        00445000
Bit 5     .BLOCKED      Blocked I/O.  Caller is waited in ATTACHIO until00450000
                        request is completed.                           00455000
                                                                        00460000
Bit 6     .COMPLETED    Request has been completed and caller woken if  00465000
                        he had specified.                               00470000
                                                                        00475000
                                                                        00480000
Bit 7     .NO'POST      The disc request can be marked completed prior  00485000
                        to the actual "physical" disc I/O completion.   00490000
                                                                        00495000
Bit 8     .???          Open.                                           00500000
                                                                        00505000
Bit 9     .LDR'QUEUED   Request is queued into CDT's active queue.      00510000
                                                                        00515000
Bit 10    .MOVE'DONE    Cache move (of data) to/from region has occured.00520000
                                                                        00525000
Bit 11    .???          Open.                                           00530000
                                                                        00535000
Bit 12    .???          Open.                                           00540000
                                                                        00545000
Bit 13    .DISABLED     Request is disabled.                            00550000
                                                                        00555000
Bit 14    .LDREQ        This bit is set if this entry is a logical disc 00560000
                        request.  If it is not set, this entry is a     00565000
                        normal physical disc request.                   00570000
                                                                        00575000
Bit 15    .MSGDONE      A message request reply has completed.          00580000
                                                                        00585000
Word 1 - High order disc address of current disc extent's limit.        00590000
                                                                        00595000
Word 2 - QLDEV.QLDEVN - Logical Device Number                           00600000
                                                                        00605000
Word 3 - LDR'CDT.  This word contains the CDT entry index for this      00610000
                   request.                                             00615000
                                                                        00620000
Word 4                                                                  00625000
QDSTN - If SYSBUFRs is clear then this is the DST number of the target  00630000
        data segment.If bit 0 is set then buffer address is a DB offset 00635000
        value instead of segment relative offset (implemented for       00640000
        NOWAIT IO and NOBUFF).                                          00645000
Word 5                                                                  00650000
QADDR - Offset in data segment or sys buff table to target data buffer. 00655000
                                                                        00660000
Word 6                                                                  00665000
QFUNC.STRAT- Strategy number to be applied to this request.             00670000
QFUNC.FUNC - Function code and qualifiers as specified by driver.       00675000
                                                                        00680000
Word 7                                                                  00685000
QXFERCNT-On initiation specifies the word count if positive or byte     00690000
        count if negative.  At completion of the request this location  00695000
        contains the actual transmission count in the same units as the 00700000
        call.  Certain control requests return data through this        00705000
        location.                                                       00710000
                                                                        00715000
Word 8                                                                  00720000
QPAR1 - HODA of requested sector.                                       00725000
                                                                        00730000
Word 9                                                                  00735000
QPAR2 - LODA of requested sector.                                       00740000
                                                                        00745000
Word 10                                                                 00750000
QSTAT.PCBN - PCB Number of process which made this request.  Zero if    00755000
             not associated with any process and IOQ is to be returned  00760000
             by the system.                                             00765000
     .QUALIFIER - A code which further defies or qualifies the          00770000
                  general status.  Defined by driver.                   00775000
     .STATUS - General Status.  Indicates current and result state of   00780000
               the request according to the following codes.            00785000
                0 - not started or awaiting completion.                 00790000
                1 - successful completion.                              00795000
                2 - end of file detected.                               00800000
                3 - unusual condition.                                  00805000
                4 - irrecoverable error.                                00810000
                                                                        00815000
NOTE: See I/O System Status Returns.                                    00820000
                                                                        00825000
;                                                                       00830000
$CONTROL LIST                                                           00835000
<<   TO PEG THIS SET OF DECLARATIONS THE PROCEDURE MUST HAVE   >>       00840000
<<   THE USER MUST HAVE A LOGICAL VARIABLE:  LDR'ENTRY'INDEX   >>       00845000
<<   WHICH IS ASSIGNED THE   VALUE OF THE WORD INDEX OF THE     >>      00850000
<<   OF THE DESIRED LDR.                                       >>       00855000
<<   EG     LDR'ENTRY'INDEX := MY'LDR'S'TABLE'WORD'INDEX       >>       00860000
                                                                        00865000
                                                                        00870000
LOGICAL POINTER LDR = %31;     << SYSTEM TABLE DEFINITION FOR LDR >>    00875000
                                                                        00880000
                                                                        00885000
EQUATE                                                                  00890000
                                                                        00895000
    LDR'FLAGS'INDEX   =  0,                                             00900000
    LDR'L'HODA'INDEX  =  1,                                             00905000
    LDR'UNITLDEV'INDEX=  2,                                             00910000
    LDR'CDT'INDEX     =  3,                                             00915000
    LDR'BUFDST'INDEX  =  4,                                             00920000
    LDR'BUFADR'INDEX  =  5,                                             00925000
    LDR'FUNCT'INDEX   =  6,                                             00930000
    LDR'COUNT'INDEX   =  7,                                             00935000
    LDR'PARM1'INDEX   =  8,                                             00940000
    LDR'PARM2'INDEX   =  9,                                             00945000
    LDR'PCBSTAT'INDEX =  10,                                            00950000
    LDR'PREVQ'INDEX   =  11,                                            00955000
    LDR'NEXTQ'INDEX   =  12,                                            00960000
    LDR'B'HODA'INDEX  =  13,                                            00965000
    LDR'B'LODA'INDEX  =  14,                                            00970000
    LDR'L'LODA'INDEX  =  15;                                            00975000
                                                                        00980000
DEFINE                                                                  00985000
                                                                        00990000
    LDR'FLAGS   =   LDR(LDR'FLAGS'INDEX+LDR'ENTRY'INDEX)#,              00995000
    LDR'L'HODA  =   LDR(LDR'L'HODA'INDEX+LDR'ENTRY'INDEX)#,             01000000
    LDR'UNITLDEV=   LDR(LDR'UNITLDEV'INDEX+LDR'ENTRY'INDEX)#,           01005000
    LDR'CDT     =   LDR(LDR'CDT'INDEX+LDR'ENTRY'INDEX)#,                01010000
    LDR'BUFDST  =   LDR(LDR'BUFDST'INDEX+LDR'ENTRY'INDEX)#,             01015000
    LDR'BUFADR  =   LDR(LDR'BUFADR'INDEX+LDR'ENTRY'INDEX)#,             01020000
    LDR'FUNCT   =   LDR(LDR'FUNCT'INDEX+LDR'ENTRY'INDEX)#,              01025000
    LDR'COUNT   =   LDR(LDR'COUNT'INDEX+LDR'ENTRY'INDEX)#,              01030000
    LDR'PARM1   =   LDR(LDR'PARM1'INDEX+LDR'ENTRY'INDEX)#,              01035000
    LDR'PARM2   =   LDR(LDR'PARM2'INDEX+LDR'ENTRY'INDEX)#,              01040000
    LDR'PCBSTAT =   LDR(LDR'PCBSTAT'INDEX+LDR'ENTRY'INDEX)#,            01045000
    LDR'PREVQ   =   LDR(LDR'PREVQ'INDEX+LDR'ENTRY'INDEX)#,              01050000
    LDR'NEXTQ   =   LDR(LDR'NEXTQ'INDEX+LDR'ENTRY'INDEX)#,              01055000
    LDR'B'HODA  =   LDR(LDR'B'HODA'INDEX+LDR'ENTRY'INDEX)#,             01060000
    LDR'B'LODA  =   LDR(LDR'B'LODA'INDEX+LDR'ENTRY'INDEX)#,             01065000
    LDR'L'LODA  =   LDR(LDR'L'LODA'INDEX+LDR'ENTRY'INDEX)#;             01070000
                                                                        01075000
                                                                        01080000
                                                                        01085000
DEFINE                                                                  01090000
                                                                        01095000
    LDR'DBREL   =   LDR'BUFDST.(0:1)#,    << 1 => IO IS DB REL. >>      01100000
    LDR'UNIT    =   LDR'UNITLDEV.(0:8)#,  << UNIT # ON CONTROLLER >>    01105000
    LDR'LDEV    =   LDR'UNITLDEV.(8:8)#,  << Logical device number>>    01110000
    LDR'PCB     =   LDR'PCBSTAT.(0:8)#,   << PCB INDEX FOR PROCESS >>   01115000
    LDR'STAT    =   LDR'PCBSTAT.(8:8)#,   << UNIFORM STATUS RETURN >>   01120000
    LDR'FUNC    =   LDR'FUNCT.(8:8)#,     << REQUEST FUNCTION      >>   01125000
    LDR'STRATEGY=   LDR'FUNCT.(0:8)#,     << CACHE STRATEGY TO USE >>   01130000
                                                                        01135000
                                                                        01140000
    LDR'ABORT   =   LDR'FLAGS.(0:1)#,     << LDR IS TO BE ABORTED >>    01145000
    LDR'MMREQ   =   LDR'FLAGS.(1:1)#,     << SEGMENT XFER REQ. >>       01150000
    LDR'DIAG    =   LDR'FLAGS.(2:1)#,     << A DIAGNOSTIC REQUEST >>    01155000
    LDR'SBUF    =   LDR'FLAGS.(3:1)#,     << REQ USES SBUFS  >>         01160000
    LDR'IOWAKE  =   LDR'FLAGS.(4:1)#,     << WAKE CALLER WHEN DONE >>   01165000
    LDR'BLOCKED =   LDR'FLAGS.(5:1)#,     << REQ WAITED IN ATTACHIO>>   01170000
    LDR'DONE    =   LDR'FLAGS.(6:1)#,     << REQ IS DONE  >>            01175000
    LDR'NO'POST =   LDR'FLAGS.(7:1)#,     << Don't wait for physical >> 01180000
                                          << I/O completion.         >> 01185000
<<  LDR'MAMERR  =   LDR'FLAGS.(8:1)#,   >><< MAKE PRESENT ERROR >>      01190000
    LDR'CDTQUED =   LDR'FLAGS.(9:1)#,     << REQ IS QUEUED ACT ON CDT >>01195000
    LDR'MOVE'DONE = LDR'FLAGS.(10:1)#,    << Cache move performed    >> 01200000
<<  LDR'PFAIL   =   LDR'FLAGS.(11:1)#,  >><< A POWERFAIL OCCURED >>     01205000
    LDR'CUR'REQ =   LDR'FLAGS.(12:1)#,    << 1=active/cur. request  >>  01210000
    LDR'DISABLE =   LDR'FLAGS.(13:1)#,    << REQUEST IS DISABLED  >>    01215000
    LDR'LDREQ   =   LDR'FLAGS.(14:1)#,    << This is a LDR entry   >>   01220000
    LDR'MSGDONE =   LDR'FLAGS.(15:1)#;    << MESSAGE HAS COMPLETED >>   01225000
