OSDAMEM - PROBLEMS RUNNING DOS APPLICATIONS IN A DOS SESSION 01/18/96 ======================================================================= Problems Running DOS Applications in a DOS Session-- All OS/2 Releases ======================================================================= Please Read Entire Document for Full Explanation of Procedures -------------------------------------------------------------- DESCRIPTION DOS applications running in a DOS session (sometimes called "virtual DOS machine" or "VDM") might have problems with Expanded Memory Specification (EMS) conflicts, SYS3176 errors, and session lockups. RESOLUTION Many DOS applications, Terminate-and-Stay Resident programs (TSRs), or loading device drivers high, use expanded memory specification (EMS) when loading. Some examples of DOS applications are spreadsheets, word processors, databases, desktop publishing, and computer aided design (CAD) systems. Several problems can occur if EMS is not detected: * You receive a SYS3176 error. * The DOS session locks up when starting an application. * When starting an application in a DOS session, a flash of text pertaining to an adapter conflict appears and disappears so quickly, you can barely see it. You then are returned to the OS/2 Desktop. This problem usually is related to a Terminate-and-Stay-Resident program (TSR). A DOS session closes when it detects the TSR ending, so the session cannot become resident. To load a TSR: 1. Open the Templates folder on the Desktop. 2. Move the mouse pointer to the Program object; then press and hold mouse button 2 and drag the Program object icon to the Desktop. Release mouse button 2. The Settings notebook appears. 3. Select the Program tab. 4. In the Path and File Name entry field, type an asterisk (*) if it does not already exist. 5. In the Parameters field, type /K followed by the path and name of the TSR; for example, /K C:\FT\FTTERM.BAT. For more information, see Volume 2, page 200, of the IBM Redbooks. * Very little expanded memory shows up in the application, no matter what changes were made to the DOS Settings. To configure EMS support for an OS/2 DOS session (VDM), a contiguous 64 KB block of RAM is used as the EMS Page Frame. This must be available within the upper memory block (UMB) between 640 KB and 1 MB. That address range should be between C0000 and CFFFF, which is exactly 64 KB of memory. All adapter cards whose ROM and RAM addresses are mapped within the C0000--CFFFF range, should be remapped to the D0000--DFFFF range. The most-common adapter cards are video, network, modem, and emulation. Many IBM and OEM systems have their Token-Ring cards mapped to the C0000--CFFFF region. Additional Information for EMS Memory -------------------------------------- EMS Memory and Conflicts with Adapter Memory -------------------------------------------- Expanded Memory uses memory addresses that sometimes conflict with adapters. EMS needs 64 KB of contiguous space before it can be installed. The more adapters you have, the more likely it is for a conflict to occur. Network, disk, and 3270 adapters usually have memory present that can prevent EMS activation. There are two techniques to prevent conflicts: * Use the INCLUDE property, MEM_INCLUDE_REGIONS. With this property, you can disable the adapter memory for that session only and allow EMS to use it instead. Example: If you have a 3270 adapter, and already have OS/2 Communications Manager support, you do not need to use the 3270 memory in a DOS session. To disable the memory in a DOS session, you need to find the address of the 3270 adapter, by using the PS/2 Reference diskettes. When you know the address, specify the range in the INCLUDE property. Most IBM 3270 adapters start at CE000 (0XCE00 absolute). The property should be set to CE000-CFFFF. This allows EMS to use this memory, if there is enough of it near this range. * Change addresses of the adapters with the Reference diskette. Example: On a PS/2 Model 80 ESDI with both a Token-Ring and 3270 adapter, the defaults must be changed to enable EMS. Note: In the following, the 0x prefix indicates hexadecimal. Address Use Address Name Length (in KB) ----------- ------------ -------------- VGA (Video) 0xA0000-0xBFFFF 128 Not in Use 0xC0000-0xC7FFF 32 (Free) ESDI Adapter (Disk) 0xC8000-0xCBFFF 16 IBM Token Ring ROM 0xCC000-0xCDFFF 8 IBM 3270 Adapter 0xCE000-0xCFFFF 8 Not in Use 0xD0000-0xD7FFF 32 (Free) IBM Token Ring RAM 0xD8000-0xDBFFF 16 Not in Use 0xDC000-0xDFFFF 16 (Free) PS/2 ROM 0xE0000-0xFFFFF 128 To use a DOS network redirector and a DOS 3270 driver in the same session with EMS memory, re-arrange the addresses of the adapters that allow a 64 KB window into the range 0xA0000 to 0xFFFFF. Because you need both VGA and PS/2 ROM, the range must be between 0xC0000 and 0xDFFFF. A total of 80 KB is free in that range; it just isn't contiguous. The goal is to make it contiguous. Use the PS/2 Reference Diskette to change the addresses of the adapters. In this case, it is best to move the adapters from the 0xC0000--0xCFFFF range to the 0xD0000--0xDFFFF range: Move ESDI ROM to 0xD0000 Move Token-Ring ROM to 0xD4000 Move 3270 RAM to 0xD6000 The new map would look like this: Address Use Address Name Length (in KB) ----------- ------------ -------------- VGA 0xA0000-0xBFFFF 128 EMS Memory 0xC0000-0xCFFFF 64 (EMS Range) ESDI Adapter 0xD0000-0xD3FFF 16 IBM Token Ring ROM 0xD4000-0xD5FFF 8 IBM 3270 Adapter 0xD6000-0xD7FFF 8 IBM Token Ring RAM 0xD8000-0xDBFFF 16 Not in Use 0xDC000-0xDFFFF 16 (Free) PS/2 ROM 0xE0000-0xFFFFF 128 The memory not in use for EMS could be used by the XMS Upper Memory Blocks. The 16 KB could be used by OS/2 DOS to load a device driver or TSR high. Reconfiguring the Memory Remapping on Various Systems ----------------------------------------------------- IBM Systems ----------- Some IBM systems, such as 56 SLC, 57 SLC, 56 SLC2, 57 SLC2, 76, 77, and 90, have a built-in utility program for creating a backup Reference diskette. The diagnostic programs to reconfigure register addresses can be run from the hard disk. Most of these systems have their video adapters mapped to the C0000--CFFFF region. To start the Utility Program from the hard disk: 1. Turn on the computer and allow the self-tests to finish. 2. Press Ctrl+Alt+Del. 3. Watch the cursor closely. When it moves to the top-right corner of the screen, press Ctrl+Alt+Ins. 4. Go to "IBM Reference Diskette Instructions" below. IBM ValuePoint -------------- These systems have their video addresses mapped to the A0000--AFFFF range. They also have to start the program from the hard disk. Other IBM PS/2 Micro Channel Systems ------------------------------------ A Reference Diskette is provided with each system. Start the system with the diskette in drive A; then see the next topic. IBM Reference Diskette Instructions ----------------------------------- 1. When the IBM logo appears, press Enter. 2. Select Set Configuration. 3. Select Change Configuration. 4. Select the slot and location of the adapter that is mapped to the C0000--CFFFF range. 5. Press F6 to toggle to a free D0000--DFFFF memory range address. 6. Press F10 to save the configuration. 7. Restart the system. The goal is to free the C0000--CFFFF address by moving adapter ROM and RAM addresses to the D0000--DFFFF range. EISA and ISA Bus Architecture Systems ------------------------------------- Many of these systems have a built-in Diagnostics Setup and Configuration file. After startup, the screen displays a sequence of keys that you press to get to the setup. Some systems allow only viewing; others allow viewing and reconfiguring. Many adapters can be reconfigured only by resetting switches on the adapter. Refer to the documentation that came with the adapter, or contact your vendor for additional information. ______________________________________________________________________ IBM disclaims all warranties, whether express or implied, including without limitation, warranties of fitness and merchantability with respect to the information in this document. By furnishing this document, IBM grants no licenses to any related patents or copyrights. Copyright (c) 1994, 1995 IBM Corporation. Any trademarks and product or brand names referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.