LPT-BUFF.COM -- A Stay-Resident Program to Expand the Effective Buffer
Sizes of Your Line Printers -- By CFMartin, ASP, 12/91
Install LPT-BUFF at the DOS system prompt by typing:
n is 1,2 or 3, to specify which line printer you want to buffer, and
m is any number 1 through 64, to specify how many kilobytes you want
to allocate from memory to its buffer.
n or m may be omitted, but the equals sign must be included before
the buffer size argument. The default values are LPT1 and 8 KB.
Actually, the only important characters in the command line
are the first numerical character between 1 and 3 encountered before
the equals sign, which is taken to be the desired printer
designator; the equals sign itself, which serves as the field
delimiter; and the next one or two numerical characters
after the equals sign, which are taken to be the buffer size.
Thus, the entries:
LPT-BUFF 1=32 and
work just like the entry
LPT-BUFF turns up to 64 kilobytes of your computer's random access
memory (RAM) into a buffer for your line printer. If your printer
has a small buffer and you find yourself waiting for your computer
to finish printing one thing before it lets you start on the next,
then LPT-BUFF should be a time-saving utility for you.
LPT-BUFF functions in the "background", and its presence will
probably not be noticed except during printing, when three effects
may become apparent:
o Printing operations will no longer tie up your computer's
CPU, at least for printing files up to the size of the
buffer you have allocated from RAM for LPT-BUFF's use for
o However, while LPT-BUFF is transferring data from the
allocated RAM buffer to the printer in the "background",
you may notice a decrease in speed of the "foreground"
process, perhaps accompanied by slight pauses or apparent
sluggishness, for example in response to keystrokes. This
is a part of the compromise one makes to free up the CPU
from the limitations placed on it by a printer with a too-
small hardware buffer.
o If your printer has a very small buffer (e.g., my old
Tandy DMP-130 has only an 80-byte buffer -- enough for one
full line of text), you may also notice it pausing
slightly between lines. Again, this is part of the
LPT-BUFF checks the printer status before attempting to print. If
it finds the printer not ready on 60 successive system timer cycles
(about 3 seconds), it alerts you with a blinking message on the
screen (except in graphics modes). You may either correct the
problem with the printer, or press
LPT-BUFF may be installed up to three separate times during bootup,
once for each of three printers (LPT1,2 and 3). Each printer will
be enhanced with its own new buffer, supporting simultaneous
printing on several line printers.
Precautions and Limitations:
LPT-BUFF may not run compatibly with all other memory-resident
software, nor has it been exhaustively tested in a variety of
systems. However, it is simple in construction, employs widely
recognized TSR programming techniques and uses standard BIOS and DOS
functions available in DOS version 2 and later, making it likely to
operate in most DOS environments.
LPT-BUFF is offered as-is, with no warranty expressed or implied.
It should be thoroughly tested by the user with non-critical data
before it is committed to unrestricted use.
THE AUTHOR TAKES NO RESPONSIBILITY FOR MALPERFORMANCE IN ANY SYSTEM.
LPT-BUFF hooks the following interrupts:
08h (system timer -- to transfer data from allocated buffer
in RAM to printer if current foreground process
13h (disk absolute read/write services -- to set a flag
blocking printer data transfer during disk operations)
17h (line printer services -- to redirect foreground process
printer output to the allocated buffer in RAM)
28h (DOS "ok" interrupt -- to permit background printing
at the DOS system level)
Any time the allocated printer buffer contains data to be
transferred to the printer, the algorithm which governs the duty
cycle of the background printing process is as follows:
o A minimum of six timer ticks (1/3 second) dedicated to use
by the foreground process, then
o A maximum of six timer ticks by the background process, or
until the printer reports "not ready" 25 times in
LPT-BUFF cannot be un-installed. If this is required, system reboot
will be necessary.
LPT-BUFF is distributed as Shareware. It is not "freeware" or
public domain software, but is made available to you, the user, for
evaluation under the Shareware principle of "try before buy".
If you use LPT-BUFF regularly, you are requested to register your
copy. Registration fee is $5.00, and may be remitted to:
Charles F. Martin
3239 Riverview Dr.
Triangle, VA 22172
Charles F. Martin is a member of the Association of Shareware
Professionals (ASP). ASP wants to make sure that the shareware
principle works for you. If you are unable to resolve a shareware-
related problem with an ASP member by contacting the member
directly, ASP may be able to help. The ASP Ombudsman can help you
resolve a dispute or problem with an ASP member, but does not
provide technical support for members' products. Please write to the
ASP Ombudsman at 545 Grover Road, Muskegon, MI 49442 or send a
CompuServe message via CompuServe Mail to ASP Ombudsman 70007,3536.