$PAGE "MPE TABLE ACCESS:  LDT, DCT, LDTX"                               00001000
COMMENT                                                                 00002000
<<**********************************************************>>          00003000
<<*                                                        *>>          00004000
<<*                 INCLLDT - Module C0                    *>>          00005000
<<*            (contains LDT, DCT and LDTX)                *>>          00006000
<<*                    MPE 4 version                       *>>          00007000
<<*                                                        *>>          00008000
<<**********************************************************>>          00009000
                                                                        00010000
$IF X8 = OFF                                                            00011000
$CONTROL NOLIST                                                         00012000
$IF                                                                     00013000
$TITLE "MPE TABLE ACCESS:  LOGICAL DEVICE TABLE (LDT)"                  00014000
                                                                        00015000
                   Overview of Device Tables                            00016000
                   -------------------------                            00017000
                                                                        00018000
DST 14 (= %16)   +---------------------------+<-----DST %16             00019000
SIR 10 (= %12)   |                           |                          00020000
                 |   Logical Device Table    |                          00021000
                 |                           |                          00022000
                 |          (LDT)            |                          00023000
                 |                           |                          00024000
                 +---------------------------+                          00025000
                 |                           |                          00026000
                 |    Device Class Table     |                          00027000
                 |                           |                          00028000
                 |          (DCT)            |                          00029000
                 |                           |                          00030000
                 +---------------------------+                          00031000
                 |                           |                          00032000
                 |   Logical Device Table    |                          00033000
                 |         Extension         |                          00034000
                 |          (LDTX)           |                          00035000
                 |                           |                          00036000
                 +---------------------------+                          00037000
                                                                        00038000
                                                                        00039000
               LOGICAL DEVICE TABLE                                     00040000
               --------------------                                     00041000
                                                                        00042000
                Zero Entry Format                                       00043000
                -----------------                                       00044000
                                                                        00045000
   0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                       00046000
 +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+                      00047000
0|    Highest entry #    |     Entry size = 5    |                      00048000
 +-----------------------+-----------------------+                      00049000
 |      Pointer to first Device Class entry      |                      00050000
1|          (relative to segment base)           |                      00051000
 +-----------------------------------------------+                      00052000
2|        Number of Device Class entries         |                      00053000
 +-----------------------------------------------+                      00054000
3|          Size of Device Class Table           |                      00055000
 +-----------------------------------------------+                      00056000
4|///////////////////////| Streams device number |                      00057000
 +-----------------------------------------------+                      00058000
$PAGE                                                                   00059000
               Typical Entry Format                                     00060000
               --------------------                                     00061000
                                                                        00062000
   0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                       00063000
 +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+                      00064000
 |                File use count                 |0                     00065000
 +-----------------------+-----------------------+                      00066000
 |Vol table index if dev |                       |                      00067000
 |  type = 0-7, otherwise|     CONTROL-Y pin     |1                     00068000
 |  main process pin #   |                       |                      00069000
 |  or dev's spooler pin |                       |                      00070000
 +-----------------------+-----------------------+                      00071000
 |     Record width      |CS|FO|  Device type    |2                     00072000
 +-----+--+--+--+--+--+--+-----------------------+                      00073000
 |Spool|Sy|Di|Dn|Tr|Hd|Cl| Default output device |                      00074000
 |state|st|ag|Rq|lr|r |as|  or class index (C=1) |3                     00075000
 +-----+--+--+--+--+--+--+-----------------------+                      00076000
 |        Misc        |SQ|    XDD head index     |4                     00077000
 +--------------------+--+-----------------------+                      00078000
                                                                        00079000
