home *** CD-ROM | disk | FTP | other *** search
- SWAP Version 1.2
- (c) Copyright 1988-1989 Nico Mak and Mansfield Software Group
- All rights reserved
- March 5, 1989
-
- SWAP provides an application independent method for one MS-DOS
- application to run another, even if both would normally not fit in
- memory at the same time. A typical use is to temporarily swap out a
- text editor so that you can run memory hungry compilers, linkers, or
- even debuggers without losing your place in an editing session.
-
- SWAP works by copying conventional memory used by the currently running
- application to expanded memory, extended memory, or to a disk file,
- thereby freeing conventional memory used by the application. SWAP then
- runs the desired program before restoring the original environment.
-
- SWAP is compatible with most MS-DOS programs. However, before relying
- on it, you should test SWAP with your own configuration in case of
- conflicts with TSRs and other software.
-
- SWAP operation and internals are detailed in an article in the April,
- 1989 issue of Dr. Dobb's Journal. The article includes source code.
-
- SWAP version 1.1 includes these new features:
-
- - It will swap to extended memory if your system supports XMS (the
- Extended Memory Specification).
- - SWAP is easier to use from Personal REXX (see the example below).
-
- Version 1.2 includes these new features:
-
- - If the -d and -x options are NOT used and if SWAP can't swap to EMS,
- it will try to use XMS. If it can't swap to XMS it will automatically
- swap to disk.
-
- - When swapping to disk, the process id of the program that gets swapped
- out is included in the fileid, so that you can swap to disk
- recursively.
-
- SWAP command syntax
-
- The SWAP command can be entered at the DOS prompt, or it can be part of
- the command string that your application sends to DOS to run another
- program. See below for examples.
-
- SWAP [options] command [command-parameters] [ > fileid]
-
- Brackets indicate optional parameters. Valid SWAP options are:
-
- -C Copy redirected output to the console.
- -D Disk file C:\SWAPxxxx.TMP is used instead of expanded memory
- (where xxxx is the process id of the program that gets swapped out).
- -F Forces SWAP to continue even if an interrupt vector points to the
- program that gets swapped out. Use this option when possible, but
- only if you are sure that the program that gets swapped out does not
- hook interrupt vectors.
- -Q Quiet operation. Informational messages are not displayed.
- -R REXX interface - required when used from Personal REXX.
- -X XMS (extended) memory is used instead of expanded memory.
-
- "command" is any command that can be issued at the DOS prompt.
- "command-parameters" are parameters or options for the command.
- "fileid" is a DOS file or device to which output from command can be
- directed.
-
- Examples
-
- Assume you have shelled to DOS from within your editor in order to
- compile a program. If the command you normally use to assemble your
- program is
-
- MASM filename;
-
- then the command to run your assembler with SWAP becomes
-
- SWAP MASM filename;
-
- To run SWAP to swap out dBase and load your favorite editor, you could
- enter the dBase command
-
- RUN SWAP -F KEDIT filename
-
- Alternately, you could at the following line to your CONFIG.DB file:
-
- TEDIT = SWAP.COM -F KEDIT.EXE
-
- and subsequently enter the following dBASE command to edit a file:
-
- MODIFY COMMAND filename
-
- To run SWAP in a REXX program to swap out Personal REXX, use the -R
- option. For example,
-
- 'SWAP -R -F dBase'
-
- Note that SWAP cannot swap REXX out if REXX was made resident.
-
- -------
-
- Copyright/License/Warranty:
-
- This document and the program file SWAP.COM ("the software") are
- copyrighted by the author. The copyright owner hereby licenses you to:
- use the software; make as many copies of the program and documentation
- as you wish; give such copies to anyone; and distribute the software and
- documentation via electronic means. There is no charge for any of the
- above.
-
- However, you are specifically prohibited from charging, or requesting
- donations, for any such copies, however made; and from distributing the
- software and/or documentation with commercial products without prior
- permission.
-
- No copy of the software may be distributed or given away without this
- document; and this notice must not be removed.
-
- There is no warranty of any kind, and the copyright owner is not liable
- for damages of any kind. By using this free software, you agree to
- this.
-
- -------
-
- Questions, comments, and suggestions are welcome. You can contact me on
- CompuServe at 70056,241 or on BIX as Nico_Mak. Alternately, you can
- write to me at P.O. Box 532, Storrs, CT 06268.