home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a003 / 1.ddi / OVTB.H < prev    next >
Encoding:
Text File  |  1986-05-20  |  4.9 KB  |  110 lines

  1. ;*
  2. ;******************************************************************************
  3. ;*                                                                            *
  4. ;*          OVTB.H: Runtime Overlay Loader Table for PLINK86plus              *
  5. ;*      Copyright (C) 1985, 1986 by Phoenix Software Associates Ltd.          *
  6. ;*                                                                            *
  7. ;******************************************************************************
  8. ;*
  9. ;*
  10. ;*  PLINK86 supplies a table describing the program's overlays in the 
  11. ;*        $OVTB$ common block.  The overlay library has 6 different
  12. ;*        overlay loaders: 1) MSDOS, release
  13. ;*                         2) MSDOS, debugging
  14. ;*                         3) MSDOS, release, caching
  15. ;*                         4) MSDOS, debugging, caching
  16. ;*                         5) CPM, release
  17. ;*                         6) CPM, debugging
  18. ;*        The format of the overlay table may vary according to user options
  19. ;*             - the caching library is compiled with larger section records.
  20. ;*             Additionally, we may supply versions of PLINK86 & OVERLAY.LIB
  21. ;*             without reloading capability.
  22. ;*
  23. ;*        $OVTB$ has four sections:
  24. ;*             1) program size information
  25. ;*             2) a record describing each section of the program
  26. ;*             3) a list of files where the sections may be found
  27. ;*             4) a set of vectors that the user program accesses.  these
  28. ;*                  vectors call the overlay loader, then jump to the 
  29. ;*                  required function in that overlay
  30. ;*
  31. ;*  The sections are numbered implicitly by order within the table, 
  32. ;*        starting at one (corresponding to the order of definition 
  33. ;*        to PLINK86).  The sections are organized into one or more
  34. ;*        tree structures via the Father fields.  The end of the overlay 
  35. ;*        table is a section record with -1 in the OvFlgs field.
  36. ;*
  37. ;*  Previous OVERLAY.LIBs came with $OVTB$ assigned to class 'OVERLAYLOADER'.
  38. ;*        By changing the class to 'LOADER', our tech support staff can
  39. ;*        easily spot a user with PLINK86/OVERLAY.LIB incompatibility.
  40. ;*
  41. ;*
  42. if PL148
  43. ;
  44. $OVTB$  segment word common 'OVERLAYLOADER'
  45. ;
  46. else
  47. ;
  48. $OVTB$    segment   word common 'LOADER'
  49. ;
  50. endif
  51. ;
  52.  $OVTABLE$  label byte
  53.  OvBoff     dw 1 dup (?)      ;Base offset of this mod from front of program
  54.  ife PL148
  55.       OvStack    dw 1 dup (?) ;stack size for loader: high bit on => far calls
  56.  endif
  57.  if  CACHING
  58.       OvConfig   dw 1 dup (?) ;configuration flags: 
  59.       OvMinReg   dw 1 dup (?) ;
  60.       OvMaxReg   dw 1 dup (?) ;
  61.       OvMinExt   dw 1 dup (?) ;
  62.       OvMaxExt   dw 1 dup (?) ;
  63.       OvMinLim   dw 1 dup (?) ;
  64.       OvMaxLim   dw 1 dup (?) ;
  65.       OvShift    db 1 dup (?) ;# of shifts to convert cache units <-> paras
  66.       OvTotal    dw 1 dup (?) ;total size of non resident overlays, cache units
  67.       Ov64K      dw 1 dup (?) ;# of cache units in 64 K
  68.  endif
  69.  OvStck   dw 1 dup (?)        ;where to put temp stack (end of prog para addr)
  70.  ;
  71.  ;The following fields are repeated for each section
  72.  ;
  73.  OvFlgs   dw 1 dup (?)        ;flags (see below)
  74.  OvFix    dw 1 dup (?)        ;# of base fixups in overlay (0 iff CP/M-86) 
  75.  OvStrt   dw 1 dup (?)        ;starting memory address (paragraph iff MSDOS)
  76.  OvEnd    dw 1 dup (?)        ;ending memory address   (paragraph iff MSDOS)
  77.  OvFile   dw 1 dup (?)        ;offset to file name containing overlay
  78.  OvDisk   dd 1 dup (?)        ;disk file address (paragraph for MSDOS,
  79.                               ;                   128 byte record # for Cpm86)
  80.  OvLen    dw 1 dup (?)        ;disk length (paragraph or record count)
  81.  if CACHING
  82.      OvCache   dw 1 dup (?)   ;cache unit offset from cache start, 
  83.                               ;0 => not in cache, always check InMem first
  84.      OvNewer   dw 1 dup (?)   ;index to more recently cached overlay (-1 end)
  85.      OvOlder   dw 1 dup (?)   ;index to less recently cached overlay (-1 end)
  86.      OvSize    equ 22         ;record size   First record is #1
  87.  else
  88.      OvSize    equ 16
  89.  endif
  90. $OVTB$    ends
  91.  
  92. ;
  93. ;
  94. ;These bits make up the OvFlgs field:
  95.      ;InMem    (bit 0) => overlay is in memory, don't need to load it.
  96.      ;PreLod   (bit 1) => must pre-load overlay at initialization time.
  97.      ;Resident (bit 2) => this section is resident
  98.      ;Father   (rest)  => number of overlay's ancestor overlay.  
  99.      ;                  0 => overlay is at level 1.
  100.      ;OvFlgs == -1   => end of table.
  101. OFLG record    InMem:1, PreLod:1, Resident:1, Father:13;
  102. ;
  103. ;
  104. ;These bits make up the OvConfig field:
  105.     ;ast        => use expanded memory, ast convention (not implemented)
  106.     ;lim        => use expanded memory, lotus-intel-microsoft convention
  107.     ;extended   => use extended memory
  108.     ;regular    => use conventional dos addressable memory
  109. OCFG record     ast:1, lim:1, extended:1, regular:1;
  110.