Dec 262017
 
Great multiple printer spooler.
File MSPOOL2.ZIP from The Programmer’s Corner in
Category Printer Utilities
Great multiple printer spooler.
File Name File Size Zip Size Zip Type
MSPOOL2.COM 1792 834 deflated
MSPOOL2.DOC 7806 2996 deflated

Download File MSPOOL2.ZIP Here

Contents of the MSPOOL2.DOC file



Multi Spooler Ver. 2
for the IBM PC
by Rich Winkel
Columbia, Mo.

For free distribution only

Mspool2 Features

Allows spooling up to 4 printers simultaneously.
Supports both parallel and serial printers in any
combination.
Has a user selectable buffer size up to 63K bytes.
Sensitive to competing demands for CPU time. Won't
slow down foreground jobs.
Allows cancellation of an on-going print operation.
Can be 'disabled' for use with programs which are
incompatible with it's operation.


Usage:

To install the spooler, at the DOS prompt type:

MSPOOL a b c
where:

a (= 1 - 4) represents the four possible printers on the PC.
(1, 2 & 3 correspond to LPT1, LPT2 & LPT3)

b (= 1 - 9) represents the number of 7K chunks of memory to set
aside for the spooler buffer.

c (= 1 - 4) is an optional parameter used when you wish the
output to be directed to a serial port.
(1 and 2 correspond to COM1 and COM2)

Once the spooler is installed, the user need not worry about
it further; it will begin intercepting all print operations and
buffering them. However, the operation of the spooler can be
modified after it has been installed, if the need arises. After
the spooler has been installed, if you type:

MSPOOL a

where 'a' is the same 'a' you used to install it, you are
presented with three options: Purge, Disable or Enable. These
are as follows:

Purge: Drops any characters remaining in the spooler buffer.
This has the effect of canceling any printing operation
currently taking place.

Disable: A few programs for the PC operate in a way which
interferes with MSPOOL's ability to send characters to
the printer. The result is that MSPOOL captures the
characters, but doesn't actually begin printing them
until it's buffer is full or you exit your program.
'Disabling' the spooler (prior to running your program)
keeps the number of characters in it's buffer from
growing. That is, every time the spooler intercepts a
character, it prints a character. If it's buffer is
empty, it's as if it wasn't there at all. It simply
prints the character it gets when it gets it. If there
are characters in the buffer at the time the offending
program is invoked, then when it gets a character to
print, it fetches the next character in line and prints
it, and puts the new character at the end of the queue.

Enable: Re-enables spooling.

Hitting any key other than P, D or E has no effect.

Notes:

To spool to a serial printer, first initialize the COM port
with the MODE command: MODE COMc:baud,parity,databits,stopbits
etc. DO NOT use the P (continuous retry) option. Then install
MSPOOL: MSPOOL a b c. This will route all output for LPTa
through the spooler to the COMc port. DO NOT use the MODE
redirect command. (i.e. don't use MODE LPT#:=COMn)

To spool to more than one printer, just run the spooler
repeatedly, specifying each printer in turn.

When spooling to more than one printer, in certain
circumstances (see tech hype below) the last spooler loaded will
have priority, then the second to last.

In order for the Purge, Disable, Enable routine to work, you
should load the spooler(s) last among the 'resident' routine(s)
which affect the operation of any printer. For instance, if you
use GRAPHICS.COM, you should run it before running MSPOOL.

Once the spooler is installed, it's output cannot be re-
directed to another port, so programs written for this purpose
(such as QSWAP) will not work.

The ability to redirect to a COM port could be put to good
use when uploading a large file to another computer when no
handshaking (XON/XOFF or XMODEM) protocol is required.
(Especially if you are limited to 300 baud)

More DOS Bugs! Apparently, FORMAT & DISKCOPY will not work
properly if they do not reside low enough in memory, so if you have
trouble with either of these commands and you have a large spooler
buffer or a lot of resident routines installed, try rebooting
without the resident routines or reduce the spooler buffer size and
try again. (This problem appears to be similar to the one which
arises if you have too much memory.)

Technical hype:

This spooler intercepts 2 interrupts: Printer I/O (INT 17H),
and Keyboard I/O (INT 16H). At installation, it stores the old
vectors for these interrupts internally and substitutes it's own
addresses in the interrupt vector table.
Any call to print is checked as to whether it references the
spooler's printer. If not, it is passed on to the the old
printer I/O handler. (could be another spooler, GRAPHICS.COM, the
ROM routine etc.) If it does reference the spooler's printer,
the character is put in the spooler's buffer, and the buffer is
checked to see if it's full. If not, the spooler returns
to the calling program. Otherwise, the spooler prints the
next character waiting in the buffer, then returns. If the
spooler has been 'disabled', it always prints the next character
in the buffer, regardless of whether the buffer is full.
Whenever a program makes a keyboard I/O call (INT 16H), the
spooler checks whether it has a character to print in it's
buffer. If not, it passes control to the old keyboard I/O
routine (could be another spooler, the ROM routine etc.).
Otherwise, it makes one attempt to print a character. It then
checks to see if the keyboard call will require the keyboard I/O
routine to wait for a character to be entered from the keyboard
if no character is already in the keyboard buffer. If not, it
passes control to the old keyboard I/O handler. Otherwise, it
looks at the BUFFER_HEAD and BUFFER_TAIL words in the ROM BIOS
data area to determine if there is a character in the keyboard
buffer. If there is, it passes control. Otherwise, it begins
looping, repeatedly attempting to print and checking the keyboard
buffer until it either runs out of characters or a character is
entered at the keyboard. It is during this looping process that
the most recently installed spooler will get the highest
priority.
Whenever mspool is run, it checks where the printer I/O
interrupt vector is pointing to determine whether it has already
been installed. If it doesn't find a copy of itself there, it
assumes it is not installed and continues with installation. If
there is a copy of itself, it checks to see whether the copy is
configured to intercept calls to the same printer as was
specified in it's own parameter list (parm 1). If not, it gets
the segment for the next printer I/O handler up the line from the
copy and repeats the same procedure until it either lands in
unfamiliar territory or finds a spooler configured for it's
printer. If it finds one with the proper configuration, it
presents you with the 'Purge, Disable, Enable' option.
Otherwise, it continues with installation.
During installation, the spooler is patched in accordance
with the parameters passed to it by DOS, to customize for
parallel or serial printing, buffer size, LPT number and the
addresses of the old interrupt routines gotten from the interrupt
vector table.
The legal ranges for the printer number and serial port number
are due to the fact that there is space for 4 ports in both the
printer and RS-232 tables.


 December 26, 2017  Add comments

Leave a Reply