Discussion:                                                             00080000
  Word 2.(8:1) -- Communication system device if set.                   00081000
  Word 2.(9:1) -- If set, there are special forms  mounted  on          00082000
                  the device.                                           00083000
  Word 3.(0:2) -- Spooled state of the device:                          00084000
                  0 -- Not spooled.                                     00085000
                  1 -- Owned by an input  spooler.                      00086000
                  2 -- Owned by an output spooler.                      00087000
  Word 3.(2:1) -- Device is available to system (not down).             00088000
  Word 3.(3:1) -- Device is available to diagnostics (obs).             00089000
  Word 3.(4:1) -- :DOWN requested, honored when use count = 0.          00090000
  Word 3.(5:1) -- If set, trailers are disabled.                        00091000
  Word 3.(6:1) -- If set, headers are disabled. These two bits          00092000
                  are managed such  that  header/trailers  are          00093000
                  generated in pairs or not at all.                     00094000
  Word 3.(7:1) -- If set, word 3.(8:8) is the DCT index of the          00095000
                  default output class  associated  with  this          00096000
                  device.  If  clear,  word 3.(8:8) is the de-          00097000
                  fault logical output device number associat-          00098000
                  ed with this device.                                  00099000
  Word 4.(0:7) -- Device dependent information:                         00100000
                  1.  For terminal-like devices,  the  default          00101000
                      terminal  type  to be used if not speci-          00102000
                      fied in the :HELLO command.                       00103000
                  2.  For variable density tape drives:                 00104000
      Word 4.(1:3) -- actual tape density:                              00105000
                      0 = density not yet determined.                   00106000
                      1 = 1600 BPI                                      00107000
                      2 = 6250 BPI                                      00108000
                      3 = 800  BPI                                      00108100
      Word 4.(4:3) -- density requested in FOPEN for writes to          00109000
                      unlabelled tapes only:                            00110000
                      0 = no FOPEN with write access yet.               00111000
                      1 = 1600 BPI                                      00112000
                      2 = 6250 BPI                                      00113000
  Word 4.(7:1) -- Spooling has been enabled (spool queues  are          00114000
                  open) for this device.                                00115000
$PAGE                                                                   00116000
$IF X8 = OFF                                                            00117000
$CONTROL LIST                                                           00118000
$IF                                                                     00119000
             *-*-*-*-*-*-*-*-*-*-*-*-*-*-*                              00120000
             |  Declarations start here  |                              00121000
             *-*-*-*-*-*-*-*-*-*-*-*-*-*-*                              00122000
                                                                        00123000
Conventions used in the declarations:                                   00124000
1.  We presume the existence of the following identifiers:              00125000
  a)  A logical array or pointer, LDT.                                  00126000
  b)  An offset integer LDT'INDEX, normally  set  to  LDEV#  *          00127000
      LDT'ENTRY'SIZE.                                                   00128000
    The LDT array (pointer) can be direct, indirect,  DB-rela-          00129000
    tive  or  Q-relative.  If  DB-relative, make sure you know          00130000
    where DB is before you use it.                                      00131000
      Setting LDT'INDEX as above allows you to do segment-rel-          00132000
    ative LDT accesses.  If you prefer to make a local copy of          00133000
    an LDT entry via MFDS/MTDS, or if you have  existing  code          00134000
    which does this, simply set LDT'INDEX := 0.                         00135000
2.  Each DEFINE is prefixed by LDT'... to distinguish it  from          00136000
    references to other MPE tables.                                     00137000
3.  DEFINEs of fields are  listed  alphabetically  for  easier          00138000
    lookup without using XREF. DEFINEs of states of fields are          00139000
    listed sequentially following the field DEFINE.                     00140000
;                                                                       00141000
EQUATE                                                                  00142000
   LDT'DST                = %16,           << = 14(10)      >>          00143000
   LDT'SIR                = %12,           << = 10(10)      >>          00144000
   LDT'MPE'VERSION        =   4;                                        00145000
                                                                        00146000
<< The following EQUATE must be changed if the length of an >>          00147000
<< LDT entry changes.                                       >>          00148000
                                                                        00149000
EQUATE                                                                  00150000
   SIZE'OF'LDT'ENTRY      =   5;                                        00151000
                                                                        00152000
