home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / util / prin / 003 / spool.doc next >
Text File  |  1990-06-05  |  32KB  |  859 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                   Table of Contents
  8.  
  9.  
  10.            1. Overview...................................................2
  11.  
  12.            2. Installation...............................................2
  13.  
  14.            3. Accessing Versa-Spool Once Installed.......................3
  15.  
  16.            4. The Parameters Enumerated..................................4
  17.  
  18.            5. Examples...................................................8
  19.               5.1. To Install............................................8
  20.               5.2. After Installation....................................9
  21.  
  22.            6. Programmer's Corner........................................9
  23.               6.1. Sub-Function 0 : Return Signature....................10
  24.               6.2. Sub-Function 1 : Toggle Pause........................10
  25.               6.3. Sub-Function 2 : Clear Buffer........................10
  26.               6.4. Sub-Function 3 : Request Pause Condition.............10
  27.               6.5. Sub-Function 4 : Request Free Buffer Space...........10
  28.               6.6. Sub-Function 5 : Request Total Buffer Size...........10
  29.               6.7. Sub-Function 6 : Redirect Output To LPT1:............10
  30.               6.8. Sub-Function 7 : Redirect Output To LPT2:............10
  31.               6.9. Sub-Function 8 : Redirect Output To LPT3:............10
  32.               6.10. Sub-Function 9 : Request Output Device..............10
  33.               6.11. Sub-Function A : Request Output Speed...............10
  34.               6.12. Sub-Function B : Set Speed..........................10
  35.               6.13. Sub-Function C : Request Device Spooled Status......10
  36.               6.14. Sub-Function D : Request Program Data Segment.......10
  37.               6.15. Turbo Basic Function Call Examples..................11
  38.  
  39.            7. Business Stuff............................................11
  40.  
  41.            8. User Registration Form....................................12
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                                           i
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.                                      Versa-Spool
  90.  
  91.                                     Version 2.10
  92.  
  93.                                A multi-printer spooler
  94.                             Copyright 1990 - Jeff Newbro
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.                                           1
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.           1. Overview
  140.  
  141.           Versa-Spool is an extremely versatile print spooler  written  for
  142.           the  IBM-PC/AT  series of computers.   In an effort to anticipate
  143.           all the circumstances under which Versa-Spool may be required  to
  144.           operate,  features  such as multiple buffers,  large buffer size,
  145.           adjustable output speed,  and the ability to redirect  a  printer
  146.           stream  from  one  printer  to another have been implemented.   A
  147.           protocol has been developed  which  will  permit  access  to  the
  148.           operating  parameters  and  current  status of Versa-Spool either
  149.           from the dos prompt,  or from within a program in order to enable
  150.           applications   to   interact  intelligently  with  their  printer
  151.           resources.   And Versa-Spool may be instructed  to  automatically
  152.           select  the  most efficient available printer to which output may
  153.           be sent.
  154.  
  155.           Versa-Spool is installed and accessed at the dos prompt with  the
  156.           following syntax :
  157.  
  158.                SPOOL [-option(s)] <enter>
  159.  
  160.             where option is one or more of the following :
  161.               -a{n}      = Auto-select printer (n=Mode 1 or 2)
  162.               -b{n}      = Buffer size (n=1..Available memory in k)
  163.               -c         = Clear print buffer
  164.               -n{n}      = Printer Number (n=1..3)
  165.               -p         = Toggle Pause
  166.               -r{n}      = Redirect output to new device (n=1..3)
  167.               -s{n}      = Output Speed in cps (default = 100)
  168.               -u{n}      = Allocate buffers in Unused memory (n=0..FFFF)
  169.               -v{n}      = Offset interrupt Vectors (n=1..6)
  170.               -?         = Show status
  171.  
  172.  
  173.           2. Installation
  174.  
  175.           Versa-Spool  is  a  memory resident program which installs itself
  176.           according to parameters specified by the -b, -n, -s,  -u,  and -v
  177.           options the first time it is executed.   If no value is specified
  178.           for these options,  Versa-Spool will  assume  that  1  buffer,  1
  179.           kilobyte,   and  100  characters  per  second,  are  the  desired
  180.           parameters.
  181.  
  182.           For example,  to install Versa-Spool to provide LPT1:  and  LPT2:
  183.           with  80k  buffers  each,  the  following  command  line would be
  184.           entered :
  185.  
  186.           C:\> spool -n2 -b80 <Enter>
  187.  
  188.           or, for a single 200k buffer for LPT1:, type :
  189.  
  190.           C:\> spool -n1 -b200 <Enter>
  191.  
  192.                                           2
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.           It would not be possible to install a single  buffer  for  LPT2:,
  207.           since  the  buffers  are  allocated sequentially,  beginning with
  208.           LPT1:.  It would, however, be possible to install a single buffer
  209.           for LPT1: whose output was redirected to LPT2:.   This  would  be
  210.           accomplished by the following two commands :
  211.  
  212.           C:\> spool -n1 -b100 <Enter>
  213.           C:\> spool -n1 -r2 <Enter>
  214.  
  215.           The  redirection  feature  will  be  discussed  in greater detail
  216.           later.
  217.  
  218.           Once Versa-Spool has installed itself as  a  terminate  and  stay
  219.           resident program (TSR for short),  it will print its installation
  220.           status on the screen and return to dos.   For those who may  want
  221.           to install Versa-Spool with a batch files that checks the success
  222.           of  its  commands,  an  error  level of 0 will be returned if the
  223.           installation was successful,  or 1 if there was an error.   Also,
  224.           for  the  batch  file  programmers,  the  messages printed on the
  225.           screen by Versa-Spool may be piped to the nul  device  if  it  is
  226.           undesirable  for the end user to see them.   For instance a batch
  227.           file containing the lines :
  228.  
  229.           .
  230.           .
  231.           spool -n1 -b100 > nul
  232.           IF ERRORLEVEL 1 GOTO NOGOOD
  233.           .
  234.           .
  235.  
  236.           would install a 100k buffer for LPT1: and show no  message  after
  237.           installation.    If  Versa-Spool did not install itself properly,
  238.           execution would be vectored to the label "NOGOOD",  presumably to
  239.           echo an error message and exit.
  240.  
  241.           Subsequent executions of Versa-Spool will not install another TSR
  242.           copy  of Versa-Spool,  but will rather provide communication with
  243.           the already  installed  TSR  program.    The  protocol  for  this
  244.           communication is described in the "Programmer's Corner" section.
  245.  
  246.  
  247.           3. Accessing Versa-Spool Once Installed
  248.  
  249.           After  the first time Versa-Spool is run,  and its TSR portion is
  250.           loaded, subsequent executions of the program will either cause it
  251.           to print the current status of the resident copy in  response  to
  252.           the  -?  option,  or  attempt  to  modify  its  operating  status
  253.           according to the -c, -p, or -r parameters.
  254.  
  255.           For example, if LPT2: is to be paused for some reason, the line :
  256.  
  257.  
  258.                                           3
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.           C:\> spool -n2 -p <Enter>
  272.  
  273.           would be entered.   Note that in this instance,  the -n parameter
  274.           specifies  the device to be addressed,  rather than the number of
  275.           buffers  to  be  installed.    This  convention  applies  to  all
  276.           executions  of  Versa-Spool  subsequent  to  the  first,  when it
  277.           installs its TSR portion.   The pause option is a toggle,  so  to
  278.           restart the printer, the same line would be re-entered.
  279.  
  280.           Similarly, to clear the buffer for LPT1:, the line :
  281.  
  282.