         << LINES .001/.009 ARE RESERVED FOR SYSTEMS INTEGRATION >>     00000001
$PAGE "MPE TABLE ACCESS:  DCT, TDT"                                     00005000
COMMENT                                                                 00010000
<<**********************************************************>>          00015000
<<*                                                        *>>          00020000
<<*                 INCLDCT - Module G1                    *>> <<06423>>00025000
<<*               (contains DCT and TDT)                   *>>          00030000
<<*                    MPE 5 version                       *>>          00035000
<<*                                                        *>>          00040000
<<**********************************************************>>          00045000
                                                                        00050000
$IF X8 = OFF                                                            00055000
$CONTROL NOLIST                                                         00060000
$IF                                                                     00065000
$TITLE "MPE TABLE ACCESS:  DEVICE CLASS TABLE (DCT)"                    00070000
                                                                        00075000
                   Overview of Device Tables                            00080000
                   -------------------------                            00085000
                                                                        00090000
DST 40 (= %50)   +---------------------------+<-----DST %50             00095000
SIR 40 (= %50)   |                           |                          00100000
                 |    Device Class Table     |                          00105000
                 |                           |                          00110000
                 |          (DCT)            |                          00115000
                 |                           |                          00120000
                 +---------------------------+                          00125000
                 |                           |                          00130000
                 | Terminal Descriptor Table |                          00135000
                 |                           |                          00140000
                 |           (TDT)           |                          00145000
                 |                           |                          00150000
                 +---------------------------+                          00155000
                                                                        00160000
                                                                        00165000
                    DEVICE CLASS TABLE                                  00170000
                                                                        00175000
                    Header Entry Format                                 00180000
                    -------------------                                 00185000
                                                                        00190000
       0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                   00195000
     +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+                  00200000
    0|          Total table (segment) size           |                  00205000
     +-----------------------------------------------+                  00210000
    1|   Entry size (variable, this word set to 1)   |                  00215000
     +-----------------------------------------------+                  00220000
    2|        Number of device class entries         |                  00225000
     +-----------------------------------------------+                  00230000
    3|     Pointer to first device class entry       |                  00235000
     |              (segment relative)               |                  00240000
     +-----------------------------------------------+                  00245000
    4|    Number of terminal descriptor entries      |                  00250000
     +-----------------------------------------------+                  00255000
    5|  Pointer to first terminal descriptor entry   |                  00260000
     |              (segment relative)               |                  00265000
     +-----------------------------------------------+                  00270000
$PAGE                                                                   00275000
                   Typical Entry Format                                 00280000
                   --------------------                                 00285000
                                                                        00290000
       0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                   00295000
     +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+                  00300000
    0|                                               |                  00305000
     |                                               |                  00310000
    1|                                               |                  00315000
     |              Class name (ASCII)               |                  00320000
    2|                                               |                  00325000
     |                                               |                  00330000
    3|                                               |                  00335000
     +--+--------------------+--+--+-----------------+                  00340000
    4|//|  Cyclical pointer  |SQ| T|Class Access Type|                  00345000
     +--+--------------------+--+--+-----------------+                  00350000
    5|        Number of devices in class (N)         |                  00355000
     +-----------------------------------------------+                  00360000
    6|                   LDEV #1                     |                  00365000
     +-----------------------------------------------+                  00370000
    7|                   LDEV #2                     |                  00375000
     +-----------------------------------------------+                  00380000
                 .                      .                               00385000
                 .                      .                               00390000
                 .                      .                               00395000
     +-----------------------------------------------+                  00400000
  N+5|                   LDEV # N                    |                  00405000
     +-----------------------------------------------+                  00410000
                                                                        00415000
Discussion:                                                             00420000
  The Device Class Table (DCT) contains a  varying  number  of          00425000
variable length entries.  This is because you may configure an          00430000
arbitrary number of device classes on a system, and  each  de-          00435000
vice  class may be comprised of an arbitrary number of logical          00440000
devices. There is one DCT entry per device class, and each DCT          00445000
entry contains a list of logical devices in the  class.  There          00450000
is no established order of entries in the DCT, nor is there an          00455000
order of LDEVs within an entry.                                         00460000
  Due to the haphazard nature of the DCT, its overall  proper-          00465000
ties are kept in the header entry.  These include the segment-          00470000
relative starting address of the DCT (in case the header entry          00475000
should be expanded later) and the number of entries in the ta-          00480000
ble. A segment-relative pointer to the Terminal Descriptor ta-          00485000
ble (which follows the DCT) may also be used to calculate  the          00490000
size of the DCT.  Also note the "Entry size" word. It is mean-          00495000
ingless for this table, but is included for compatibility with          00500000
other fixed-length entry MPE tables.                                    00505000
  Since the DCT entries are of variable length, when you  want          00510000
a  particular  entry you must always start at the beginning of          00515000
the DCT and link through each entry until  you  find  the  one          00520000
you're interested in.                                                   00525000
$PAGE                                                                   00530000
  A few of the fields in the DCT require further description:           00535000
  Word 4.( 1:7) -- Cyclical pointer.  Currently used only  for          00540000
                   system and private volume disc devices. The          00545000
                   pointer varies from 1 to N (number  of  en-          00550000
                   tries in the class) and indicates the LDEV#          00555000
                   in the class list on which the last  extent          00560000
                   was  allocated.  The  disc space allocation          00565000
                   routines will try to satisfy the  next  re-          00570000
                   quest  on  the next disc drive indicated by          00575000
                   the cyclical pointer (with wraparound to  1          00580000
                   if  the  pointer  > N).  If that fails, the          00585000
                   pointer is incremented until space is found          00590000
                   or all  devices  in  the  class  have  been          00595000
                   tried.                                               00600000
  Word 4.( 8:1) -- If set, spooling has  been  enabled  (spool          00605000
                   queues opened) for this device class.                00610000
  Word 4.( 9:1) -- If set, the class is a terminal type class.          00615000
  Word 4.(10:6) -- Usually the same as the device type  repre-          00620000
                   sented  by  the  class  (0 for disc, 24 for          00625000
                   tape, 32 for printer,  etc.).  Serial  disc          00630000
                   classes  are  disc devices accessed as tape          00635000
                   drives, so their true device types are kept          00640000
                   in the LDT, while this field holds  a  spe-          00645000
                   cial type (31, or %37), indicating a serial          00650000
                   I/O (non-concurrent) device.  Similarly,  a          00655000
                   foreign disc is a NON-shareable disc drive,          00660000
                   so that fact is reflected by a special type          00665000
                   7 in this field, even though the true hard-          00670000
                   ware type is kept in the LDT, as for serial          00675000
                   discs.                                               00680000
$PAGE                                                                   00685000
$IF X8 = OFF                                                            00690000
$CONTROL LIST                                                           00695000
$IF                                                                     00700000
             *-*-*-*-*-*-*-*-*-*-*-*-*-*-*                              00705000
             |  Declarations start here  |                              00710000
             *-*-*-*-*-*-*-*-*-*-*-*-*-*-*                              00715000
                                                                        00720000
Conventions used in the declarations:                                   00725000
1.  We presume the existence of the following  logical  arrays          00730000
    or pointers:                                                        00735000
  a)  DCT'HEAD -- when referencing the DCT head entry.                  00740000
  b)  DCT      -- for referencing any field of a DCT entry ex-          00745000
                  cept the class name.                                  00750000
  c)  DCT'B    -- byte array equivalent of DCT for referencing          00755000
                  the class name.                                       00760000
    The arrays (pointers) can be direct, indirect, DB-relative          00765000
    or Q-relative. If DB-relative, make sure you know where DB          00770000
    is before you use them.  The only time you have to  expli-          00775000
    citly reference them is when you declare them and when you          00780000
    set their starting address.  Thereafter the DEFINEs  below          00785000
    will  implicitly reference them.  You must use the DEFINEs          00790000
    though.                                                             00795000
