Microsoft KB Archive/35758

From BetaArchive Wiki

RAMDRIVE.SYS Problems Loading in Conventional Memory PSS ID Number: Q35758 Article last modified on 07-14-1993 PSS database name: O_MSDOS

4.00

MS-DOS

The information in this article applies to:
- Microsoft MS-DOS operating system version 4.0

Summary:

If either the /A or /E switch is not specified when running RAMDRIVE.SYS (that is, there is no extended or expanded memory available) RAMDrive uses conventional memory to emulate a virtual disk drive.

Some 80286 and 80386 systems have a problem that prevents RAMDrive from loading in conventional memory. Most people don’t use RAMDrive in conventional memory, since this area of memory is so scarce. This article describes this problem, and how RAMDrive has been changed to eliminate this problem.

More Information:

When RAMDrive is specified to load in conventional memory, it tries to use additional (normally unused) memory outside the 640K area, if available, to reduce the amount of conventional memory used. RAMDrive makes a call to ROM BIOS interrupt 12h, Memory Size Determination. This interrupt returns the amount of conventional memory in kilobytes that the system has. RAMDrive looks for additional memory by starting at the location pointed to by ROM BIOS interrupt 12h, moving up to the address A000h, where the video adapter memory begins. It tests this by writing to the first two words, then reading the contents of these words. If the write worked successfully, RAMDrive assumes that the entire 1K of memory is usable. Since the minimum size of a RAMDrive is 16K, RAMDrive looks for 16 of these 1K areas. If it cannot find them, it exits, giving an insufficient memory error. If RAMDrive finds 16K of usable memory between the top of memory (the area pointed to by ROM BIOS interrupt 12h) and address A000h, the RAMDrive is loaded at this point, thus saving conventional memory.

However, this causes problems on some systems. Unlike the conventional IBM PC/XT/AT ROM BIOS releases, which most PC systems are based on, some ROM BIOS manufacturers have random-access memory in this area, but use it as an internal ROM BIOS data area. When RAMDrive is loaded in conventional memory on these systems, the memory test of RAMDrive destroys the contents of RAM in this area, in which case a cold reset of the system is recommended.

Another area in which this causes problems is with the IBM (and compatible) PS/2 series of computers. These systems trap ROM BIOS interrupt 12h, returning a value of 1K less. This 1K of memory is used as the Extended BIOS Data Area, which is accessible on these systems by calling ROM BIOS interrupt 15H AH=C1h, Return Extended BIOS Data Area Segment Address.

Normally, these PS/2 systems don’t have any extra memory between the “top of conventional memory” and address A000h. So, when RAMDrive is asked to be installed in conventional memory, it looks for 16K of memory in this area, and when it can’t find it, RAMDrive exits with an insufficient memory error.

Microsoft has confirmed this to be a problem in version 2.10 of RAMDRIVE.SYS. This problem does not occur in later versions of RAMDRIVE.SYS.

Since the PS/2 systems, in addition to some other systems (with a nonconventional ROM BIOS), use memory above the “top of conventional memory,” Version 2.12 of RAMDrive no longer attempts to use memory in this area. This problem is not commonly encountered because most people don’t attempt to use precious conventional memory to store a RAMDrive. Therefore, the workaround for this problem is not to use RAMDRIVE.SYS in conventional memory on systems that have a ROM BIOS of this type.

For more information on PS/2 ROM BIOS information, refer to the reference “IBM PS/2 and PC BIOS Interface Technical Reference,” part number 68X2260, available from IBM by calling (800) IBM-PCTB. Another reference that contains similar material is the Microsoft Press book, “Programmer’s Quick Reference Series: IBM ROM BIOS,” by Ray Duncan, ISBN 1-55615-135-7.

Additional reference words: 4.00 noupd

Copyright Microsoft Corporation 1993.