The following section applies to both VDM DOS Emulation and DOS VMB.
Expanded Memory Specification (EMS) is discussed in detail in Memory Extender Support. One requirement of EMS is a page frame in real memory between 640KB and 1MB (hex addresses X'A0000' to X'FFFFF'). Since IBM systems reserve addresses X'A0000' to X'BFFFF' for video, and X'E0000' to X'FFFFF' for BIOS, the EMS page frame is normally restricted to addresses between X'C0000' and X'E0000'. This area can also be used for Upper Memory Blocks, where DOS device drivers and resident programs can be loaded. This frees up valuable space below 640KB for conventional DOS programs.
Unfortunately, memory between X'C0000' and X'E0000' is also needed for Option Adapter ROM and RAM. Indeed it can be difficult or even impossible to configure EMS on a system which has several intelligent adapters installed.
There is really no solution to this problem (sometimes known as "RAM Cram") under DOS. However OS/2 Version 2.0 provides an elegant alternative.
Normally a VDM inherits a memory map which mirrors the actual system hardware configuration; adapter ROM and RAM addresses set by the PS/2 Reference Diskette (or adapter switches on non-Micro Channel systems) are mapped into the VDM address space and are not available for EMS or UMBs.
But since the VDM occupies virtual memory this can easily be changed. The DOS Settings value MEM_INCLUDE_REGIONS parameter releases adapter addresses for use as EMS or UMBs. In most cases this can be set to the complete X'C0000'-X'DFFFF' range.
If a VDM uses an adapter directly (usually via a DOS device driver), the adapter ROM or RAM address must not be specified in MEM_INCLUDE_REGIONS. Addresses of adapters used indirectly by the VDM (through OS/2 Version 2.0) may be included. For example, the full X'C0000'to X'DFFFF' range may be included on a SCSI-based PS/2, even though the SCSI adapter ROM may occupy X'D8000' to X'DFFFF'. The DOS VDM does not directly access the SCSI adapter so it does not need SCSI ROM mapped into its address space. It can still access files on SCSI disks via the OS/2 Version 2.0 file system.
Another example could be a 3270 connection adapter. Depending on the setup, it could occupy 8KB of memory (for example, X'DE000' to X'E0000'). If you are using Extended Services and Communications Manager to establish a DFT connection to your /370 system, you could release this memory for use by DOS applications and specify this address frame in the Include Region. Of course, if you want to use a DOS-based emulator, such as Personal Communications/3270 Version 2.0, you can't include this area, as the DOS application and its device driver want to access this adapter directly.
Note: The MEM_INCLUDE_REGIONS parameter should be entered as shown above, using 5-digit hex addresses (not 4-digit segment addresses, as is often the case). Also, note that the range is inclusive - you must specify the second address as (for example) X'DFFFF', not X'E0000'. The parameter is not validity-checked when entered. If an invalid parameter is saved, the default (no include region) is used when the VDM is initialized; no error message is generated.
In summary, a typical DOS VDM may have a 64KB EMS page frame and 64KB of UMBs (or 128KB of UMBs) regardless of the hardware adapters installed. Such a configuration is not possible under PC DOS.