2.  Prefixes in the DEFINEs are:                                        00800000
  a)  DCTH -- when referencing DCT'HEAD.                                00805000
  b)  DCT  -- when referencing the logical array DCT.                   00810000
  c)  DCTB -- when referencing the byte array DCT'B.                    00815000
3.  Within the DEFINEs, symbols are given  alphabetically  for          00820000
    easier lookup without using XREF.                                   00825000
;                                                                       00830000
EQUATE                                                                  00835000
   DCT'DST            = 40,                                             00840000
   DCT'SIR            = 40;                                             00845000
                                                                        00850000
EQUATE                                                                  00855000
   DCT'MPE'VERSION    =  5;                                             00860000
                                                                        00865000
EQUATE                                                                  00870000
   DCT'FIRST'LDEV     =  6; << Entry-rltv offset to LDEV #1 >>          00875000
                                                                        00880000
<< DCT header entry fields.                                 >>          00885000
                                                               <<06423>>00890000
EQUATE                                                         <<06423>>00895000
   SIZE'OF'DCT'HEAD   =  6;                                    <<06423>>00900000
                                                                        00905000
DEFINE                                                                  00910000
   DCTH'DCT'BASE        = DCT'HEAD(3) #,                                00915000
   DCTH'ENTRY'SIZE      = DCT'HEAD(1) #,                                00920000
   DCTH'NUM'DCT'ENTRIES = DCT'HEAD(2) #,                                00925000
   DCTH'NUM'TDT'ENTRIES = DCT'HEAD(4) #,                                00930000
   DCTH'SEGMENT'SIZE    = DCT'HEAD(0) #,                                00935000
   DCTH'TDT'BASE        = DCT'HEAD(5) #;                                00940000
$PAGE                                                                   00945000
<< DCT entry fields.                                        >>          00950000
                                                                        00955000
DEFINE                                                                  00960000
   DCT'ACCESS'TYPE    = DCT(4).(10:3)        #,                <<06400>>00965000
       DCT'DIRECT'ACCESS = 0                 #,                <<06400>>00970000
       DCT'SERIAL'IN     = 1                 #,                <<06400>>00975000
       DCT'IO'CONCURRENT = 2                 #,                <<06400>>00980000
       DCT'IO'NONCONCUR  = 3                 #,                <<06400>>00985000
   DCT'CLASS'ACC'TYPE = DCT(4).(10:6)      #,                           00990000
   DCT'CYCLICAL'PTR   = DCT(4).( 1:7)      #,                           00995000
   DCT'NEXT'ENTRY     = DCT'NUM'DEVICES + 6#,                           01000000
   DCT'NUM'DEVICES    = DCT(5)             #,                           01005000
   DCT'SPOOL'QUEUES   = DCT(4).( 8:1)      #,                           01010000
       DCT'OPEN       = 1                  #,                           01015000
       DCT'SHUT       = 0                  #,                           01020000
   DCT'TERM'CLASS     = DCT(4).( 9:1)      #,                           01025000
   DCT'WORDS'IN'ENTRY = DCT'NEXT'ENTRY     #,                           01030000
   DCTB'CLASS'NAME    = DCT'B(0)           #;                           01035000
$PAGE "MPE TABLE ACCESS:  TERMINAL DESCRIPTOR TABLE (TDT)"              01040000
COMMENT                                                                 01045000
$IF X8 = OFF                                                            01050000
$CONTROL NOLIST                                                         01055000
$IF                                                                     01060000
                TERMINAL DESCRIPTOR TABLE                               01065000
                                                                        01070000
                   Typical Entry Format                                 01075000
                   --------------------                                 01080000
                                                                        01085000
       0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15                   01090000
     +--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--+                  01095000
    0|                                               |                  01100000
    1|                  File name                    |                  01105000
    2|                                               |                  01110000
    3|                                               |                  01115000
     +-----------------------------------------------+                  01120000
    4|                                               |                  01125000
    5|                  Group name                   |                  01130000
    6|                                               |                  01135000
    7|                                               |                  01140000
     +-----------------------------------------------+                  01145000
    8|                                               |                  01150000
    9|                 Account name                  |                  01155000
   10|                                               |                  01160000
   11|                                               |                  01165000
     +-----------------------------------------------+                  01170000
   12|        Number of devices in class (N)         |                  01175000
     +-----------------------------------------------+                  01180000
   13|                   LDEV #1                     |                  01185000
     +-----------------------------------------------+                  01190000
   14|                   LDEV #2                     |                  01195000
     +-----------------------------------------------+                  01200000
                 .                      .                               01205000
                 .                      .                               01210000
                 .                      .                               01215000
     +-----------------------------------------------+                  01220000
 N+12|                   LDEV # N                    |                  01225000
     +-----------------------------------------------+                  01230000
                                                                        01235000
Discussion:                                                             01240000
  The Terminal Descriptor Table (TDT)  points  to  MPE  system          01245000
files which contain custom terminal configuration information.          01250000
This can be used to override system or terminal  defaults,  as          01255000
desired by a user. Consult user manuals or the DataComm Lab of          01260000
IND for further information.                                            01265000
  The TDT is very similar to the DCT, in that it too  contains          01270000
an arbitrary number of entries, each of arbitrary length, with          01275000
no defined order within the table or within an entry.                   01280000
  Since the TDT entries are of variable length, when you  want          01285000
a  particular  entry you must always start at the beginning of          01290000
the TDT and link through each entry until  you  find  the  one          01295000
you're interested in.                                                   01300000
$PAGE                                                                   01305000
$IF X8 = OFF                                                            01310000
$CONTROL LIST                                                           01315000
$IF                                                                     01320000
             *-*-*-*-*-*-*-*-*-*-*-*-*-*-*                              01325000
             |  Declarations start here  |                              01330000
             *-*-*-*-*-*-*-*-*-*-*-*-*-*-*                              01335000
                                                                        01340000
Conventions used in the declarations:                                   01345000
1.  We presume the existence of the following  logical  arrays          01350000
    or pointers:                                                        01355000
  a)  TDT'B -- byte array equivalent of  TDT  for  referencing          01360000
               the file, group or account name(s).                      01365000
  b)  TDT   -- for referencing any other field of an entry.             01370000
    The arrays (pointers) can be direct, indirect, DB-relative          01375000
    or Q-relative. If DB-relative, make sure you know where DB          01380000
    is before you use them.  The only time you have to  expli-          01385000
    citly reference them is when you declare them and when you          01390000
    set their starting address.  Thereafter the DEFINEs  below          01395000
    will  implicitly reference them.  You must use the DEFINEs          01400000
    though.                                                             01405000
2.  Prefixes in the DEFINEs are:                                        01410000
  a)  TDTB -- when referencing the byte array TDT'B.                    01415000
  b)  TDT  -- when referencing the logical array TDT.                   01420000
3.  Within the DEFINEs, symbols are given  alphabetically  for          01425000
    easier lookup without using XREF.                                   01430000
;                                                                       01435000
EQUATE                                                                  01440000
   TDT'MPE'VERSION    =  5;                                             01445000
                                                                        01450000
EQUATE                                                                  01455000
   TDT'FIRST'LDEV     = 12; << Entry-rltv offset to LDEV #1 >>          01460000
                                                                        01465000
DEFINE                                                                  01470000
   TDT'NEXT'ENTRY     = TDT'NUM'DEVICES + 13#,                          01475000
   TDT'NUM'DEVICES    = TDT(12)             #,                          01480000
   TDTB'ACCT'NAME     = TDT'B(16)           #,                          01485000
   TDTB'FILE'NAME     = TDT'B(0)            #,                          01490000
   TDTB'GROUP'NAME    = TDT'B(8)            #;                          01495000
                                                                        01500000
COMMENT                                                                 01505000
<<**********************************************************>>          01510000
<<*                                                        *>>          01515000
<<*                     END INCLDCT                        *>>          01520000
<<*                                                        *>>          01525000
<<**********************************************************>>          01530000
;                                                                       01535000
