The following sections describe various MOVE requirements and restrictions.
Overlaid programs created by MOVE require DOS version 3.0 or later.
MOVE can make use of expanded memory and extended memory. Expanded memory must conform to the Lotus/Intel/Microsoft (LIM) EMS version 4.0 or later. Extended memory must conform to the XMS provided in a memory manager such as HIMEM.SYS.
The Microsoft CodeView debugger version 4.0 is compatible with overlaid programs created with MOVE. CodeView version 4.0 does not support the Static Overlay Manager.
An overlaid program takes up more space on disk than the same program created without overlays. Each overlay contains an executable-file header with the fixups for that overlay; an overlay header occupies a multiple of 512 bytes. The root contains the overlay manager and a segment that holds information on each function in each overlay.
The amount of conventional memory the program requires is the sum of:
The size of the root. The root includes the overlay manager (about 5K), the segment that contains information on overlays, and all functions and segments that are not placed into overlays. To determine this size, run the EXEHDR utility on the overlaid program and read the value in the Memory needed: field.
The size of the overlay heap. The minimum heap allocated by MOVE is equal to the size of the largest overlay.
You can use overlays only in programs with multiple code segments because separate segment names are needed for overlays. Far call and return instructions are required between overlays.
Up to 2047 overlays can be specified. The program can define up to 16,383 logical segments (segments with different names).
The entry point to the program must be in the root.
Only code segments are overlaid, not data. Data segments become part of the root and are always in memory. Code linked in from the run-time libraries is placed in the root.
Note:
An advanced technique can be used to place data into an overlay. You can create a source file that declares a code segment containing data and assign this segment to an overlay. In a Microsoft C program, you can do this by using __based(__segname("_CODE")); you can also use assembly language. Because an overlay may be discarded and changes in data may be lost, this method is useful only for large data items that do not change and are not frequently accessed.
An overlay size is limited to 64K. The optimal size is around 4K. An overlay can contain one or more segments.
You cannot jump between overlays using the setjmp and longjmp C library functions. You can use long jumps from an overlay to the root. It is possible but not recommended to use long jumps within an overlay.
You cannot use the same public name in different overlays.
The interrupt number used by MOVE is 63 (3F hexadecimal). You can use LINK's /OV option to change the interrupt number.
Do not place MOVE.LIB into an overlay.