Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>nested overlays</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Nested Overlays

   You may also nest an overlay area within another overlay area.  This
   technique, while completely permissible, requires very careful
   program and overlay structure planning.  If managed improperly,
   overlays can play havoc with both your application and your sanity.
   Careful planning is imperative.

   In the following examples, the database management system used in
   previous examples has been divided into a utility menu program with
   nested overlays for the REINDX and B_C (backup_cleanup) functions.
   The modifications are accomplished with the following RESPONSE (.LNK)
   FILE file.  The second BEGINAREA appears before the first ENDAREA,
   creating a nested overlay.  Note that the RESPONSE (.LNK) FILE file
   creates external overlays for later use with a map file.

   FI DB_MAIN
   LIB EXTEND
   DEBUG
   OVERLAY CODE
   BEGINAREA
        SECTION INTO ADD_EDIT.OVL FILE ADD, EDIT
        SECTION INTO RPT.OVL FILE RPT
        SECTION INTO UTILMENU.OVL FILE UTILMENU
        BEGINAREA
                SECTION INTO UTILMENU.OVL FILE REINDX
                SECTION INTO UTILMENU.OVL FILE B_C
        ENDAREA
   ENDAREA

   Optimally, a nested overlay does not increase the calling overlay to
   a size larger than the area within which it is contained.

   This approach saves the difference by which the UTILITY overlay is
   larger than the RPT overlay.  However, a small amount of overhead is
   required for the memory used by the overlay table for two more
   overlays.  In this case it saved memory; in other cases it might not
   have.  The final judge is PLINK86-Plus, which tells you the load size
   at the completion of the linking process.

   You may easily compare different overlay schemes by utilizing levels
   of RESPONSE (.LNK) FILE files.  RESPONSE (.LNK) FILE file input can
   be used at any point on the link command line.  It is useful to
   create one RESPONSE (.LNK) FILE file (LINKARESPONSE (.LNK) FILE)
   containing the FILE, LIBRARY, and OVERLAY CODE statements, and
   another RESPONSE (.LNK) FILE file (LINKBRESPONSE (.LNK) FILE)
   containing the BEGINAREA and ENDAREA statements, and those SECTION
   statements between that create the overlays.  You may use the
   following command:

   PLINK86 @LINKA @LINKB

   to compare different overlay schemes by interchanging LINKBRESPONSE
   (.LNK) FILE with LINKCRESPONSE (.LNK) FILE and so on.


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson