Category : Utilities for DOS and Windows Machines
Archive   : SWELL100.ZIP
Filename : SWELL.DOC

Output of file : SWELL.DOC contained in archive : SWELL100.ZIP


1 Abstract . . . . . . . . . . . . . . . . . . . 1
2 Introduction . . . . . . . . . . . . . . . . . 1
3 Usage . . . . . . . . . . . . . . . . . . . . . 1
3.1 SWELL.EXE . . . . . . . . . . . . . . . . 1
3.2 SwellCFG.EXE . . . . . . . . . . . . . . . 2
3.3 MemMap (MM.EXE) . . . . . . . . . . . . . 3
4 Where did my TSR go? . . . . . . . . . . . . . 4
5 Turbo Trouble . . . . . . . . . . . . . . . . . 5
6 Possible Uses . . . . . . . . . . . . . . . . . 5
6.1 Lotus 123 . . . . . . . . . . . . . . . . 5
6.2 MAKE.EXE / Microsoft C Compiler . . . . . 5
6.3 Text editor with a Compiler . . . . . . . 5
6.4 Debuggers . . . . . . . . . . . . . . . . 6
6.5 Bulletin Board Systems (BBS) . . . . . . . 6
7 Problems . . . . . . . . . . . . . . . . . . . 6
7.1 Special Situations . . . . . . . . . . . . 7
7.2 Communications Programs . . . . . . . . . 7
7.3 Local Area Networks (LANs) . . . . . . . . 7
8 Disclaimer . . . . . . . . . . . . . . . . . . 8
9 License . . . . . . . . . . . . . . . . . . . . 8
9.1 Registered Version . . . . . . . . . . . . 8
9.2 Demonstration Version . . . . . . . . . . 8
10 Registration . . . . . . . . . . . . . . . . . 9
10.1 Prices . . . . . . . . . . . . . . . . . 9
10.2 Order Form . . . . . . . . . . . . . . 10
11 For more information: . . . . . . . . . . . 11

Index 13

1 Abstract

SWELL transparently swaps a program out of memory onto disk when
a child program is loaded. This allows a program to run other
programs even if there is not enough RAM for them to occupy

2 Introduction

This program alleviates memory constraints under certain
conditions. The following example will help illustrate: Many
word processors (Sprint, WordPerfect) come with conversion
utilities that run externally. If you have 300k of free memory
and your word processor uses 250k, this leaves 50k for the
conversion utility to operate. It may not be enough!

When SWELL is active, it will swap the word processor session out
to disk before loading the conversion utility (leaving the full
300k free for the conversion utility to operate) then reload the
wordprocessing session at the completion of the conversion. The
wordprocessor will not be aware that it was put into limbo while
the conversion utility was running.

The results are obvious: SWELL can allow programs to work when
they would not work before.

3 Usage


SWELL is a TSR (Terminate and Stay Resident) program that
requires no parameters on the command line. If not already
installed, SWELL will remain in memory after you start it. The
registered version of SWELL uses approximately 9K of memory, the
demonstration version uses approximately 48k.

SWELL will use the root directory of the drive you loaded it from
for its swap files unless you specify one of two environment
variables as follows:

SET TMP=x:\path
SET SWELL=x:\path

Both the TMP and SWELL environment variables have the same
effect. If both are specified, SWELL takes precedence over TMP.
If you have extended, EMS or XMS memory, you can create a RAM
disk and point TMP, or SWELL to it. Note that SWELL only looks
for these variables when it is loaded into memory; Changing TMP

or SWELL afterwards will NOT change the path where SWELL swaps
memory. Performance is so high with a ram disk that you will
probably not notice any swapping occurring.

If you have any other TSR programs, you will probably want to
load them before SWELL (this is discussed further in section 4.)

3.2 SwellCFG.EXE

SwellCFG Allows you to view and/or change certain SWELL options.
SwellCFG will only work if SWELL has been loaded into memory.
Starting this program with no parameters brings up the following
help screen:

Û SwellCFG (C) 1989 Peter Fitzsimmons 06-03-89 Û
Û Version 1.01 Û
Û Usage: SWELLCFG [/d] [/v on|off] [/1] [/s] [/a] [/u] Û
Û [/b on|off] Û
Û Purpose: Display/Modify SWELL's (the SWapper shELL) Û
Û operating characteristics. Û
Û Options: /d - Display current status (no changes). Û
Û /v - turn verbose flag off (quiet mode) or on. Û
Û /1 - suspend once : don't do any swapping Û
Û for the next program that is loaded. Û
Û /s - suspend (until reactivated with /a). Û
Û /a - activate. Û
Û /u - uninstall (remove SWELL from memory). Û
Û /b - engage/disengage support for certain Û
Û Borland products. Û
Û Example: SWELLCFG /a /v off Û
Û would ensure that SWELL is active, and is in Û
Û quiet mode. Û
Figure 1: The SwellCFG Usage Box

SwellCFG communicates with SWELL through the SWELL Application
Programming Interface (SAPI). Registered users receive the C
source code (Microsoft/Turbo) for SwellCFG, as well as complete
documentation on SAPI. SwellCFG takes the following command line
parameters, in any order:

/d - Displays the status of the verbose flag, the "suspend
once" flag, and the suspended flag.
/v - Changes the status of the verbose flag. When ON, SWELL
will print messages when it is swapping memory out to
disk, loading programs, and swapping data from disk to
memory. When loading a program, SWELL will report how
many bytes of RAM it has saved you so far. Verbose on
is useful when debugging your system, or if you are
curious about SWELL's effectiveness. With the verbose
flag OFF, SWELL is in quiet mode; it will only print

- 2 -

