One of the significant features of 80386 and 80486 processors is the availability of 32-bit registers for the manipulation of code and data. Applications written to use these registers can avoid the segmented memory model of earlier CPUs and instead use a flat memory model in which memory is viewed as a single, contiguous block.
Although the Microsoft Windows operating system continues to adhere to a segmented 16-bit memory model, Windows does provide a set of functions that allow an application to make use of the 32-bit memory-addressing capabilities of the 80386 and 80486 processors. These functions are available to an application through a dynamic-link library (DLL) named WINMEM32.DLL.
Your application's installation program should use the file installation library (VER.DLL) to ensure that it does not install an older version of WINMEM32.DLL over a newer version. For more information about VER.DLL, see Chapter 11, “File Installation Library.”
This chapter introduces the functions contained in WINMEM32.DLL and explains how to use these functions in the context of a Windows application. It covers the following information:
Some of the differences between a segmented memory model and a flat memory model
Use of WINMEM32.DLL to take advantage of the 32-bit memory-addressing capabilities of 80386 and 80486 processors
Programming considerations for use of 32-bit memory in a Windows application
Use of 32-bit memory in a Windows application
A directory of WINMEM32.DLL functions
Assembly-language examples illustrating how to use WINMEM32.DLL functions
Important:
You should be thoroughly familiar with the following information about 80386 and 80486 processors that is not covered in this chapter:
Terminology and concepts relating to the architecture
Code-management features
Memory-management features
Note:
Only developers with experience writing Windows applications and assembly language code should attempt to use these functions in an application.