MOVE Technology Does Not Replace Interrupt 3Fh Call

Last reviewed: July 17, 1997
Article ID: Q85876
7.00 | 1.00 1.50 MS-DOS | WINDOWS kbprg

The information in this article applies to:

  • Microsoft C/C++ for MS-DOS, version 7.0
  • Microsoft Visual C++ for Windows, versions 1.0 and 1.5

SUMMARY

Unlike some overlay systems, the Microsoft Overlay Virtual Environment (MOVE) does not replace the Interrupt 3Fh (INT 3Fh) overlay call in the code with a direct call (CALL instruction). This technique can be very expensive in terms of execution time if a program has a time-critical loop that continually calls a function in an overlay that is already loaded into memory. The call to the function in the overlay must go through the Interrupt 3Fh handler even though the code is already present in memory.

To optimize a program for speed, it is recommended that functions be grouped so that functions that are called regularly are either not placed in overlays or are placed in the overlays from which they are called.

MORE INFORMATION

Microsoft deliberately chose not to perform the overlay call fix-ups. There is overhead involved with implementing the fix-up technique. In many situations, the overhead is more costly in terms of execution speed than performing the overlay swap each time.

The technique of changing the Interrupt 3Fh calls to direct calls works efficiently as long as an overlay is not being continually added and removed from memory. When the overlay gets removed from memory, the overlay manager must fix-up all references to any functions in the overlay. This requires "walking" the stack and making the necessary fix-ups, as well as changing the code back to the original Interrupt 3Fh call. Microsoft found that with many overlays (larger programs), this was less efficient.

For more information about grouping functions into MOVE overlays, refer to "functions" and "segments" in the online help and to Chapter 16 of the "Microsoft C/C++ Programming Techniques" manual supplied with Microsoft C/C++ 7.0.


Additional reference words: kbinf 7.00 1.00 1.50
KBCategory: kbprg
KBSubcategory: MoveOverlay
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.