messages during an error condition (ex: swap disk
full). The default is OFF.
/s - This option will suspend SWELL from swapping programs
out to disk. It will NOT stop it from swapping IN any
programs it had swapped out to disk before it was
suspended. Use this option when you are about to use a
program that does not work with SWELL (ex: Microsoft
/a - This option reactivates SWELL if it was suspended with
the /s or /1 options. It is not an error to use this
option if SWELL is already active.
/1 - This option tells SWELL not to swap anything on the
next program load. It's usefulness is limited in a
user invoked program like SwellCFG. The "suspend once"
option was intended for use by programs that use the
SAPI to communicate with SWELL. It could be used if
you are about to load a TSR (TSR programs are discussed
later in more detail).
/u - Ask SWELL to remove itself from memory. I use the word
"ask" because SWELL may refuse your request. If SWELL
is still responsible for programs swapped out to disk
it will not `uninstall' itself. SwellCFG /u must be
called again after all swapping has completed.
/b - Engage or Disengage "Turbo support". Certain Borland
products (Turbo C 2.00, Turbo Pascal 5.00, perhaps
others) will not get swapped unless this option is ON.
See section 5. The default is OFF.
NOTE: SwellCFG is not case sensitive. "/v off" is the same
as "/V Off". Also, the forward slash character can be
replaced by the minus sign. ie: "-a -v on" is the same
as "/a /v On".

3.3 MemMap (MM.EXE)

MemMap does not affect SWELL in any way. It can be used with or
without SWELL in memory. It simply displays DOS memory usage at
any given time. At this moment, I am working on this document in
a word processor. I am going to shell to DOS (actually, the "DOS
box" of OS/2) and run MM with SWELL active:

size name hooked vectors
------ --------------------------- -----------------------
3744 config.sys 2E
8992 D:\usr\msc\v51\swl\SWELL.EXE 21 22 23 24 2F
672 ..\CMD\SP.EXE
342880 free
Figure 2: Memory map with SWELL active

Now, I will do the same after suspending SWELL:

- 3 -

size name hooked vectors
------ --------------------------- -----------------------
3744 config.sys 2E
8992 D:\usr\msc\v51\swl\SWELL.EXE 21 2F
227552 ..\CMD\SP.EXE
3536 C:\OS2\COMMAND.COM 22 23 24
113104 free
Figure 3: Memory map with SWELL inactive

SP.EXE is my word processor. Notice that it only uses 672 bytes
when SWELL is active, and 227552 when it is not. Although not as
significant, COMMAND.COM also uses less memory with SWELL active.
SWELL swaps out all of the parent application except its PSP
(Program Segment Prefix) which is 256 bytes, plus the size of the
environment, which in my case was 416 bytes. Now I'll do
something impossible without SWELL:

size name hooked vectors
------ --------------------------- -----------------------
3744 config.sys 2E
8992 D:\usr\msc\v51\swl\SWELL.EXE 21 22 23 24 2F
672 ..\CMD\SP.EXE
672 ..\CMD\SP.EXE
672 ..\CMD\SP.EXE
340064 free
Figure 4: Over committed memory map

I loaded my WP 3 times! Normally this would have used (3 x
227552) + (3 x 3536) = 693264 bytes of memory (note this is
larger than the infamous 640k barrier). I could have loaded it
many more times, but my RAM disk (which I was using for swapping)
became full.

4 Where did my TSR go?

After SWELL swaps a parent program out to disk, and just before
it loads the child program, all of the Interrupt Vector Table
(IVT) is restored to the state that is was in when SWELL was
first loaded. Therefore, any "pop-up" type TSR programs that
were loaded when SWELL was suspended will probably not respond.
If SWELL is active when a TSR is loaded (and the active parent
program was loaded after SWELL) the TSR will simply vanish from
memory! The reasons for this side effect are beyond the scope of
this document.

Note that when SWELL is first loaded, the active parent program
(most likely is at a lower address in RAM than

- 4 -

SWELL, so it is not swapped. Any TSR's loaded at this time will
remain resident, but will not activate after any swapping is in
effect. As soon as there is a parent program above SWELL, any
TSR's that are loaded will simply vanish. For these reasons, it
is recommended that SWELL is the last TSR program that you load.

5 Turbo Trouble

For some reason, Turbo C 2.00 and Turbo Pascal 5.00 use an
undocumented DOS call (INT 21h, ax = 4B01h) to invoke the DOS
Shell function. I have simulated this call, and these two
products seem to work properly. However, since the DOS call they
use is undocumented, SWELL, by default, will not respond to this
call. To engage support for these Borland products and any
others that may use this method, you must invoke "SWELLCFG /b
on". Note that no harm will come if these two products are used
when SWELL does not have Borland support engaged; they just won't
get swapped out to disk when you shell.
Other Borland products, such as Turbo Debugger and Sprint, make
the proper DOS EXEC call (ax = 4B00h) and work perfectly.

6 Possible Uses

6.1 Lotus 123

When you invoke the 'System' feature of 123, 123 will be swapped
out to disk while you use DOS to format disks etc. Since your
suspended 123 session uses very little memory, it is possible to
start up another 123 session (or MANY of them). Or, you can
temporarily use your word processor or telecommunications program
to gather data for your spread sheet. When you EXIT back to 123,
it will be in the precise state in which you left it.

6.2 MAKE.EXE / Microsoft C Compiler

I find I can't live without SWELL in the OS/2 DOS Box. After
loading all of my network device drivers etc, I only have about
350K of free memory. The MSC 5.10 compiler will not load if
running a MAKE file. SWELL gives back more than 140k of free
memory to each pass of the compiler.

6.3 Text editor with a Compiler

Even on a full 640k machine, it is almost impossible to shell to
DOS from your favorite editor (ex: Qedit, Microsoft Editor) and
run any of today's compilers (QuickC, QuickBasic, Turbo C, Turbo
Pascal etc). SWELL makes your editor temporarily disappear from
memory to let these beasts run. Alternatively, you can shell to
DOS FROM your compiler and run your editor (then shell again to
your compiler (then shell again into your editor ((((...)))))).

- 5 -

As noted above, the Turbo C and Turbo Pascal compilers won't get
swapped out to disk during a DOS shell unless Borland support is

6.4 Debuggers

Debuggers like CodeView and Turbo Debugger use a lot of memory.
With SWELL active, there is plenty of room to shell to/from your
editor or compiler, or have more than one debugging session.

6.5 Bulletin Board Systems (BBS)

BBS sysops will be very pleased with SWELL. Many BBS programs,
like Opus, use external programs (sometimes called "door"
programs) to run on-line games, mail management etc. SWELL
allows a BBS session to run in such little memory that more phone
lines can be added and serviced on the same computer. The Royal
Trust BBS listed at the end of this document operates under

7 Problems

Side Effects caused by SWELL:
- Turbo C/Turbo Pascal: When Borland support is engaged (see
section 5) the "Run" command causes the
compiler to be swapped out of memory.
This is both good and bad. It
effectively gives your program 320,000
bytes more RAM! The bad side is that it
disables the built-in debugger. If you
have the external Turbo Debugger, this
is not a problem (and is quite a benefit
since you can start up the debugger
without ending your Turbo C session).
- Quick C Version 1: If you compile to an EXE file (rather
than MEMORY) QC.EXE will hang. This
happens because the linker (LINK.EXE)
and QC.EXE share memory during the link
stage. This is not a problem with
QCL.EXE. (It is not known at this time
if QC Version 2 has the same problem).

SWELL is known not to work with the following programs:

- Microsoft Windows (Although I have not tested them, I
suspect other multi-taskers like
Desqview and Double DOS will have the
same problems.) SWELL does work if
loaded in a Windows/386 command prompt,
however, care must be taken to use a
different swap path for each copy of

- 6 -

SWELL loaded into memory. See "network
drives" in section 7.3.
- Carbon Copy Early testing reports suggest some
problems related to the use of this
remote communications utility.


7.1 Special Situations

As stated in Section 4, SWELL restores the entire interrupt
vector table (IVT) to the state it was in when SWELL was first
loaded. Therefore, if the parent program had hooked any vectors,
they will be temporarily reset when it calls a child program.
Although I know of only one program that does this (Quick C 1.x),
it is conceivable that the parent and child could be sharing
memory pointed to by one of these vectors, or by some environment
variable. In this situation, SWELL would interfere with the
parent/child relationship. SwellCFG /1 or the SAPI could be used
by the parent to prevent itself from being swapped to disk before
the child is loaded to get around this problem.

7.2 Communications Programs

In a similar situation, some programs (especially communications
programs, like Telix) need to install an Interrupt Service
Routine (ISR) in the IVT to service hardware events, like a
character being received from COM1:. When such a program is
swapped out to disk, the ISR it installed will be reset as it was
when SWELL was installed. In the case of a program like Telix
that uses the COMx: ports, this means it will stop
receiving/transmitting characters while you are in a shell
(everything will return to normal when you return to Telix
though). This is usually of no significance, since you would not
shell from Telix if it was busy doing something. Note that
shelling to a program that installs its own ISR (ex: DSZ.COM)
will work fine.

7.3 Local Area Networks (LANs)

When swapping to a network drive, be sure to pick a swap path
(see section 3.1 on page 1) that no other workstation is using
for SWELL. If you do not differentiate each workstation's path,
the workstations will overwrite each other's swapped memory,
causing at least one of the workstations to fail.

- 7 -

8 Disclaimer

The Program is supplied "AS IS" without any warranty of any kind,
either expressed or implied, including, but not limited to, the
implied warranties of merchantabilty and fitness for a particular

In no event shall Peter Fitzsimmons be liable for any damages,
either direct or consequential, caused by the use, or inability
to use, this program, even if Peter Fitzsimmons has been advised
of the possibility of such damages.

9 License

The "DEMONSTRATION VERSION" of SWELL, to which subsection 9.2
applies, is that version which clearly identifies itself (each
time it is executed) as the DEMONSTRATION VERSION. Subsection
9.1 applies to any version that is not clearly marked as

9.1 Registered Version

You may:
a) use the Program on ONLY one machine at any one time;
b) make a copy of the Program for backup or modification
purposes ONLY in support of your Authorized Use; and
c) modify and/or merge the Program into another program only
in support of your Authorized Use.

a) use, copy, modify, merge, or transfer copies of the
Program except as noted in this Agreement;
b) reverse assemble, reverse engineer, or reverse compile
the Program; and/or
c) sublicense, rent, lease or assign the Program or any copy
of it.

9.2 Demonstration Version

9.2.1 You are free to use and distribute, with no obligation, the

a) you distribute only verbatim copies of the DEMONSTRATION
VERSION of SWELL as you receive it; and
b) it is accompanied by unmodified copies of its

9.2.2 You may incorporate the DEMONSTRATION VERSION of SWELL into
your hardware and/or software product under the terms of
Paragraph 9.2.1 above provided that:

- 8 -

a) you do not in any way modify the program;
b) you do not interfere with the program's operation in any
manner, including, but not limited to, redirecting or
impeding its interaction with the user via the keyboard or
screen; and
c) you tangibly demonstrate to Peter Fitzsimmons, or a
representative appointed by Peter Fitzsimmons, that all
terms of this license are in compliance.

10 Registration

Registered owners of SWELL will receive the most recent
production version of SWELL with all annoyances removed. The
registered version uses approximately 9k of memory. Complete C
source code for SwellCFG.EXE is supplied so that application
developers can interface their applications with SWELL.
Registration also entitles you to one free minor-revision

10.1 Prices

Quantity | Discount | Price per Copy
| | $US | $Canadian
1-10 | - | $40 | $48
11-30 | 25% | $30 | $36
31+ | 35% | $26 | $31

Discounts are per order and are not cumulative.

Prices include shipping via Canada Post inside the USA and
Canada. All other destinations should include $10 U.S. for
shipping charges. Please allow 4 weeks for delivery.

- 9 -

10.2 Order Form

Remit payment to:

Peter Fitzsimmons
Post Office Box 670
Adelaide St Postal Station
Toronto, Canada M5C 2J8

--- ( fold here if you are using a windowed envelope ) ---

Check one: Amounts specified in
U.S. __ -OR- Canadian funds __.

_____ SWELL registrations .............. @ $_____ each = $_______

_____ Overseas shipping................. @ $10.00 each = $_______

Ontario residents please add 8% PST.........Tax $_______

Total $_______





Phone(______)________________ Bus.(______)________________

Where did you obtain Swell?








- 10 -

11 For more information:

Write to: Post Office Box 670
Adelaide St Postal Station
Toronto, Canada
M5C 2J8

To receive the latest FREE demo version of SWELL, send a self-
addressed diskette to the address above, or call the following
BBS (which has kindly granted me permission to distribute the
demonstration version of SWELL through it):

(416)867-9663 (fido 1:250/628 FREQ SWELL1??.ARC)
Toronto Canada
300 - 9600 bps (Hayes V-series)

- 11 -

- 12 -


/1 3 L
/a 3 LAN 7
/b 3 License 8
/d 2
/s 3 M
/u 3 Microsoft C Compiler 5
`uninstall' 3 Microsoft Editor 5
/v 2 Microsoft Windows 6

active parent program 4 network 7
Application Programming
Interface 2 O
Opus 6
parameters 1
C payment 10
Carbon Copy 7 Prices 9
CodeView 6 PSP 4
command line parameters
2 Q
communications programs Qedit 5
7 Quick C 6, 7
QuickBasic 5
D QuickC 5
Desqview 6
DOS Box 5 R
Double DOS 6 Registration 9
E SAPI 2, 3
EMS 1 source code 2
environment variables 1 Sprint 5
extended 1 suspend 3
suspend once 3
Interrupt Service sysops 6
Routine 7
Interrupt Vector Table T
4 Telix 7
ISR 7 Terminate and Stay
IVT 4, 7 Resident 1
TSR 2, 4

- 13 -

Turbo C 3, 5, 6 X
Turbo Debugger 5, 6 XMS 1
Turbo Pascal 3, 5, 6

verbose flag 2

- 14 -


Figure 1: The SwellCFG Usage Box . . . . . . . . . . 2
Figure 2: Memory map with SWELL active . . . . . . . 3
Figure 3: Memory map with SWELL inactive . . . . . . 4
Figure 4: Over committed memory map . . . . . . . . . 4


  3 Responses to “Category : Utilities for DOS and Windows Machines
Archive   : SWELL100.ZIP
Filename : SWELL.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: