$PAGE "Logical Disc Request Defines/Equates"                            00005000
<<                                                               >>     00010000
                                                                        00015000
                                                                        00020000
                                                                        00025000
<<                         INCLLDR                               >>     00030000
                                                                        00035000
                                                                        00040000
<<===============================================================>>     00045000
<<                                                               >>     00050000
<<            L            DDDD         RRRRR                    >>     00055000
<<            L            D   D        R   R                    >>     00060000
<<            L            D   D        RRRRR                    >>     00065000
<<            L            D   D        R  R                     >>     00070000
<<            LLLLLL       DDDD         R   R                    >>     00075000
<<===============================================================>>     00080000
                                                                        00085000
<< If X6=ON, special DB-relative defines are compiled.  They >>         00090000
<< are conditioned by a switch to eliminate them for code    >>         00095000
<< which may have symbol table problems in SPL.  Currently,  >>         00100000
<< CACHESEG uses the additional symbols.                     >>         00105000
                                                                        00110000
                                                                        00115000
$IF X8 = OFF                                                            00120000
$CONTROL NOLIST                                                         00125000
$IF                                                                     00130000
COMMENT                                                                 00135000
                                                                        00140000
                LOGICAL DISC REQUEST ELEMENT FORMAT                     00145000
                                                                        00150000
                                                                        00155000
              0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15            00160000
            |--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|           00165000
     Word 00|           |I |B |C |D |S |Q |M |  |  |D |L |I |           00170000
            |           |O |K |O |O |E |U |O |  |  |I |D |N |           00175000
            |           |W |D |M |' |R |E |V |  |  |S |R |L |           00180000
            |           |A |  |P |P |I |U |D |  |  |A |E |O |           00185000
            |           |K |  |  |O |A |E |O |  |  |B |Q |C |           00190000
            |           |E |  |  |S |L |D |N |  |  |  |  |  |           00195000
            |           |  |  |  |T |  |  |E |  |  |  |  |  |           00200000
            |-----------------------------------------------|           00205000
     Word 01|         HODA of extent limit                  | EXT'L'HODA00210000
            |-----------------------------------------------|           00215000
     Word 02|                   LDEV  #                     | LDEVN     00220000
            |-----------------------------------------------|           00225000
     Word 03|          Mapped Domain CDT entry number       | LDR'CDT   00230000
            |-----------------------------------------------|           00235000
     Word 04| S|          DST      (IF PROCESS DISC I/O)    | DSTN      00240000
            |-----------------------------------------------|           00245000
     Word 05| OFFSET INTO DATA SEG  (IF PROCESS DISC I/O)   | ADDR      00250000
            |-----------------------------------------------|           00255000
     Word 06|     STRATEGY          |       FUNCTION        | FUNC      00260000
            |-----------------------------------------------|           00265000
     Word 07|          COUNT/XLOG/CONTROL RETURNS           | XFERCNT   00270000
            |-----------------------------------------------|           00275000
     Word 08|         P1 (HODA IF SEGMENT TRANSFER          | PAR1      00280000
            |-----------------------------------------------|           00285000
     Word 09|         P2 (LODA IF SEGMENT TRANSFER          | PAR2      00290000
            |-----------------------------------------------|           00295000
     Word 10|                          | QUALIFIER | STATUS | STAT      00300000
            |-----------------------------------------------|           00305000
     Word 11|               PIN Number                      | PCBN      00310000
            |-----------------------------------------------|           00315000
     Word 12|  Table relative index of prev req. in queue   | PREVREQP  00320000
            |-----------------------------------------------|           00325000
     Word 13|  Table relative index of next req. in queue   | NEXTREQP  00330000
            |-----------------------------------------------|           00335000
     Word 14|        HODA of extent base                    | EXT'B'HODA00340000
            |-----------------------------------------------|           00345000
     Word 15|        LODA of extent base                    | EXT'B'LODA00350000
            |-----------------------------------------------|           00355000
     Word 16|        LODA of extent limit                   | EXT'L'LODA00360000
            |-----------------------------------------------|           00365000
                                                                        00370000
Note: Upon return to free list, word (#1) becomes index of next  EE     00375000
 free entry.                                                            00380000
                                                                        00385000
Word 0 - QFLAG - Request dependent flags                                00390000
                                                                        00395000
Bit 3     .SBUF         System Buffer. Target is a system buffer        00400000
                        whose index is relative to the start of         00405000
                        the SBUF table.                                 00410000
                                                                        00415000
Bit 4     .IOWAKE       Wake caller on completion of request.           00420000
                                                                        00425000
Bit 5     .BLOCKED      Blocked I/O.  Caller is waited in ATTACHIO until00430000
                        request is completed.                           00435000
                                                                        00440000
Bit 6     .COMPLETED    Request has been completed and caller woken if  00445000
                        he had specified.                               00450000
                                                                        00455000
                                                                        00460000
Bit 7     .DO'POST      The disc request must be completed prior        00465000
                        to completion notification (on writes).         00470000
                                                                        00475000
Bit 8     .SERIAL'POST  If this is a write request, it must be placed   00480000
                        in the "serialized" disc request queue.         00485000
                                                                        00490000
Bit 9     .LDR'QUEUED   Request is queued into CDT's active queue.      00495000
                                                                        00500000
Bit 10    .MOVE'DONE    Cache move (of data) to/from region has occured.00505000
                                                                        00510000
Bit 11                  Unused.                                         00515000
                                                                        00520000
Bit 12                  Unused.                                         00525000
                                                                        00530000
Bit 13    .DISABLED     Request is disabled.                            00535000
                                                                        00540000
Bit 14    .LDREQ        This bit is set if this entry is a logical disc 00545000
                        request.  If it is not set, this entry is a     00550000
Bit 15    .INLOC        CDT is in PCB's prefetch locality.              00555000
                                                                        00560000
Bit 15    .MSGDONE      A message request reply has completed.          00565000
                                                                        00570000
Word 1 - High order disc address of current disc extent's limit.        00575000
                                                                        00580000
Word 2 - QLDEV.QLDEVN - Logical Device Number                           00585000
                                                                        00590000
Word 3 - LDR'CDT.  This word contains the CDT entry index for this      00595000
                   request.                                             00600000
                                                                        00605000
Word 4                                                                  00610000
QDSTN - If SYSBUFRs is clear then this is the DST number of the target  00615000
        data segment.If bit 0 is set then buffer address is a DB offset 00620000
        value instead of segment relative offset (implemented for       00625000
        NOWAIT IO and NOBUFF).                                          00630000
Word 5                                                                  00635000
QADDR - Offset in data segment or sys buff table to target data buffer. 00640000
                                                                        00645000
Word 6                                                                  00650000
QFUNC.STRAT- Strategy number to be applied to this request.             00655000
QFUNC.FUNC - Function code and qualifiers as specified by driver.       00660000
                                                                        00665000
Word 7                                                                  00670000
QXFERCNT-On initiation specifies the word count if positive or byte     00675000
        count if negative.  At completion of the request this location  00680000
        contains the actual transmission count in the same units as the 00685000
        call.  Certain control requests return data through this        00690000
        location.                                                       00695000
                                                                        00700000
Word 8                                                                  00705000
QPAR1 - HODA of requested sector.                                       00710000
                                                                        00715000
Word 9                                                                  00720000
QPAR2 - LODA of requested sector.                                       00725000
                                                                        00730000
Word 10                                                                 00735000
STAT                                                                    00740000
     .QUALIFIER - A code which further defies or qualifies the          00745000
                  general status.  Defined by driver.                   00750000
     .STATUS - General Status.  Indicates current and result state of   00755000
               the request according to the following codes.            00760000
                0 - not started or awaiting completion.                 00765000
                1 - successful completion.                              00770000
                2 - end of file detected.                               00775000
                3 - unusual condition.                                  00780000
                4 - irrecoverable error.                                00785000
                                                                        00790000
Word 11                                                                 00795000
PCBN - PIN Number of process which made this request. Zero if           00800000
       not associated with any process and IOQ is to be                 00805000
       returned by the system.                                          00810000
NOTE: See I/O System Status Returns.                                    00815000
                                                                        00820000
;                                                                       00825000
$CONTROL LIST                                                           00830000
<<   TO PEG THIS SET OF DECLARATIONS THE PROCEDURE MUST HAVE   >>       00835000
<<   THE USER MUST HAVE A LOGICAL VARIABLE:  LDR'ENTRY'INDEX   >>       00840000
<<   WHICH IS ASSIGNED THE   VALUE OF THE WORD INDEX OF THE     >>      00845000
<<   OF THE DESIRED LDR.                                       >>       00850000
<<   EG     LDR'ENTRY'INDEX := MY'LDR'S'TABLE'WORD'INDEX       >>       00855000
                                                                        00860000
                                                                        00865000
EQUATE                                                                  00870000
    LDR'DST         = %70;     << DST for disc request table      >>    00875000
                                                                        00880000
LOGICAL POINTER LDR = %17;   << System table def. for LDR.     <<mstat>>00885000
                             << NOTE: this MUST be the same as <<mstat>>00890000
                             <<       the pointer to the DRQ.  <<mstat>>00895000
                                                                        00900000
                                                                        00905000
EQUATE                                                                  00910000
                                                                        00915000
    LDR'FLAGS'INDEX   =  0,                                             00920000
    LDR'L'HODA'INDEX  =  1,                                             00925000
    LDR'LDEV'INDEX=  2,                                        <<07298>>00930000
    LDR'CDT'INDEX     =  3,                                             00935000
    LDR'BUFDST'INDEX  =  4,                                             00940000
    LDR'BUFADR'INDEX  =  5,                                             00945000
    LDR'FUNCT'INDEX   =  6,                                             00950000
    LDR'COUNT'INDEX   =  7,                                             00955000
    LDR'PARM1'INDEX   =  8,                                             00960000
    LDR'PARM2'INDEX   =  9,                                             00965000
    LDR'STAT'INDEX    = 10,                                    <<07298>>00970000
    LDR'PCB'INDEX     = 11,                                    <<07298>>00975000
    LDR'PREVQ'INDEX   = 12,                                    <<07298>>00980000
    LDR'NEXTQ'INDEX   = 13,                                    <<07298>>00985000
    LDR'B'HODA'INDEX  = 14,                                    <<07298>>00990000
    LDR'B'LODA'INDEX  = 15,                                    <<07298>>00995000
    LDR'L'LODA'INDEX  = 16;                                    <<07298>>01000000
                                                                        01005000
DEFINE                                                                  01010000
                                                                        01015000
    LDR'FLAGS   =   LDR(LDR'FLAGS'INDEX+LDR'ENTRY'INDEX)#,              01020000
    LDR'L'HODA  =   LDR(LDR'L'HODA'INDEX+LDR'ENTRY'INDEX)#,             01025000
    LDR'LDEV    =   LDR(LDR'LDEV'INDEX+LDR'ENTRY'INDEX)#,      <<07298>>01030000
    LDR'CDT     =   LDR(LDR'CDT'INDEX+LDR'ENTRY'INDEX)#,                01035000
    LDR'BUFDST  =   LDR(LDR'BUFDST'INDEX+LDR'ENTRY'INDEX)#,             01040000
    LDR'BUFADR  =   LDR(LDR'BUFADR'INDEX+LDR'ENTRY'INDEX)#,             01045000
    LDR'FUNCT   =   LDR(LDR'FUNCT'INDEX+LDR'ENTRY'INDEX)#,              01050000
    LDR'COUNT   =   LDR(LDR'COUNT'INDEX+LDR'ENTRY'INDEX)#,              01055000
    LDR'PARM1   =   LDR(LDR'PARM1'INDEX+LDR'ENTRY'INDEX)#,              01060000
    LDR'PARM2   =   LDR(LDR'PARM2'INDEX+LDR'ENTRY'INDEX)#,              01065000
    LDR'PCB     =   LDR(LDR'PCB'INDEX+LDR'ENTRY'INDEX)#,       <<07298>>01070000
    LDR'STATQ   =   LDR(LDR'STAT'INDEX+LDR'ENTRY'INDEX)#,      <<07298>>01075000
    LDR'PREVQ   =   LDR(LDR'PREVQ'INDEX+LDR'ENTRY'INDEX)#,              01080000
    LDR'NEXTQ   =   LDR(LDR'NEXTQ'INDEX+LDR'ENTRY'INDEX)#,              01085000
    LDR'B'HODA  =   LDR(LDR'B'HODA'INDEX+LDR'ENTRY'INDEX)#,             01090000
    LDR'B'LODA  =   LDR(LDR'B'LODA'INDEX+LDR'ENTRY'INDEX)#,             01095000
    LDR'L'LODA  =   LDR(LDR'L'LODA'INDEX+LDR'ENTRY'INDEX)#;             01100000
                                                                        01105000
                                                                        01110000
                                                                        01115000
DEFINE                                                                  01120000
                                                                        01125000
    LDR'DBREL   =   LDR'BUFDST.(0:1)#,  << Rel. to stk DB >>   <<07298>>01130000
    LDR'BUF'DSTN=   LDR'BUFDST.(1:15)#,                        <<07298>>01135000
    LDR'STAT    =   LDR'STATQ.(8:8)#, <<Uniform status return>><<07298>>01140000
    LDR'FUNC    =   LDR'FUNCT.(8:8)#,     << REQUEST FUNCTION      >>   01145000
    LDR'STRATEGY=   LDR'FUNCT.(0:8)#;     << CACHE STRATEGY TO USE >>   01150000
                                                                        01155000
                                                                        01160000
EQUATE                                                                  01165000
                                                                        01170000
    LDR'ABORT'BIT                 =0,     << LDR IS TO BE ABORTED >>    01175000
    LDR'MMREQ'BIT                 =1,     << SEGMENT XFER REQ. >>       01180000
    LDR'DIAG'BIT                  =2,     << A DIAGNOSTIC REQUEST >>    01185000
    LDR'SBUF'BIT                  =3,     << REQ USES SBUFS  >>         01190000
    LDR'IOWAKE'BIT                =4,     << WAKE CALLER WHEN DONE >>   01195000
    LDR'BLOCKED'BIT               =5,     << REQ WAITED IN ATTACHIO>>   01200000
    LDR'DONE'BIT                  =6,     << REQ IS DONE  >>            01205000
    LDR'DO'POST'BIT               =7,     << Must  wait for physical >> 01210000
    LDR'SER'POST'BIT              =8,     << Serialize writes   >>      01215000
    LDR'CDTQUED'BIT               =9,     << REQ IS QUEUED ACT ON CDT >>01220000
    LDR'MOVE'DONE'BIT             =10,    << Cache move performed    >> 01225000
<<  LDR'PFAIL'BIT                 =11,  >><< A POWERFAIL OCCURED >>     01230000
    LDR'CUR'BIT                   =12,  << 1=CURRENT REQUEST >><<*7848>>01235000
    LDR'DISABLE'BIT               =13,    << REQUEST IS DISABLED  >>    01240000
    LDR'LDREQ'BIT                 =14,    << This is a LDR entry   >>   01245000
    LDR'INLOC'BIT                 =15;    << MESSAGE HAS COMPLETED >>   01250000
                                                                        01255000
<< The following 4 bit defines are not used >>                          01260000
DEFINE                                                                  01265000
                                                                        01270000
    LDR'ABORT   =   LDR'FLAGS.(LDR'ABORT'BIT:1)#,                       01275000
    LDR'MMREQ   =   LDR'FLAGS.(LDR'MMREQ'BIT:1)#,                       01280000
    LDR'DIAG    =   LDR'FLAGS.(LDR'DIAG'BIT:1)#,                        01285000
    LDR'SBUF    =   LDR'FLAGS.(LDR'SBUF'BIT:1)#,                        01290000
                                                                        01295000
    LDR'IOWAKE  =   LDR'FLAGS.(LDR'IOWAKE'BIT:1)#,                      01300000
    LDR'BLOCKED =   LDR'FLAGS.(LDR'BLOCKED'BIT:1)#,                     01305000
    LDR'DONE    =   LDR'FLAGS.(LDR'DONE'BIT:1)#,                        01310000
    LDR'DO'POST =   LDR'FLAGS.(LDR'DO'POST'BIT:1)#,                     01315000
                                                                        01320000
    LDR'SERIAL'POST=LDR'FLAGS.(LDR'SER'POST'BIT:1)#,                    01325000
    LDR'CDTQUED =   LDR'FLAGS.(LDR'CDTQUED'BIT:1)#,                     01330000
    LDR'MOVE'DONE = LDR'FLAGS.(LDR'MOVE'DONE'BIT:1)#,                   01335000
<<  LDR'PFAIL   =   LDR'FLAGS.(LDR'PFAIL'BIT:1)#, >>                    01340000
    LDR'CUR'REQ =   LDR'FLAGS.(LDR'CUR'BIT:1)#,                <<*7848>>01345000
    LDR'DISABLE =   LDR'FLAGS.(LDR'DISABLE'BIT:1)#,                     01350000
    LDR'LDREQ   =   LDR'FLAGS.(LDR'LDREQ'BIT:1)#,                       01355000
    LDR'INLOC   =   LDR'FLAGS.(LDR'INLOC'BIT:1)#;                       01360000
                                                                        01365000
<<*************** Fast addressing to LDR ***************************>>  01370000
$IF X6=ON                                                               01375000
LOGICAL ARRAY                                                           01380000
                                                                        01385000
    LDR'DB'FLAGS(*)=   DB+LDR'FLAGS'INDEX,                              01390000
    LDR'DB'L'HODA(*)=  DB+LDR'L'HODA'INDEX,                             01395000
    LDR'DB'LDEV(*) =   DB+LDR'LDEV'INDEX,                               01400000
    LDR'DB'CDT(*)  =   DB+LDR'CDT'INDEX,                                01405000
    LDR'DB'BUFDST(*)=  DB+LDR'BUFDST'INDEX,                             01410000
    LDR'DB'BUFADR(*)=  DB+LDR'BUFADR'INDEX,                             01415000
    LDR'DB'FUNCT(*)=   DB+LDR'FUNCT'INDEX,                              01420000
    LDR'DB'COUNT(*)=   DB+LDR'COUNT'INDEX,                              01425000
    LDR'DB'PARM1(*)=   DB+LDR'PARM1'INDEX,                              01430000
    LDR'DB'PARM2(*)=   DB+LDR'PARM2'INDEX,                              01435000
    LDR'DB'STATQ(*)=   DB+LDR'STAT'INDEX,                               01440000
    LDR'DB'PCB(*)  =   DB+LDR'PCB'INDEX,                                01445000
    LDR'DB'PREVQ(*)=   DB+LDR'PREVQ'INDEX,                              01450000
    LDR'DB'NEXTQ(*)=   DB+LDR'NEXTQ'INDEX,                              01455000
    LDR'DB'B'HODA(*)=  DB+LDR'B'HODA'INDEX,                             01460000
    LDR'DB'B'LODA(*)=  DB+LDR'B'LODA'INDEX,                             01465000
    LDR'DB'L'LODA(*)=  DB+LDR'L'LODA'INDEX;                             01470000
                                                                        01475000
DEFINE     <<*** NOTE: Can only use if DB is at the entry ***>>         01480000
                                                                        01485000
    LDR'DB'DBREL   = LDR'DB'BUFDST.(0:1)#, << 1 => IO IS DB REL. >>     01490000
    LDR'DB'BUF'DSTN= LDR'DB'BUFDST.(1:15)#,                             01495000
    LDR'DB'STAT    = LDR'DB'STATQ#, << UNIFORM STATUS RETURN >>         01500000
    LDR'DB'FUNC    = LDR'DB'FUNCT.(8:8)#,  << REQUEST FUNCTION      >>  01505000
    LDR'DB'STRATEGY= LDR'DB'FUNCT.(0:8)#;  << CACHE STRATEGY TO USE >>  01510000
$IF                                                                     01515000
<<******************************************************************>>  01520000
$TITLE "  "                                                             01525000
