Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Warplink version 2.6 - <b>/r reload active overlays swapped out upon return at same address.</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
/r             Reload active overlays swapped out upon return at same address.
---------------------------------------------------------------------------------

 Description:

 The /r option forces swapped out, but still active, overlays to be
 reloaded at the same address when the overlay which swapped them out
 returns.  The /r option also allows an overlay calling the root, either
 directly or indirectly, to be safely swapped out by other overlays before
 the calling overlay is returned to.

 The reload overlay option is required for CA-Clipper programs because
 CA-Clipper uses executable code as data and parses data tokens in the
 executable code segment.  If an active overlay is swapped out and brought
 back in at a different address, Clipper may look at the original address
 where the routine was loaded for the next command and interpret whatever 
 random values are there instead, with predictably poor results.


 Clarion User Note:

 The /r option is turned on automatically by the /cla option.  You do not
 need to use /r with Clarion.


 Technical Note:

 The /r option should also be used in the following situation: if a program
 performs indirect far calls (i.e. through a pointer) from an overlay to the
 root and there is a possibility that the root code will in turn call other
 overlays which cause swapout of the original root-calling overlay.  This
 will keep the far address saved on the program stack as a valid return
 address.  Otherwise, the original overlay that called the root and was
 then swapped out may reload in a different area of the overlay pool. 
 This would cause program failure when the program attempts to return
 to the original overlay at the address saved on the stack.  This is not a
 problem with near calls since the offset of the address saved on the stack
 is always correct.


----------------------------------[ Example ]------------------------------------

 Link CLPPGM.OBJ using the /r option. This will create the file CLPPGM.EXE.

     warplink  /r /op:33 (clppgm)+ovlmgr,,,clipper+(extend)

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