<< LDT header (zero'th) entry fields.  Be sure to check the >>          00153000
<< LDTX portion of this $INCLUDE file  if  you  change  the >>          00154000
<< symbol names in this section.                            >>          00155000
                                                                        00156000
DEFINE                                                                  00157000
   LDT'DCT'BASE          = LDT(1)         #,                            00158000
   LDT'DCT'SIZE          = LDT(3)         #,                            00159000
   LDT'ENTRY'SIZE        = LDT(0).( 8:8)  #,                            00160000
   LDT'NUM'DCT'ENTRIES   = LDT(2)         #,                            00161000
   LDT'NUM'ENTRIES       = LDT(0).( 0:8)  #,                            00162000
   LDT'STREAMS'LDEV      = LDT(4).( 8:8)  #;                            00163000
$PAGE                                                                   00164000
<<               Fields for a typical LDT entry.            >>          00165000
DEFINE                                                                  00166000
   LDT'ACCESS'TYPE        = LDT(LDT'INDEX+2).(10:3) #,                  00167000
       LDT'DIRECT'ACCESS  = 0                       #,                  00168000
       LDT'SERIAL'IN      = 1                       #,                  00169000
       LDT'IO'CONCURRENT  = 2                       #,                  00170000
       LDT'IO'NONCONCUR   = 3                       #,                  00171000
       LDT'SERIAL'OUT     = 4                       #,                  00172000
   LDT'ACTUAL'TAPE'DENS   = LDT(LDT'INDEX+4).( 1:3) #,                  00173000
       LDT'NO'DENSITY     = 0                       #,                  00174000
       LDT'DENSITY'1600   = 1                       #,                  00175000
       LDT'DENSITY'6250   = 2                       #,                  00176000
       LDT'DENSITY'800    = 3                       #,                  00176100
   LDT'AVAIL'TO'DIAG      = LDT(LDT'INDEX+3).( 3:1) #,                  00177000
   LDT'AVAIL'TO'SYS       = LDT(LDT'INDEX+3).( 2:1) #,                  00178000
   LDT'CLASS'INDEX        = LDT(LDT'INDEX+3).( 7:1) #,                  00179000
   LDT'CONTROL'Y'PIN      = LDT(LDT'INDEX+1).( 8:8) #,                  00180000
   LDT'CS'DEVICE          = LDT(LDT'INDEX+2).( 8:1) #,                  00181000
   LDT'DEVICE'TYPE        = LDT(LDT'INDEX+2).(10:6) #,                  00182000
       LDT'13037'DISC     =  0                      #,                  00183000
       LDT'FIXED'HD'DISC  =  1                      #,                  00183100
       LDT'FLOPPY'DISC    =  2                      #,                  00184000
       LDT'CS80'DEVICE    =  3                      #,                  00185000
       LDT'FOREIGN'DISC   =  7                      #,                  00186000
       LDT'CARD'READER    =  8                      #,                  00187000
       LDT'TERMINAL       = 16                      #,                  00188000
       LDT'READER'PUNCH   = 20                      #,                  00189000
       LDT'MAG'TAPE       = 24                      #,                  00190000
       LDT'SERIAL'DISC    = 31  << = %37 >>         #,                  00191000
       LDT'PRINTER        = 32                      #,                  00192000
       LDT'CARD'PUNCH     = 33                      #,                  00193000
       LDT'PLOTTER        = 35                      #,                  00194000
   LDT'DFLT'OUT'CLASS     = LDT(LDT'INDEX+3).( 8:8) #,                  00195000
   LDT'DFLT'OUT'DEV       = LDT(LDT'INDEX+3).( 8:8) #,                  00196000
   LDT'DFLT'TERM'TYPE     = LDT(LDT'INDEX+4).( 0:7) #,                  00197000
   LDT'DOWN'PENDING       = LDT(LDT'INDEX+3).( 4:1) #,                  00198000
   LDT'FILE'USE'CNT       = LDT(LDT'INDEX+0)        #,                  00199000
   LDT'HEADER             = LDT(LDT'INDEX+3).( 6:1) #,                  00200000
   LDT'HEADER'OFF         = LDT'HEADER              #,                  00201000
   LDT'HEADER'ON          = NOT LDT'HEADER          #,                  00202000
   LDT'HEADER'TRAILER     = LDT(LDT'INDEX+3).( 5:2) #,                  00203000
   LDT'MAIN'PIN           = LDT(LDT'INDEX+1).( 0:8) #,                  00204000
   LDT'RECORD'WIDTH       = LDT(LDT'INDEX+2).( 0:8) #,                  00205000
   LDT'RQST'TAPE'DENS     = LDT(LDT'INDEX+4).( 4:3) #,                  00206000
       << See values under LDT'ACTUAL'TAPE'DENS. >>                     00207000
   LDT'SPECIAL'FORMS      = LDT(LDT'INDEX+2).( 9:1) #,                  00208000
   LDT'SPOOL'QUEUES       = LDT(LDT'INDEX+4).( 7:1) #,                  00209000
       LDT'QOPEN          = 1                       #,                  00210000
       LDT'QSHUT          = 0                       #,                  00211000
   LDT'SPOOL'STATE        = LDT(LDT'INDEX+3).( 0:2) #,                  00212000
       LDT'NOT'SPOOLED    = 0                       #,                  00213000
       LDT'INPUT'SPOOLED  = 1                       #,                  00214000
       LDT'OUTPUT'SPOOLED = 2                       #,                  00215000
   LDT'SPOOLER'PIN        = LDT(LDT'INDEX+1).( 0:8) #,                  00216000
   LDT'TRAILER            = LDT(LDT'INDEX+3).( 5:1) #,                  00217000
   LDT'TRAILER'OFF        = LDT'TRAILER             #,                  00218000
   LDT'TRAILER'ON         = NOT LDT'TRAILER         #,                  00219000
   LDT'VOLUME'TBL'INDEX   = LDT(LDT'INDEX+1).( 0:8) #,                  00220000
   LDT'XDD'HEAD'ENTRY'PTR = LDT(LDT'INDEX+4).( 8:8) #,                  00221000
   LDT'XDD'HEAD'INDEX     = LDT(LDT'INDEX+4).( 8:8) #;                  00221100
$PAGE "MPE TABLE ACCESS:  DEVICE CLASS TABLE (DCT)"                     00222000
COMMENT                                                                 00223000
$IF X8 = OFF                                                            00224000
$CONTROL NOLIST                                                         00225000
$IF                                                                     00226000
                    DEVICE CLASS TABLE                                  00227000
                                                                        00228000
                   Typical Entry Format                                 00229000
                   --------------------                                 00230000
                                                                        00231000
       0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                   00232000
     +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+                  00233000
    0|                                               |                  00234000
     |                                               |                  00235000
    1|                                               |                  00236000
     |              Class name (ASCII)               |                  00237000
    2|                                               |                  00238000
     |                                               |                  00239000
    3|                                               |                  00240000
     +--+--------------------+--+--+-----------------+                  00241000
    4|//|  Cyclical pointer  |SQ| T|Class Access Type|                  00242000
     +--+--------------------+--+--+-----------------+                  00243000
    5| # devices in class (N)|        LDEV #1        |                  00244000
     +-----------------------+-----------------------+                  00245000
     |        LDEV #2        |       LDEV #3         |                  00246000
     +-----------------------+-----------------------+                  00247000
                 .                      .                               00248000
                 .                      .                               00249000
                 .                      .                               00250000
     +-----------------------+-----------------------+                  00251000
N/2+5|       LDEV #N-1       |       LDEV #N         |                  00252000
     +-----------------------+-----------------------+                  00253000
                                                                        00254000
Discussion:                                                             00255000
  The Device Class Table (DCT) contains a  varying  number  of          00256000
variable length entries.  This is because you may configure an          00257000
arbitrary number of device classes on a system, and  each  de-          00258000
vice  class may be comprised of an arbitrary number of logical          00259000
devices. There is one DCT entry per device class, and each DCT          00260000
entry contains a list of logical devices in the  class.  There          00261000
is no established order of entries in the DCT, nor is there an          00262000
order of LDEVs within an entry.                                         00263000
  Due to the haphazard nature of the DCT, its overall  proper-          00264000
ties  are kept in the 0th (master) entry of the Logical Device          00265000
Table (see above). These include the segment-relative starting          00266000
address of the DCT, the number of entries in the table and the          00267000
size in words of the DCT area of the segment. This latter word          00268000
is useful for skipping over the DCT entirely when all you want          00269000
is to access the Logical Device Table  Extension  (LDTX)  (see          00270000
below).  When  you ARE interested in a DCT entry, the variable          00271000
size of each entry means that you must always start at the be-          00272000
ginning of the DCT and link through each entry until you  find          00273000
the one you're interested in.                                           00274000
$PAGE                                                                   00275000
  A few of the fields in the DCT require further description:           00276000
  Word 4.( 1:7) -- Cyclical pointer.  Currently used only  for          00277000
                   system and private volume disc devices. The          00278000
                   pointer varies from 1 to N (number  of  en-          00279000
                   tries in the class) and indicates the LDEV#          00280000
                   in the class list on which the last  extent          00281000
                   was  allocated.  The  disc space allocation          00282000
                   routines will try to satisfy the  next  re-          00283000
                   quest  on  the next disc drive indicated by          00284000
                   the cyclical pointer (with wraparound to  1          00285000
                   if  the  pointer  > N).  If that fails, the          00286000
                   pointer is incremented until space is found          00287000
                   or all  devices  in  the  class  have  been          00288000
                   tried.                                               00289000
  Word 4.( 8:1) -- If set, spooling has  been  enabled  (spool          00290000
                   queues opened) for this device class.                00291000
  Word 4.( 9:1) -- If set, the class is a terminal type class.          00292000
  Word 4.(10:6) -- Usually the same as the device type  repre-          00293000
                   sented  by  the  class  (0 for disc, 24 for          00294000
                   tape, 32 for printer,  etc.).  Serial  disc          00295000
                   classes  are  disc devices accessed as tape          00296000
                   drives, so their true device types are kept          00297000
                   in the LDT, while this field holds  a  spe-          00298000
                   cial type (31, or %37), indicating a serial          00299000
                   I/O (non-concurrent) device.  Similarly,  a          00300000
                   foreign disc is a NON-shareable disc drive,          00301000
                   so that fact is reflected by a special type          00302000
                   7 in this field, even though the true hard-          00303000
                   ware type is kept in the LDT, as for serial          00304000
                   discs.                                               00305000
$PAGE                                                                   00306000
$IF X8 = OFF                                                            00307000
$CONTROL LIST                                                           00308000
$IF                                                                     00309000
             *-*-*-*-*-*-*-*-*-*-*-*-*-*-*                              00310000
             |  Declarations start here  |                              00311000
             *-*-*-*-*-*-*-*-*-*-*-*-*-*-*                              00312000
                                                                        00313000
Conventions used in the declarations:                                   00314000
1.  We presume the existence of the following  logical  arrays          00315000
    or pointers:                                                        00316000
  a)  DCT'B -- byte array equivalent of  DCT  for  referencing          00317000
               the class name or LDEV list.                             00318000
  b)  DCT   -- for referencing any other field of an entry.             00319000
    The arrays (pointers) can be direct, indirect, DB-relative          00320000
    or Q-relative. If DB-relative, make sure you know where DB          00321000
    is before you use them.  The only time you have to  expli-          00322000
    citly reference them is when you declare them and when you          00323000
    set their starting address.  Thereafter the DEFINEs  below          00324000
    will  implicitly reference them.  You must use the DEFINEs          00325000
    though.                                                             00326000
2.  Prefixes in the DEFINEs are:                                        00327000
  a)  DCTB -- when referencing the byte array DCT'B.                    00328000
  b)  DCT  -- when referencing the logical array DCT.                   00329000
