> | II.1.8 The DOS Protected-Mode Assembler ASEMX In general, the proven real-mode assembler ASEM.EXE is sufficient also for very large programs. Nevertheless, it may be running out of memory, if a program contains a huge number of long user-defined symbols, or lots of large macro definitions. To close the gap, the ASEM-51 package includes the new protected-mode assembler ASEMX.EXE. ASEMX is functionally identical to ASEM, but it can use extended memory, to meet extreme workspace requirements. ASEMX is accompanied by Borland's 16-bit DPMI server DPMI16BI.OVL and runtime manager RTM.EXE. It requires a 286 CPU (or better), and at least 512 kB of free XMS memory (1 MB recommended)! When ASEMX is invoked, DPMI16BI.OVL and RTM.EXE must be either in your default directory, where ASEMX.EXE is, or somewhere in your PATH During startup, the DPMI server tries to allocate all the remaining free XMS memory for use by ASEMX. If you don't want this, you can restrict the amount of allocated memory with the DOS environment variable DPMIMEM:
>     SET DPMIMEM=MAXMEM n
will restrict the XMS memory space, used for the DPMI interface, to n kB. Never set n to a value greater than 16383!!! In general, the Borland DPMI interface is very reliable and does normally not conflict with other memory managers. ASEMX will also run with other versions of DPMI16BI.OVL and RTM.EXE provided with various Borland software packages (except TC++ 3.0 and BC++ 3.1). However, there is trouble ahead on systems with more than 16 MB RAM! Without specific installation, there is a fatal tendency to crash, hang, or even boot, whenever a DPMI program like ASEMX is invoked. For proper operation of the DPMI interface, MS-DOS 5.0 (or later) is required, and EMM386.EXE must be loaded! If EMM386.EXE has been loaded with parameters (e.g. NOEMS), the Borland 16-bit DPMI server cannot handle more than 16 MB! However, without parameters (i=nnnn, x=nnnn are o.k.) or with other DPMI servers there may be more. In these cases, ASEMX can use up to 64 MB of extended memory! If ASEMX is running in a system environment with an own DPMI server, e.g. the Windows DOS-Box, RTM.EXE will detect this and use the active DPMI server instead of DPMI16BI.OVL. In this case, the environment variable DPMIMEM has no effect. To restrict (or increase) the available XMS memory for the Windows 3.1x DOS prompt, change file DOSPRMPT.PIF in your WINDOWS directory with the Windows PIF file editor. For further information on how to make more or less XMS memory available to application programs in other system environments, see the corresponding user manuals. Another interesting alternative is the Borland 32-bit DPMI server with virtual memory management. It cannot be provided with the ASEM-51 package for license reasons, but is contained in Borland's Turbo-Assembler 4.0 and 5.0, Borland C++ 4.5x and 5.0x, and maybe others. It has originally been developed for the Borland command line tools, but it also works with ASEMX. It requires a 386 CPU (or better), and allows to extend the free physical memory with a swap file that can be created with the program MAKESWAP.EXE. Apart of that, the 32-bit DPMI server DPMI32VM.OVL and the runtime manager 32RTM.EXE are required. The batch file ASEM32.BAT, provided with the ASEM-51 package, shows how to run ASEMX with 64 MB of virtual memory, using Borland's 32-bit DPMI server.