Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Chapter B 5 - Using Expanded Memory ====== ===== Introduction ===== If your system is configured correctly for expanded memory, Advanced Revelation can take advantage of this resource. Expanded memory is not necessary in OS/2, so if you are using Advanced Revelation for OS/2, you can skip this chapter. ==== Benefits of Expanded Memory ==== Advanced Revelation’s expanded memory support provides additional workspace in RAM for applications. Programmers can take advantage of expanded memory to maintain a greater number of large character strings and large subroutines. This capability is especially important in sophisticated applications that use many supporting routines or large records, or in networked applications that have less memory available. Expanded memory support does not allow you to create character strings larger than 64K. Expanded memory also does not increase the maximum number of variables, nor does it increase the maximum number of programs. Programmers will still need to exercise caution when using dimensioned arrays and labeled common areas. ==== Advanced Revelation’s Use of Memory ==== Advanced Revelation will use all available conventional memory (conventional memory is the area of RAM up to 640K). If you are using expanded memory manager (EMM) software, Advanced Revelation can also use expanded memory. When expanded memory support is invoked, Advanced Revelation will automat- ically allocate half of the system’s available expanded memory for its use, up to a maximum of 4 megabytes. You can use a special logon option to increase or decrease the amount of expanded memory that is initially allocated. For more information, see “Using Expanded Memory Logon Options” below. ==== System Requirements ==== To take advantage of expanded memory, you will need: * A minimum of 256K expanded memory, either through hardware or through software emulation. * Expanded Memory Manager (EMM) software that conforms to the Lotus/Intel/Microsoft Expanded Memory Specification (LIM EMS) version 4.0. The EMM software must support all the advanced functions defined in the LIM EMS 4.0. * At least 256K free expanded memory available when you start Advanced Revelation. Expanded memory support is optimized for use with 386-based machines. ==== Using Expanded Memory Logon Options ==== Logon options enable you to control how your expanded memory support is used in Advanced Revelation. Available logon options and logon command syntax are explained below. ==== Invoking Expanded Memory Capability Modes ==== Advanced Revelation can use expanded memory in three different modes. The mode is determined by the way in which you log on to Advanced Revelation. === Programs-only Mode === If your system is configured correctly for expanded memory, Advanced Revelation uses it automatically when you log in. By default, expanded memory is invoked in Programs-only mode. In the Programs-only mode, programs that are longer than 508 bytes of object code will be swapped out to expanded memory as necessary. This does not mean that you can load more programs, only that you can load larger programs. === Expanded Mode === Expanded mode is invoked by using the X option in your logon command at the operating system prompt. For example: <code> AREV SYSPROG /X </code> In Expanded mode, any string of characters longer than 508 bytes, including programs, will be swapped out to expanded memory as necessary. Expanded mode operates faster than Programs-only mode and decreases the chance of running out of conventional memory. Expanded mode does have this limitation: C and assembly language routines can have, at most, two valid pointers into Advanced Revelation string space. The two most recently fetched pointers are guaranteed to be valid. Using more than two pointers will yield unpredictable results. All C and assembly language routines that are provided as part of your Advanced Revelation system comply with this requirement. To run using Expanded mode, any application that you write or run under Advanced Revelation must abide by this limit. //Warning! Do not use Expanded mode unless you are sure that the C and assembly language routines executed by your Advanced Revelation application have no more than two pointers into Advanced Revelation string space at any given time//. Your developer can tell you whether your application complies with Expanded mode limitations. === Off Mode === In some situations you may want to log on to Advanced Revelation and not invoke expanded memory support. Use the O option in your logon command at the operating system prompt to turn off use of Advanced Revelation’s expanded memory support. For example: <code> AREV SYSPROG /O </code> ==== Controlling Initial Expanded Memory Allocation ==== By default, when expanded memory capability is invoked, Advanced Revelation allo- cates half of the system’s available expanded memory for its use, up to a maximum of 4 megabytes. You can use a special logon option to increase or decrease the amount of expanded memory that is initially allocated. To allocate a specific amount of expanded memory for Advanced Revelation, use the M option in your logon command at the operating system prompt. For example: <code> AREV SYSPROG /Mnnnn </code> where: nnnn is the number of kilobytes of expanded memory that Advanced Revelation initially allocates for use. Advanced Revelation requires at least 256K of free expanded memory at logon. If your M option specifies less than 256K, Advanced Revelation will allocate at least 256K of expanded memory. The maximum number of kilobytes that Advanced Revelation will ever allocate is 4096 (4 megabytes). If you enter a number that is greater than the available expanded memory, Advanced Revelation allocates all of the memory that is currently available. At logon, if you display the WHO window, you may find that the EM Allocated prompt displays a slightly lower number than the one that you specified in your M logon option. This is because expanded memory is allocated in 64K increments. ==== Command Syntax for Logon Options ==== To specify one or more options in the logon command, type in the command as usual. Then add a/ (forward slash) at the end of the command to indicate that options will follow. Following the / character, type in the desired option(s), separating each option with a space. For example: <code> AREV SYSPROG /X M512 </code> The command shown above logs the user into the SYSPROG account, specifies that expanded memory is used in Expanded mode, and initially allocates 512K of expanded memory for use by Advanced Revelation. ==== Managing Expanded Memory ==== To support expanded memory, Advanced Revelation requires three blocks of memory: * One 16K expanded memory window. Because systems such as Advanced Revelation cannot access expanded memory directly, they require the use of “mappable” regions which they can access. Mappable regions are controlled by the expanded memory manager and are made available to applications for use as windows into expanded memory. * Two 64K overflow buffers. The overflow buffers are used to prevent data in programs from shifting in memory during critical operations. These buffers may be allocated in mappable regions above 640K if enough mappable memory is available. To determine where Advanced Revelation has allocated the 16K expanded memory window and 64K overflow buffers, use the WHO window. For more information, see “Displaying the Status of Expanded Memory’ later in this chapter. Performance will be improved significantly when one, two, or all three of these blocks are allocated in mappable regions, also known as swapping regions, residing above 640K and below 1M (non-conventional memory). If mappable regions are not found for the 64K overflow buffers, the buffers will be allocated in conventional memory, and the 16K expanded memory window will be allocated in the page frame. The page frame is a 64K mappable region provided by the expanded memory manager and used to access expanded memory. This not only wastes 48K of the page frame, it also has the undesirable side effect of reducing conventional memory by as much as 128K and possibly reducing the number of variables that can be used. Therefore, if your expanded memory manager is capable of supporting additional mappable regions, you can improve performance significantly by making as much mappable memory available as possible. If your expanded memory manager supports only one 64K mappable region, namely the 64K page frame, it will be impossible to increase the number of mappable regions. To make more mappable memory available for Advanced Revelation to use, avoid filling non-conventional memory above 768K. Some expanded memory managers provide the capability of filling unused portions of non-conventional memory with usable high RAM (also called high DOS memory). However, Advanced Revelation cannot directly take advantage of high RAM, so you may want to convert some or all of the high RAM to mappable memory. See your EMM software documentation for details. Some expanded memory managers may not recognize that areas of non- conventional memory are being used by other peripherals (network cards, for example). When there is a conflict between your EMM and a peripheral device over available non-conventional memory, you may be unable to log in to Advanced Revelation. Your EMM software documentation should provide information about how to detect and resolve this problem. ==== Displaying the Status of Expanded Memory ==== For those using expanded memory, the WHO window provides information about Advanced Revelation’s use of memory. Enter: <code> WHO </code> at TCL to display the WHO window. The WHO window is for information only — you cannot make changes at this window. On the first page of the WHO window, note the information at the Available memory and Expanded Memory prompts. From the first page of the WHO window, press [Pg Up] to display page three of the WHO window, which is labeled “EXPANDED MEMORY INFORMATION”. When EMM software is active, information displays at the EM Used, EM Allocated, 16K EM Window, 64K Overflow Buffer 1 and 64K Overflow Buffer 2 prompts: * Available memory: The number of bytes currently available to Advanced Revelation in conventional memory displays. * Expanded Memory : If Advanced Revelation recognizes and is using EMM software, the word “Active” displays. If no EMM software is recognized, the word “Inactive” displays. * EM Used : The number of bytes in expanded memory that Advanced Revelation is currently using displays. * EM Allocate : The number of bytes in expanded memory that is currently allocated to Advanced Revelation displays. By default, Advanced Revelation initially allocates to itself only half of the available expanded memory. If you use the M logon option, Advanced Revelation allocates the amount of expanded memory that you specified at logon. In either case, when more expanded memory is needed, Advanced Revelation will secure additional memory in 64K byte segments. * 16K EM Window : In order to support expanded memory capabilities, Advanced Revelation must have a 16K mappable segment available. The starting segment address of the 16K mapped segment displays at this prompt. * 64K Overflow Buffers : To support expanded memory, Advanced Revelation makes use of two 64K overflow buffers. The starting segment addresses for the two 64K overflow buffers display at these prompts. ==== System Configuration ==== === Sample Configuration for a 386-Based System === The EMS software listed below conforms to the requirements for Advanced Revelation: * 386MAX software-emulated expanded memory from Qualitas, Inc. * Quarterdeck Expanded Memory Manager software-emulated expanded memory from Quarterdeck Office Systems This section describes how to create an efficient memory configuration for Advanced Revelation using the Quarterdeck Expanded Memory Manager 386 (QEMM). These instructions do not attempt to replace your expanded memory software or hardware documentation. In fact, it is assumed that you have access to your system’s documentation and that you are familiar with its terms and configuration procedures. To follow this suggested setup, you must have: * 1 megabyte of extended memory * Quarterdeck Expanded Memory Manager 386 (QEMM) installed on a 386-based computer == Installing QEMM == Install QEMM, following the documented procedure supplied with your memory manager software. When using QEMM command line options, do not use the RAM option. == Checking for EMM == Verify that Advanced Revelation can recognize and use the Recognifion expanded memory manager. From the operating system prompt, log on to Advanced Revelation as usual. For example: <code> AREV SYSPROG </code> Press [F5] to display the TCL window. At the TCL window, enter: <code> WHO </code> to display the WHO window. If Advanced Revelation recognizes and is using the expanded memory manager, the word “Active” will display at the Expanded Memory prompt. == Troubleshooting == If you could not log in to Advanced Revelation, QEMM may not recognize that areas of non-conventional memory are being used by other peripherals (network cards, for example). Refer to your QEMM documentation for information about how to eliminate conflicts over available non-conventional memory between QEMM and peripheral devices. If the Expanded Memory prompt at the WHO window does not display “Active”, check the following: * Reboot your system and watch the screen for any error messages indicating that the expanded memory manager is not installed correctly. For example, you may see a message stating that there are errors in the CONFIG.SYS file. * Verify that you are running a version of QEMM that supports the LIM EMS 4.0 specification * QEMM must provide at least 256K of available expanded memory. An error in your setup may reduce the amount of available expanded memory. When this is the case, Advanced Revelation cannot recognize or use the expanded memory capabilities. After ensuring that Advanced Revelation is using expanded memory, check the segment addresses (shown in hex) displayed in the WHO window next to the prompts 16K EM Window, 64K Overflow Buffer 1, and 64K Overflow Buffer 2. For maximum efficiency, all three addresses should be greater than or equal to C000. == Fine Tuning == If you have an EGA or VGA adaptor, you may be able to improve your existing configuration. Since Advanced Revelation does not use these modes, memory from A000-AFFF can be used for conventional memory, providing Advanced Revelation with an additional 64K of memory. Run the VIDRAM utility with the ON switch to make the VGA graphics region of memory available to Advanced Revelation. After your session, run VIDRAM OFF to recover the graphics functions. This procedure allows Advanced Revelation to run in more than 700K. Once you are familiar with Advanced Revelation’s use of non-conventional memory, you may be able to make even more memory available by experimenting with the RAM option. Use the RAM option to convert into High RAM any regions in non-conventional memory that Advanced Revelation is not using. Then use the LOADHI.COM program supplied by Quarterdeck to move TSR (terminate and stay resident) programs and device drivers out of conventional memory and into the regions in non-conventional memory that you have defined as High RAM. === Suggested Configuration for a 286-Based System === Advanced Revelation will perform best on a 286-based computer that uses EMS software that supports at least 5 pages for mapping. Software emulators of expanded memory for 286-based machines are generally limited to one 64K page frame (which is only 4 mappable pages). Hardware expanded memory usually provides a minimum of 5 mappable pages, so hardware expanded memory is likely to produce a more efficient system when used with Advanced Revelation. The expanded memory managers listed below conforms to the requirements of Advanced Revelation: * XMA2EMS running DOS 4.0 software-emulated expanded memory from IBM * ABOVE BOARD hardware expanded memory from Intel * Rampage hardware expanded memory from AST Research, Inc. arev/chapter_b_5.txt Last modified: 2023/11/30 07:18(external edit)