Microsoft KB Archive/85876

{|
 * width="100%"|

MOVE Technology Does Not Replace Interrupt 3Fh Call

 * }

Q85876

-

The information in this article applies to:


 * Microsoft C/C++ for MS-DOS, version 7.0
 * Microsoft Visual C++, versions 1.0, 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 &quot;walking&quot; 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 &quot;functions&quot; and &quot;segments&quot; in the online help and to Chapter 16 of the &quot;Microsoft C/C++ Programming Techniques&quot; manual supplied with Microsoft C/C++ 7.0.

Additional query words: kbinf 7.00 1.00 1.50

Keywords : kb16bitonly

Issue type :

Technology : kbVCsearch kbAudDeveloper kbPTProdChange kbvc150 kbvc100 kbZNotKeyword3 kbCVC700DOS