home *** CD-ROM | disk | FTP | other *** search
- ;*
- ;******************************************************************************
- ;* *
- ;* OVTB.H: Runtime Overlay Loader Table for PLINK86plus *
- ;* Copyright (C) 1985, 1986 by Phoenix Software Associates Ltd. *
- ;* *
- ;******************************************************************************
- ;*
- ;*
- ;* PLINK86 supplies a table describing the program's overlays in the
- ;* $OVTB$ common block. The overlay library has 6 different
- ;* overlay loaders: 1) MSDOS, release
- ;* 2) MSDOS, debugging
- ;* 3) MSDOS, release, caching
- ;* 4) MSDOS, debugging, caching
- ;* 5) CPM, release
- ;* 6) CPM, debugging
- ;* The format of the overlay table may vary according to user options
- ;* - the caching library is compiled with larger section records.
- ;* Additionally, we may supply versions of PLINK86 & OVERLAY.LIB
- ;* without reloading capability.
- ;*
- ;* $OVTB$ has four sections:
- ;* 1) program size information
- ;* 2) a record describing each section of the program
- ;* 3) a list of files where the sections may be found
- ;* 4) a set of vectors that the user program accesses. these
- ;* vectors call the overlay loader, then jump to the
- ;* required function in that overlay
- ;*
- ;* The sections are numbered implicitly by order within the table,
- ;* starting at one (corresponding to the order of definition
- ;* to PLINK86). The sections are organized into one or more
- ;* tree structures via the Father fields. The end of the overlay
- ;* table is a section record with -1 in the OvFlgs field.
- ;*
- ;* Previous OVERLAY.LIBs came with $OVTB$ assigned to class 'OVERLAYLOADER'.
- ;* By changing the class to 'LOADER', our tech support staff can
- ;* easily spot a user with PLINK86/OVERLAY.LIB incompatibility.
- ;*
- ;*
- if PL148
- ;
- $OVTB$ segment word common 'OVERLAYLOADER'
- ;
- else
- ;
- $OVTB$ segment word common 'LOADER'
- ;
- endif
- ;
- $OVTABLE$ label byte
- OvBoff dw 1 dup (?) ;Base offset of this mod from front of program
- ife PL148
- OvStack dw 1 dup (?) ;stack size for loader: high bit on => far calls
- endif
- if CACHING
- OvConfig dw 1 dup (?) ;configuration flags:
- OvMinReg dw 1 dup (?) ;
- OvMaxReg dw 1 dup (?) ;
- OvMinExt dw 1 dup (?) ;
- OvMaxExt dw 1 dup (?) ;
- OvMinLim dw 1 dup (?) ;
- OvMaxLim dw 1 dup (?) ;
- OvShift db 1 dup (?) ;# of shifts to convert cache units <-> paras
- OvTotal dw 1 dup (?) ;total size of non resident overlays, cache units
- Ov64K dw 1 dup (?) ;# of cache units in 64 K
- endif
- OvStck dw 1 dup (?) ;where to put temp stack (end of prog para addr)
- ;
- ;The following fields are repeated for each section
- ;
- OvFlgs dw 1 dup (?) ;flags (see below)
- OvFix dw 1 dup (?) ;# of base fixups in overlay (0 iff CP/M-86)
- OvStrt dw 1 dup (?) ;starting memory address (paragraph iff MSDOS)
- OvEnd dw 1 dup (?) ;ending memory address (paragraph iff MSDOS)
- OvFile dw 1 dup (?) ;offset to file name containing overlay
- OvDisk dd 1 dup (?) ;disk file address (paragraph for MSDOS,
- ; 128 byte record # for Cpm86)
- OvLen dw 1 dup (?) ;disk length (paragraph or record count)
- if CACHING
- OvCache dw 1 dup (?) ;cache unit offset from cache start,
- ;0 => not in cache, always check InMem first
- OvNewer dw 1 dup (?) ;index to more recently cached overlay (-1 end)
- OvOlder dw 1 dup (?) ;index to less recently cached overlay (-1 end)
- OvSize equ 22 ;record size First record is #1
- else
- OvSize equ 16
- endif
- $OVTB$ ends
-
- ;
- ;
- ;These bits make up the OvFlgs field:
- ;InMem (bit 0) => overlay is in memory, don't need to load it.
- ;PreLod (bit 1) => must pre-load overlay at initialization time.
- ;Resident (bit 2) => this section is resident
- ;Father (rest) => number of overlay's ancestor overlay.
- ; 0 => overlay is at level 1.
- ;OvFlgs == -1 => end of table.
- OFLG record InMem:1, PreLod:1, Resident:1, Father:13;
- ;
- ;
- ;These bits make up the OvConfig field:
- ;ast => use expanded memory, ast convention (not implemented)
- ;lim => use expanded memory, lotus-intel-microsoft convention
- ;extended => use extended memory
- ;regular => use conventional dos addressable memory
- OCFG record ast:1, lim:1, extended:1, regular:1;
-