$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
