The information in this article applies to:
SUMMARY
WextMem.exe is a file that contains source code for a Windows-based
application that reports the amount of extended memory installed in the
machine on which the program is run.
MORE INFORMATIONThe following file is available for download from the Microsoft
Download Center. Click the file name below to download the file: WextMem.exeFor more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. The AT Real Time Clock/CMOS RAM is accessed via port 70h, and read from and written to via port 71h. The extended memory word is stored low-order byte first in the CMOS. The first (low order) byte is stored at address 17h, and the second (high order) byte is stored at address 18h. To read a particular address in the CMOS, write the address to read to port 70h, then retrieve the information from port 71h. Figure 1 contains a code fragment, written in Microsoft C version 6.0 with inline assembly, which shows how to check the CMOS for extended memory size. For compatibility with future versions of Windows, the following code should NOT be placed directly into a Windows-based application. Instead, this code should be placed in a dynamic-link library (DLL), which can be called by applications. Figure 1. Sample Extended Memory Size Check
The AT Real Time Clock/CMOS RAM configuration is documented in its entirety
in the IBM PC technical reference, on pages 1-56 to 1-68. The information
contained in the article was obtained from "The Programmer's PC Source
Book," by Thom Hogan, published by Microsoft Press (1988).
Please note that although the BIOS on most machines automatically configures the CMOS entry for extended memory size with the amount of memory the BIOS power-on self-test (POST) routines find in the machine, some BIOS setup programs allow the user to configure the extended memory setting themselves. If the user has not filled in the correct number for the amount of extended memory installed in the machine, the check described in this article will be useless. Additional query words:
Keywords : kbfile kbsample kb16bitonly kbKernBase kbMemory |
Last Reviewed: December 2, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |