$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