3.  Within the DEFINEs, symbols are given  alphabetically  for          00330000
    easier lookup without using XREF.                                   00331000
;                                                                       00332000
EQUATE                                                                  00333000
   DCT'MPE'VERSION    =  4;                                             00334000
                                                                        00335000
EQUATE                                                                  00336000
   DCT'FIRST'LDEV     = 11;   << Entry-rltv byte of LDEV #1 >>          00337000
                                                                        00338000
DEFINE                                                                  00339000
   DCT'ACCESS'TYPE    = DCT(4).(10:3)        #,                         00339100
       DCT'DIRECT'ACCESS = 0                 #,                         00339200
       DCT'SERIAL'IN     = 1                 #,                         00339300
       DCT'IO'CONCURRENT = 2                 #,                         00339400
       DCT'IO'NONCONCUR  = 3                 #,                         00339500
   DCT'CLASS'ACC'TYPE = DCT(4).(10:6)        #,                         00340000
   DCT'CYCLICAL'PTR   = DCT(4).( 1:7)        #,                         00341000
   DCT'NEXT'ENTRY     = DCT'NUM'DEVICES/2 + 6#,                         00342000
   DCT'NUM'DEVICES    = DCT(5).( 0:8)        #,                         00343000
   DCT'SPOOL'QUEUES   = DCT(4).( 8:1)        #,                         00344000
       DCT'OPEN       = 1                    #,                         00345000
       DCT'SHUT       = 0                    #,                         00346000
   DCT'TERM'CLASS     = DCT(4).( 9:1)        #,                         00347000
   DCT'WORDS'IN'ENTRY = DCT'NEXT'ENTRY       #,                         00348000
   DCTB'CLASS'NAME    = DCT'B(0)             #;                         00349000
$PAGE "MPE TABLE ACCESS:  LOGICAL DEVICE TABLE EXTENSION (LDTX)"        00350000
COMMENT                                                                 00351000
$IF X8 = OFF                                                            00352000
$CONTROL NOLIST                                                         00353000
$IF                                                                     00354000
                                                                        00355000
                                                                        00356000
            Logical Device Table Extension (LDTX)                       00357000
            -------------------------------------                       00358000
                                                                        00359000
                         Zero entry                                     00360000
                         ----------                                     00361000
                                                                        00362000
        0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                  00363000
      +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+                 00364000
    0 |    Highest entry #    |    Entry size = 5     |                 00365000
      +-----------------------+-----------------------+                 00366000
    1 |///////////////////////////////////////////////|                 00367000
      +-----------------------------------------------+                 00368000
    2 |///////////////////////////////////////////////|                 00369000
      +-----------------------------------------------+                 00370000
    3 |///////////////////////////////////////////////|                 00371000
      +-----------------------------------------------+                 00372000
    4 |///////////////////////////////////////////////|                 00373000
      +-----------------------------------------------+                 00374000
                                                                        00375000
                                                                        00376000
                         Typical entry                                  00377000
                         -------------                                  00378000
                                                                        00379000
        0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                  00380000
      +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+                 00381000
    0 | S|SD|CP|FS|DS| Reserved  |  Device-specific   |                 00382000
      +--+--+--+--+--+-----------+                    |                 00383000
    1 |                 information                   |                 00384000
      +-------                                 -------+                 00385000
    2 |                   fields.                     |                 00386000
      +-------                                 -------+                 00387000
    3 |           See the following LDTX              |                 00388000
      +-------                                 -------+                 00389000
    4 |            descriptor examples.               |                 00390000
      +-----------------------------------------------+                 00391000
                                                                        00392000
