6. LOADING AND OVERLAYING FOG
6.1 Loading
All FOG subroutines are contained in the system library (.LIBR)
which is automatically searched by the loader (or XCHAIN).
The sources for the various subroutines are contained in the following
files:
FOG SRC Most subroutines + FOG standard display file
FOG2 SRC BLANK and UNBLNK
FOG3 SRC DELETE
FOG4 SRC Save/restore routines
VTERR SRC VTERR
VTARGL SRC VTARGL
[The routines for using the writing tablet are contained in TABLET
and the routines for the lightpen in either LTPEN or LTPEN1
depending on the version required.]
Display files cannot cross bank boundaries; the following ways can be
used to stop this happening:
- The display file can be set up in a subroutine - subroutines are
loaded so that they do not cross page boundaries.
This limits the size of the display file to 4K.
Also all explicit references to the display file (DCHOOS, DINIT, DRAW
and IDRAW) must be contained in the subroutine.
- The display file can be put in COMMON and the VTC option used in
either CHAIN or XCHAIN. This allows one to use the maximum size display
file of 8K. However, problems arise if the program is large and the
display file is large as CHAIN or XCHAIN does not search for COMMON until
it has loaded all of the program and consequently,
the chances of finding a 8K bank empty are small.
- The display file can be put into BLOCK DATA.
This allows one to specify the order of loading of the display file.
It is thus possible by referring to the Load map to specify the order
of loading and the display file size so that the display file does not
cross a bank boundary. It is usual to specify, the BLOCK DATA segment as
the second module to be loaded after the main routine. (It is not possible
to load a BLOCK DATA segment first.)
6.2 Overlaying
If one wants to call FOG routines in an overlay environment it is only
possible if either FOG is made resident, or all of FOG is put in one
overlay. In this latter case the display must be initialised on
loading of the overlay (DCHOOS'd and DINIT'd) and switched off on exit
from the overlay (DCLOSE). It is not possible to overlay the FOG routines
and preserve the display files as the standard FOG display file which
calls the user display files is buried in the FOG routines.