home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best Objectech Shareware Selections
/
UNTITLED.iso
/
boss
/
util
/
prin
/
003
/
spool.doc
next >
Wrap
Text File
|
1990-06-05
|
32KB
|
859 lines
Table of Contents
1. Overview...................................................2
2. Installation...............................................2
3. Accessing Versa-Spool Once Installed.......................3
4. The Parameters Enumerated..................................4
5. Examples...................................................8
5.1. To Install............................................8
5.2. After Installation....................................9
6. Programmer's Corner........................................9
6.1. Sub-Function 0 : Return Signature....................10
6.2. Sub-Function 1 : Toggle Pause........................10
6.3. Sub-Function 2 : Clear Buffer........................10
6.4. Sub-Function 3 : Request Pause Condition.............10
6.5. Sub-Function 4 : Request Free Buffer Space...........10
6.6. Sub-Function 5 : Request Total Buffer Size...........10
6.7. Sub-Function 6 : Redirect Output To LPT1:............10
6.8. Sub-Function 7 : Redirect Output To LPT2:............10
6.9. Sub-Function 8 : Redirect Output To LPT3:............10
6.10. Sub-Function 9 : Request Output Device..............10
6.11. Sub-Function A : Request Output Speed...............10
6.12. Sub-Function B : Set Speed..........................10
6.13. Sub-Function C : Request Device Spooled Status......10
6.14. Sub-Function D : Request Program Data Segment.......10
6.15. Turbo Basic Function Call Examples..................11
7. Business Stuff............................................11
8. User Registration Form....................................12
i
Versa-Spool
Version 2.10
A multi-printer spooler
Copyright 1990 - Jeff Newbro
1
1. Overview
Versa-Spool is an extremely versatile print spooler written for
the IBM-PC/AT series of computers. In an effort to anticipate
all the circumstances under which Versa-Spool may be required to
operate, features such as multiple buffers, large buffer size,
adjustable output speed, and the ability to redirect a printer
stream from one printer to another have been implemented. A
protocol has been developed which will permit access to the
operating parameters and current status of Versa-Spool either
from the dos prompt, or from within a program in order to enable
applications to interact intelligently with their printer
resources. And Versa-Spool may be instructed to automatically
select the most efficient available printer to which output may
be sent.
Versa-Spool is installed and accessed at the dos prompt with the
following syntax :
SPOOL [-option(s)] <enter>
where option is one or more of the following :
-a{n} = Auto-select printer (n=Mode 1 or 2)
-b{n} = Buffer size (n=1..Available memory in k)
-c = Clear print buffer
-n{n} = Printer Number (n=1..3)
-p = Toggle Pause
-r{n} = Redirect output to new device (n=1..3)
-s{n} = Output Speed in cps (default = 100)
-u{n} = Allocate buffers in Unused memory (n=0..FFFF)
-v{n} = Offset interrupt Vectors (n=1..6)
-? = Show status
2. Installation
Versa-Spool is a memory resident program which installs itself
according to parameters specified by the -b, -n, -s, -u, and -v
options the first time it is executed. If no value is specified
for these options, Versa-Spool will assume that 1 buffer, 1
kilobyte, and 100 characters per second, are the desired
parameters.
For example, to install Versa-Spool to provide LPT1: and LPT2:
with 80k buffers each, the following command line would be
entered :
C:\> spool -n2 -b80 <Enter>
or, for a single 200k buffer for LPT1:, type :
C:\> spool -n1 -b200 <Enter>
2
It would not be possible to install a single buffer for LPT2:,
since the buffers are allocated sequentially, beginning with
LPT1:. It would, however, be possible to install a single buffer
for LPT1: whose output was redirected to LPT2:. This would be
accomplished by the following two commands :
C:\> spool -n1 -b100 <Enter>
C:\> spool -n1 -r2 <Enter>
The redirection feature will be discussed in greater detail
later.
Once Versa-Spool has installed itself as a terminate and stay
resident program (TSR for short), it will print its installation
status on the screen and return to dos. For those who may want
to install Versa-Spool with a batch files that checks the success
of its commands, an error level of 0 will be returned if the
installation was successful, or 1 if there was an error. Also,
for the batch file programmers, the messages printed on the
screen by Versa-Spool may be piped to the nul device if it is
undesirable for the end user to see them. For instance a batch
file containing the lines :
.
.
spool -n1 -b100 > nul
IF ERRORLEVEL 1 GOTO NOGOOD
.
.
would install a 100k buffer for LPT1: and show no message after
installation. If Versa-Spool did not install itself properly,
execution would be vectored to the label "NOGOOD", presumably to
echo an error message and exit.
Subsequent executions of Versa-Spool will not install another TSR
copy of Versa-Spool, but will rather provide communication with
the already installed TSR program. The protocol for this
communication is described in the "Programmer's Corner" section.
3. Accessing Versa-Spool Once Installed
After the first time Versa-Spool is run, and its TSR portion is
loaded, subsequent executions of the program will either cause it
to print the current status of the resident copy in response to
the -? option, or attempt to modify its operating status
according to the -c, -p, or -r parameters.
For example, if LPT2: is to be paused for some reason, the line :
3
C:\> spool -n2 -p <Enter>
would be entered. Note that in this instance, the -n parameter
specifies the device to be addressed, rather than the number of
buffers to be installed. This convention applies to all
executions of Versa-Spool subsequent to the first, when it
installs its TSR portion. The pause option is a toggle, so to
restart the printer, the same line would be re-entered.
Similarly, to clear the buffer for LPT1:, the line :