Where:                                                                  00393000
                                                                        00394000
S.....Seek ahead enable/disable flag (system or PV disc only).          00395000
SD....This logical device is a Serial Disc or a Foreign Disc.           00396000
CP....This logical device uses the CIPER protocol.                      00397000
FS....This is a system or PV disc with Disc Free Space                  00398000
      management.                                                       00399000
DS....This LDEV is a DS or data communications device.                  00399100
$PAGE                                                                   00400000
                        Terminal entry                                  00401000
                        --------------                                  00402000
                                                                        00403000
        0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                  00404000
      +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+                 00405000
    0 | 0| 0| 0| 0|     Reserved    |      TBRC       |                 00406000
      +--+--+--+--+-----------------+-----------------+                 00407000
    1 |///////////////////////////////////////////////|                 00408000
      +--+--------------------------------------------+                 00409000
    2 |LX|////////////////////////////////////////////|                 00410000
      +--+--------------------------------------------+                 00411000
    3 |///////////////////////////////////////////////|                 00412000
      +-----------------------------------------------+                 00413000
    4 |///////////////////////////////////////////////|                 00414000
      +-----------------------------------------------+                 00415000
                                                                        00416000
TBRC..Terminal's baud rate code (CPS = characters per second).          00417000
                                                                        00418000
Speed (CPS)   ATC (II/III) TBRC      ADCC/ATP (HPIB) TBRC               00419000
-----------   -----------------      --------------------               00420000
                                                                        00421000
Not known             0                        0                        00422000
  1920               ---                      16 (ATP only)             00423000
   960               ---                       8                        00424000
   480               ---                       9                        00425000
   240                1                        7                        00426000
   120                2                       11                        00427000
    60                3                        6                        00428000
    30                4                       13                        00429000
    15                5                       14                        00430000
    14                7                       ---                       00431000
    10                6                       15                        00432000
                                                                        00433000
LX....This terminal is connected to a LYNXII port.                      00434000
                                                                        00435000
                Serial or Foreign Disc entry                            00436000
                ----------------------------                            00437000
                                                                        00438000
        0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                  00439000
      +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+                 00440000
    0 | 0| 1| 0| 0|     Reserved    |/////////////////|                 00441000
      +--+--+--+--+-----------------+-----------------+                 00442000
    1 |     SDISC:  XDS# for variables, Gap Table     |                 00443000
      |     FDISC:  1                                 |                 00444000
      +-----------------------------------------------+                 00445000
    2 |     SDISC:  1 ==> data buffer XDS's acquired  |                 00446000
      |     FDISC:  not used.                         |                 00447000
      +-----------------------------------------------+                 00448000
    3 |     SDISC:  PCB index when WAITing, else 0    |                 00449000
      |     FDISC:  not used.                         |                 00449100
      +-----------------------------------------------+                 00450000
    4 |///////////////////////////////////////////////|                 00451000
      +-----------------------------------------------+                 00452000
$PAGE                                                                   00453000
                          CIPER entry                                   00454000
                          -----------                                   00455000
                                                                        00456000
        0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                  00457000
      +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+                 00458000
    0 | 0| 0| 1| 0|   Reserved   |DB|/////////////////|                 00459000
      +--+--+--+--+--------------+--+-----------------+                 00460000
    1 |  CIPER Device Control Data Segment # (CDCDS)  |                 00461000
      +--+--------------------------------------------+                 00462000
    2 |DN|      CTM Index for this device (CTMI)      |                 00463000
      +--+--------------------------------------------+                 00464000
    3 |///////////////////////////////////////////////|                 00465000
      +-----------------------------------------------+                 00466000
    4 |///////////////////////////////////////////////|                 00467000
      +-----------------------------------------------+                 00468000
                                                                        00469000
DB.....If set to 1, then debugging is in effect.                        00470000
DN.....If 1, the CIPER facility has been de-activated for this          00471000
       device because of error.                                         00472000
CTMI...Control Table Map Index (an index into the Control               00473000
       Table Map (CTM), which is located in the CDCDS.                  00474000
                                                                        00475000
                                                                        00476000
            System or Private Volume Disc entry                         00477000
            -----------------------------------                         00478000
                                                                        00479000
        0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                  00480000
      +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+                 00481000
    0 | S| 0| 0| 1|     Reserved    |/////////////////|                 00482000
      +--+--+--+--+-----------------+-----------------+                 00483000
    1 |///////////////////////////////////////////////|                 00484000
      +-----------------------------------------------+                 00485000
    2 |      Disc Free Space DST number (DFSDST)      |                 00486000
      +-----------------------------------------------+                 00487000
    3 |     Disc Free Space error status (DFSERR)     |                 00488000
      +-----------------------------------------------+                 00489000
    4 |///////////////////////////////////////////////|                 00490000
      +-----------------------------------------------+                 00491000
                                                                        00492000
S......Seek ahead enable/disable flag.                                  00493000
$PAGE                                                                   00494000
$IF X8 = OFF                                                            00495000
$CONTROL LIST                                                           00496000
$IF                                                                     00497000
             *-*-*-*-*-*-*-*-*-*-*-*-*-*-*                              00498000
             |  Declarations start here  |                              00499000
             *-*-*-*-*-*-*-*-*-*-*-*-*-*-*                              00500000
                                                                        00501000
Conventions used in the declarations:                                   00502000
1.  We presume the existence of the following identifiers:              00503000
  a)  A logical array or pointer, LDTX.                                 00504000
  b)  An offset integer LDTX'INDEX, normally set  to  LDEV#  *          00505000
      LDTX'ENTRY'SIZE.                                                  00506000
    The LDTX array (pointer) can be direct, indirect, DB-rela-          00507000
    tive  or  Q-relative.  If  DB-relative, make sure you know          00508000
    where DB is before you use it.                                      00509000
      Setting LDTX'INDEX as above allows you  to  do  segment-          00510000
    relative LDTX accesses. If you prefer to make a local copy          00511000
    of an LDTX entry via MFDX/MTDS, or if  you  have  existing          00512000
    code which does this, simply set LDTX'INDEX := 0.                   00513000
2.  Each DEFINE is prefixed by LDTX'... to distinguish it from          00514000
    references to other MPE tables.                                     00515000
3.  DEFINEs of fields are  listed  alphabetically  for  easier          00516000
    lookup without using XREF. DEFINEs of states of fields are          00517000
    listed sequentially following the field DEFINE.                     00518000
;                                                                       00519000
EQUATE                                                                  00520000
   LDTX'MPE'VERSION      =  4;                                          00521000
                                                                        00522000
<< The following EQUATE must be changed if the length of an >>          00523000
<< LDTX entry changes.                                      >>          00524000
                                                                        00525000
EQUATE                                                                  00526000
   SIZE'OF'LDTX'ENTRY     = 5;                                          00527000
                                                                        00528000
<< LDTX header (zero'th) entry fields.                      >>          00529000
                                                                        00530000
DEFINE                                                                  00531000
   LDTX'ENTRY'SIZE       = LDTX(0).( 8:8)#,                             00532000
   LDTX'NUM'ENTRIES      = LDTX(0).( 0:8)#;                             00533000
                                                                        00534000
<< The following expression calculates the segment-relative >>          00535000
<< base address of the LDTX.  It uses symbols from the  LDT >>          00536000
<< portion of this $INCLUDE file.                           >>          00537000
                                                                        00538000
DEFINE                                                                  00539000
   LDTX'BASE              = INTEGER (LDT'DCT'BASE) +                    00540000
                            INTEGER (LDT'DCT'SIZE)#;                    00541000
$PAGE                                                                   00542000
<< LDTX device entry fields.                                >>          00543000
                                                                        00544000
DEFINE                                                                  00545000
   LDTX'BAUD'RATE'CODE     = LDTX(LDTX'INDEX+0).(10:6)#,                00546000
        LDTX'ADCC'960      =  8                       #,                00547000
        LDTX'ADCC'480      =  9                       #,                00548000
        LDTX'ADCC'240      =  7                       #,                00549000
        LDTX'ADCC'120      = 11                       #,                00550000
        LDTX'ADCC'60       =  6                       #,                00551000
        LDTX'ADCC'30       = 13                       #,                00552000
        LDTX'ADCC'15       = 14                       #,                00553000
        LDTX'ADCC'10       = 15                       #,                00554000
        LDTX'ATC'240       =  1                       #,                00555000
        LDTX'ATC'120       =  2                       #,                00556000
        LDTX'ATC'60        =  3                       #,                00557000
        LDTX'ATC'30        =  4                       #,                00558000
        LDTX'ATC'15        =  5                       #,                00559000
        LDTX'ATC'10        =  6                       #,                00560000
        LDTX'ATC'14        =  7                       #,                00561000
        LDTX'ATP'1920      = 16                       #,                00562000
        LDTX'UNKNOWN       =  0                       #,                00563000
   LDTX'CIPER'CNTL'DSEG    = LDTX(LDTX'INDEX+1)       #,                00564000
   LDTX'CIPER'CT'MAP'INDEX = LDTX(LDTX'INDEX+2).(1:15)#,                00565000
   LDTX'CIPER'DEBUG        = LDTX(LDTX'INDEX+0).( 9:1)#,                00566000
   LDTX'CIPER'PROTOCOL     = LDTX(LDTX'INDEX+0).( 2:1)#,                00567000
   LDTX'CIPER'SHUT'DOWN    = LDTX(LDTX'INDEX+2).( 0:1)#,                00568000
   LDTX'DFS'DISC           = LDTX(LDTX'INDEX+0).( 3:1)#,                00569000
   LDTX'DFS'ERR            = LDTX(LDTX'INDEX+3)       #,                00570000
   LDTX'DISC'FREE'SPC'XDS  = LDTX(LDTX'INDEX+2)       #,                00571000
   LDTX'DS'DEVICE          = LDTX(LDTX'INDEX+0).( 4:1)#,                00571100
   LDTX'DS'FLAG'WORD       = LDTX(LDTX'INDEX+1)       #,                00571200
   LDTX'FDISC'ALLOC        = LDTX(LDTX'INDEX+1)       #,                00572000
   LDTX'LYNXII             = LDTX(LDTX'INDEX+2).( 0:1)#,                00573000
   LDTX'SDISC'DBUFS'ALLOC  = LDTX(LDTX'INDEX+2)       #,                00574000
   LDTX'SDISC'GPT'XDS      = LDTX(LDTX'INDEX+1)       #,                00575000
   LDTX'SDISC'PCB'NUM      = LDTX(LDTX'INDEX+3)       #,                00575100
   LDTX'SEEK'AHEAD         = LDTX(LDTX'INDEX+0).( 0:1)#,                00576000
   LDTX'SERIAL'OR'FOREIGN  = LDTX(LDTX'INDEX+0).( 1:1)#;                00577000
                                                                        00578000
COMMENT --                                                              00579000
<<**********************************************************>>          00580000
<<*                                                        *>>          00581000
<<*                     END INCLLDT                        *>>          00582000
<<*                                                        *>>          00583000
<<**********************************************************>>          00584000
;                                                                       00585000
