home *** CD-ROM | disk | FTP | other *** search
-
- shroom.doc - readme file for Shell Room Utility
-
- Copyright (C) Davis Augustine 1990-1992. All rights reserved.
-
- Last Modified: 7mar92. Version 1.9c
-
- Files
- -----
- SHROOM.COM - The program.
- SHROOM.DOC - This documentation file.
-
- Description
- -----------
- SHROOM is a utility that gives a DOS application's shells more
- room. It does this by intercepting the shell operation,
- swapping out the application program, freeing up the memory,
- and then performing the shell operation. It also
- intercepts the exit from the shell, so that it can swap
- the application back in before returning to it. The program
- is none the wiser.
-
- Features
- --------
- o Easy to use.
- o Detects swap file overflow (disk full) and asks whether you want
- to abort back to the application or continue with a partial swap.
- o Detects TSR loading and unloading during the shell. Frees
- the TSR's resources and puts a warning message.
- o Small resident size (about 6k). Frees nearly all of the memory.
- o Allows you to increase COMMAND.COM's environment size.
- o Works with all major DOS applications.
- o Fully user specifiable swap file path. Ie., you can put
- it on a virtual disk.
- o Swaps allocated memory only, avoiding unnecessary writes
- and reads of free memory.
- o Intelligent command line parsing. Searches DOS's PATH
- for program to load, allows passing of args to the program.
- Automatically tries .COM and .EXE extensions if not
- specified by user.
- o Verbose mode for inquisitive users.
- o Quiet mode for apathetic users.
- o Uses DOS "make temp file" facility to prevent network clashes.
-
-
- Installation and Operation
- --------------------------
- o To install, just copy SHROOM.COM into a directory in your PATH
- or the directory from which you will run the application.
- o For help, use the question mark switch, eg. "shroom -?".
- o To load, just type the normal command used to invoke the
- application, with "shroom " prepended. Eg, if the application
- is called "edit", then you would use the command "shroom edit".
- Arguments are passed to the application just as before, so eg.
- you can say "shroom edit letter.doc".
- o To shell out, use whatever shell command is provided by the
- application. You will see a message from Shroom saying that it
- is swapping the program out, after which the normal shell prompt
- and actions will appear. When you exit the shell, you will
- again see the "swapping" message from Shroom and then be
- deposited back into the application as usual.
-
-
- Help Screen - Displayed by the "-?" switch:
- -------------------------------------------
-
- Usage: shroom [-?hLnpqv] [-e #] [-s path] [-t targets] [-z #] prog [args]
- -?h : print this help message
- -L : display shareware license
- -n : display program notes
- -p : proceed (without asking) with partial swap if disk full
- -q : quiet mode - display error messages only
- -v : verbose mode - provide running commentary
- -e # : set ERRORLEVEL returned if unable to load prog (default = 254)
- -s path : specify DRIVE:DIR in which to create swap file
- -t targs : specify which shell programs cause swapping
- -z # : specify environment size for COMMAND.COM
- prog : application program to execute
- args : command line to pass to the application
-
- Example: shroom -p -e 99 -s E:\ -z 800 wp letter
-
-
- Notes Screen - Displayed by the "-n" switch:
- --------------------------------------------
- ********** NOTES **********
-
- PROGRAM LOADING:
- The application must be a .EXE or .COM file. You can leave off the
- file extension and Shroom will try to find a matching .COM or .EXE file.
- Shroom searches for the application program first in the current directory,
- then in Shroom's home directory, and finally in the directories of the
- PATH environment string.
-
-
- SHROOM SWITCHES AND ARGUMENTS:
- All text surrounded by square brackets, as in "[-hnv]", is optional.
- Switches can be given in any order, and can be in upper or lower case,
- and may be separated by spaces (or not). The space between a switch and
- its argument is optional, ie. you can say "-z800" or "-z 800".
- Although all our examples use dashes as the switch character, a slash
- can also be used: eg. "Shroom /v /p ...".
-
-
- ENVIRONMENT SIZE:
- Many people have run into the following problem: you type the command
- "SET MYVAR=WHATEVER" and get back the message "Out of environment space."
- This occurs when a TSR is loaded or while a .BAT file is running. You get
- around this by adding a line like "SHELL=C:\COMMAND.COM /E:2000" to your
- CONFIG.SYS file, thus increasing the minimum environment space to 2000
- bytes. However, when you shell out from an application and then run a
- .BAT file, you find that the environment size has again been restricted
- and the CONFIG.SYS line has no effect.
-
- What you need is the amazing new "-z #" switch from Shroom. It causes
- Shroom to append the string " /E:#" to COMMAND.COM's command line, thus
- setting the desired minimum environment space for the new shell. Note
- that in DOS 3.0, # is the size in paragraphs. In later versions it is
- in bytes.
-
-
- EXIT RETURN CODES:
- Shroom exits immediately if it cannot load the application, returning
- an ERRORLEVEL of 254, unless you have changed the value with the "-e #"
- switch. If it can load the application, then Shroom exits when the
- application does, and returns the application's exit code.
-
-
- SWAP FILE:
- Shroom stores the application in a temporary swap file during the
- shell. The swap file always has extension ".OOM". The main part of
- its name is derived from the application name followed by some digits.
- Eg., "WP_000.OOM". When you exit from the shell, Shroom reads the
- file back in and then deletes it. Obviously, you should not delete,
- rename or otherwise modify the swap file while you are in the shell.
- If you crash the system while in the shell, then the swap file will
- still be there after you reboot (unless you were using a ram disk),
- and it is a good idea to delete it then. The file is readonly so
- you will need to run attrib -r on it first.
-
- Shroom (among many other programs) looks for the environment variable
- TEMP at startup. If TEMP is defined, then Shroom takes its definition
- as the default location of the swap file. If TEMP is not defined, then
- the current directory becomes the default swap file location. If you
- give the -s DRIVE:DIR switch on the command line, then that overrides
- the default location. The swap file location is determined only once,
- during Shroom's startup. Changing your current drive or directory while
- in the application or a shell will not affect where the swap file goes.
- Finally, if you have a ram disk with enough room, it makes an excellent
- home for the Shroom swap file. It is fast and "self-deleting" if you
- crash the PC.
-
-
- TARGET LIST:
- (Most people don't need to worry about this.) When Shroom notices
- that a program is being shelled, it checks the name of that program
- against the target list. If it is in the list, then Shroom goes ahead
- and does its thing, swapping the application and freeing its memory.
- If the shelled program is not in the target list, then Shroom lets the
- program load and execute normally without any swapping.
-
- The purpose of the target list is to prevent unwanted swapping. There
- are a few applications which "shell" their own overlays, and if Shroom
- swapped them then the overlays wouldn't have anyone to talk to!
-
- The default target list contains just your command shell, as defined
- by the COMSPEC environment string. The -t switch is used to change the
- target list. It takes a list of filenames separated by commas. The file
- names are case independent and should not have drive or directory paths.
- The ~ (tilde) string can be used to refer to the COMSPEC definition.
- For example, "shroom -t ~, SUBPROG.EXE ..." would cause swappping on
- the default shell and when SUBPROG.EXE is spawned. Typical shells are
- COMMAND.COM, 4DOS.COM, NDOS.COM and SH.EXE.
-
- Another special string is * (asterisk). It is the wildcard target
- list, which causes Shroom to spawn on all shell operations. It should
- be the only -t argument, as in: "shroom -p -t * -v ...".
-
-
- APPLICATIONS THAT DO "BACKGROUND PROCESSING":
- You may have a communications package which allows you to initiate a
- file transfer and then shell out to do other things. This will probably
- not work if the package was Shroom'ed, because the application is actually
- unloaded from memory (and from the interrupt vector table) during the
- shell. The background processing code will not be there anymore!
-
-
- ENVIRONMENTAL IMPACT:
- Shroom is processor (8086, 286, 386, etc) independent. It does not do
- any floating point. It doesn't care about or use expanded or extended
- memory (a future version will be able to swap to extended mem). It works
- with DOS Extender (eg. Pharlap) based applications. It may work in the
- Windows, Desqview and other pseudo or real multi-tasking environments, but
- you're basically on your own (caveat sharer).
-
-
- LOADING TSR'S INSIDE SHELLS:
- In general, it is not safe to load a TSR while shelled out of an
- application, unless you delete the TSR before exiting the shell. A
- variety of memory and interrupt handling problems can occur. This
- is true even when you are not using Shroom. If you are using Shroom,
- then any TSR's that were loaded during the shell will be automatically
- unloaded when you return to the application. If a TSR was loaded "high",
- then it will stay loaded high but may cause problems if it uses any
- interrupts that the application uses. Shroom displays the message:
- "WARNING: Interrupt ## used by application, changed in shell." if that
- occurs.
-
-
- UNLOADING TSR'S INSIDE SHELLS:
- The sequence in mind is: You Load a TSR, enter an application,
- shell out, then unload the TSR. The main danger in doing this is that
- unloading the TSR may restore interrupt vectors that the application
- had remapped. The chain would be changed from TABLE->APP->TSR->SYSTEM
- to TABLE->SYSTEM, thus "cutting out" the app. Fortunately, Shroom is
- able to detect when this occurs. If you see the message "WARNING:
- Interrupt ## used by application, changed in shell", then that is what
- happened. You should probably save your changes to a new temp file if
- possible, and exit the application. You're not guaranteed to be able
- to do this, so be sure to hold your breath.
-
- You don't really need to know what interrupts are or understand any
- of the above. The bottom line is: don't play with TSR's when shelled
- out of an application. If you can't resist the urge to, then at least
- Shroom will provide some insurance by catching and attempting to deal
- with conflicts when they occur.
-
-
- REPORTING BUGS:
- If Shroom is not working as advertised for you, please tell me about
- it and I'll try to fix it. Shroom problems are usually due to conflicts
- with other software packages. You should send a problem report via
- regular or electronic mail with a description of the malfunction and
- a listing of your CONFIG.SYS and AUTOEXEC.BAT files. Use the switches
- "-v -o FILE" to create a log of the malfunctioning session. You may
- also be asked to send a copy of the misbehaving application so that I
- can debug with it. (It usually takes more time to obtain the software
- and/or reproduce the bug than it does to fix it.)
-
-
- Shareware License - Displayed by the "-L" switch:
- -------------------------------------------------
-
- ********** SHROOM SHAREWARE LICENSE **********
-
- This is a copyrighted software work which is distributed as shareware.
- Under this license agreement you are granted the right to use Shroom
- on all machines and environments that it supports. You are also
- free (and encouraged) to pass copies of this shareware on to others
- as long as it is not for payment and not bundled with anything else
- that is for payment.
-
- The shareware registration fee is $25 for single users, $95 for groups
- (up to 12 users). To receive a diskette, please add $25 for shipping
- and handling and specify diskette type. Send check or money order to:
-
- Davis Augustine
- P.O. Box 390178
- Cambridge, MA. 02139
-
- Commercial distribution licenses, source code and customized versions are
- also available at reasonable rates. Please write to the above address or
- send me email at CompuServe id 72230,3053. I would also appreciate any
- comments, questions, suggestions or bug reports. The latest Shroom release
- can usually be found in CompuServe forums WPSGA, lib 9, and IBMSYS, lib 3.
-
-
-
- ----------------------
- | REVISION HISTORY |
- ----------------------
-
-
- Changes in v1.9c (7mar92)
- --------------------------
- Change nonsensical swap file names to app_###.OOM. (Thanks to
- users ML and RMB).
-
- Make swap file readonly. (Thanks to users JB, ML, et al).
-
- Show DOS error codes in decimal instead of hex.
-
-
- Changes in v1.8k (15dec91)
- -------------------------
- Fix shroom's exit code when -v switch used. Was always exiting
- with ERRORLEVEL 0 when -v was given. (Thanks to user B).
-
-
- Changes in v1.8j (30oct91)
- -------------------------
- Allow tilde in target list to indicate COMSPEC file.
-
- Add -o F switch to redirect output to a file. (Thanks to user RE).
-
-
- Changes in v1.8g (14sep91)
- -------------------------
- Use TEMP environment string as default swap file location.
- Previously we used the current directory. You still use the "-s PATH"
- switch to override the default. (Thanks to users LC, ML).
-
- Start application with full path name, not just command name
- given (eg. C:\BIN\COOLPROG.EXE, not COOLPROG.EXE). Makes Clipper
- work (was giving "overlay not found" error). (Thanks to user LM).
-
- Make it work better with systems (such as MKS) where / (slash)
- is the path separator, instead of backslash. Wasn't finding app if
- it was in same dir as Shroom.
-
- Detect and warn user when interrupts used by the application
- have been changed in the Shell, apparently by unloading a TSR. Improve
- TSR detection and deciding when to unload it and when not.
-
- Changes to interrupt handling to work better with PC NFS and
- some other software.
-
- Fix application startup so it is not fooled by APPEND. If a
- directory containing app was APPENDED, Shroom would think app was in
- the current directory. (Thanks to user DG).
-
- Add sections on TSR's and reporting bugs to notes.
-
- Make -q suppress startup message, too. (For user ML).
-
- Show command being passed to app, besides app name (unless -q).
-
- If verbose, show exit codes from shells and from app. Also
- if verbose, show swap file location at startup.
-
-
- Changes in v1.7d (14aug91)
- --------------------------
- Fix problem with -z # switch when comline is not empty. Was
- overwriting existing comline instead of inserting in front of it.
- (Thanks to user LH).
-
-
- Changes in v1.7b (6aug91)
- --------------------------
- Fix problem with Fortran programs. Was causing "Floating point
- not loaded" error at application load time. Hey, don't blame me, the
- bug is in the Fortran startup code! (Thanks to users RS and DF).
-
- Disable control-C during swapping. Would cause system hang and
- other strange behavior (especially by the user!).
-
- Bring back group shareware registration, by popular demand.
-
-
- Changes in v1.6d (21jul91)
- --------------------------
- Fix state saving and restoring to work better with other TSR's.
- With a few TSR's, system would reliably hang when you exited the
- application back to DOS, if a shroom swap occurred in the application.
- (Thanks to user ML)
-
-
- Changes in v1.6c (22jun91)
- --------------------------
- Get default target list from the COMSPEC environment string. So, if
- you use a shell other than COMMAND.COM, Shroom will automatically recognize
- it. (Thanks to user MB)
-
- Fix problem in 1.6b, where swapping may have not been done with
- some applications. Was failing to handle lowercase shell names correctly.
-
-
- Changes in v1.6b (14jun91)
- --------------------------
- Only swap out specified shell programs. Default list is COMMAND.COM.
- Add -t switch to specify others. (Thanks to user LH)
-
- Add -z switch to allow increasing the environment space of
- COMMAND.COM. (Thanks to user DM)
-
- The -v switch as part of its verbosity shows the shell program being
- executed and its command line.
-
-
- Changes in v1.5d (3may91)
- --------------------------
- Search for the application in Shroom's home directory, too.
- (Thanks to user CS)
-
-
- Changes in v1.5c (26apr91)
- --------------------------
- Fix a bug in 1.5b, when checking for unswappable blocks. Caused
- some applications to swap zero bytes. (Thanks to user JG)
-
- Mention CompuServe home library in license.
-
-
- Changes in v1.5b (29mar91)
- --------------------------
- Fix a bug in swapping. Leave alone any high blocks that are
- allocated by TSR's. This caused shells to hang when Shroom was used
- with some software (such as QCache). (Thanks to user RM)
-
-
- Changes in v1.5a (24mar91)
- --------------------------
- Add -q switch for quiet mode. Suppresses the "SHROOM: swapping..."
- messages but still lets error messages through.
-
- Add -p switch to force partial swaps. If Shroom is unable to
- swap all of the application out, it normally asks you whether you want
- to proceed with the shell or return to the application. With the -p
- switch, it always proceeds with the shell without asking you.
-
- Add -e errorlevel switch to allow you to specify the exit value
- returned by Shroom if it is unable to load the application. This allows
- you to choose a value which does not conflict with those returned by
- your other applications. This feature is only useful to those who make
- serious use of "if ERRORLEVEL..." statements in DOS batch files.
- (Thanks to user WB)
-
- Add -n switch to show program notes, and add more information
- to the notes. There is now a help screen (-h), a shareware license
- screen (-l) and a notes screen (-n).
-
- Properly delete the temporary swap file when the user aborts
- the shell on disk full error (ie. when you pick 'A' to return to the
- application). In previous versions of Shroom, the file was never
- deleted, thus leaving temporary files with names like "0A982331" lying
- around.
-
-
- Changes in v1.4d (14mar91)
- --------------------------
- Shroom returns the ERRORLEVEL of the application program which
- was executed. If the application fails to execute, then Shroom returns
- an ERRORLEVEL of 2. Previously, Shroom always returned ERRORLEVEL 0
- if the application was successfully executed.
-
-