home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / utils / vspool.zip / SPOOL.DOC next >
Text File  |  1989-07-18  |  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 : Request Device Spooled Status......10
  35.               6.13. Turbo Basic Function Call Examples..................10
  36.  
  37.            7. Revision History..........................................11
  38.  
  39.            8. Business Stuff............................................11
  40.  
  41.            9. 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.00
  92.  
  93.                                A multi-printer spooler
  94.                             Copyright 1989 - 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.           C:\> spool -n1 -c <Enter>
  283.  
  284.           will  effect  the  desired  result.   Or,  since -n1 is a default
  285.           value, simply :
  286.  
  287.           C:\> spool -c <Enter>
  288.  
  289.           would suffice.
  290.  
  291.  
  292.           4. The Parameters Enumerated
  293.  
  294.           Now that you have the general idea,  here is some  more  specific
  295.           information about the available parameters.
  296.  
  297.                -a   Automatic   printer  selection  permits  a  program  to
  298.                     automatically redirect its output to the most available
  299.                     printer.  This feature operates in one of two modes, as
  300.                     specified by  a  1  or  2  following  the  "a"  on  the
  301.                     installation command line.  In mode 1, each time Versa-
  302.                     Spool  senses a form-feed character,  it will determine
  303.                     which buffer is least full and redirect all  subsequent
  304.                     output  to  that  printer.   This is useful for mailing
  305.                     label programs and other  situations  in  which  single
  306.                     page reports or forms are generated.   Mode 2 is useful
  307.                     for situations in which multi-page  reports  are  being
  308.                     generated  and  a  printer initialization string may be
  309.                     sent between forms.   It operates similarly to mode  1,
  310.                     except  that an escape character (character 27 decimal)
  311.                     followed by a "@" symbol initiates the redirection.
  312.  
  313.                -b   This parameter is only available when installing Versa-
  314.                     Spool.   Most currently available spoolers are  limited
  315.                     to 64k, but Versa-Spool permits buffer sizes between 1k
  316.                     and  the maximum available memory in your machine (less
  317.                     64k) to be installed.  When allocating buffers with the
  318.                     -u parameter,  the buffer size is restricted  by  other
  319.                     factors  which  will  be  discussed later,  but in most
  320.                     situations the previously stated rule applies.   During
  321.                     installation,  the  default value for this parameter is
  322.                     1k, and after installation, it cannot be used to modify
  323.  
  324.                                           4
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.                     the TSR portion of Versa-Spool.
  338.  
  339.                -c   The  buffer  selected  by  the  -n  parameter  will  be
  340.                     cleared.    Any other buffers which have been allocated
  341.                     will continue  to  function  without  disturbance.    A
  342.                     typical command line would be :
  343.  
  344.                     C:\> spool -n2 -c
  345.  
  346.                     which would clear the contents of the buffer for LPT2:.
  347.                     This   parameter   has   does   not   function   during
  348.                     installation,  but the clearing of a buffer is implicit
  349.                     in the process of its creation.
  350.  
  351.                -n   During installation, the -n option specifies the number
  352.                     of  buffers  that will be allocated.   Each will be the
  353.                     same size,  as specified by the -b option,  and will be
  354.                     assigned sequentially to LPT1:, LPT2: and LPT3:.  Thus,
  355.                     it is not possible to assign a buffer for LPT2: without
  356.                     first  assigning  one  for  LPT1:.    Once the resident
  357.                     portion of Versa-Spool is installed,  the -n  parameter
  358.                     will  serve to specify the buffer to which any commands
  359.                     will apply.   For instance,  in order  to  request  the
  360.                     status  of  the  buffer  for LPT3:,  the following line
  361.                     would be typed :
  362.  
  363.                     C:\> spool -n3 -?
  364.  
  365.                     When the  -n  parameter  is  not  specified,  either  1
  366.                     buffer, or LPT1: will be assumed during installation or
  367.                     subsequent operations, respectively.
  368.  
  369.                -p   Once Versa-Spool is installed, a printer may be paused,
  370.                     if  that  is desirable.   The -p option,  which effects
  371.                     this action, is a "toggle" and invoking it will cause a
  372.                     printing device to pause,  or a paused device to resume
  373.                     printing.
  374.  
  375.                -r   Once  installed,  the  output  from  the spooler may be
  376.                     redirected from  its  normal  device  to  another  LPT:
  377.                     through the use of this parameter.   Thus, if you had a
  378.                     dot-matrix printer attached  to  LPT1:,  and  a  letter
  379.                     quality printer attached to LPT2:, and a word processor
  380.                     that only printed to LPT1:, you could redirect the word
  381.                     processor  output  to  LPT2:  through  the  use of this
  382.                     option.   The command line for that specific  situation
  383.                     would be :
  384.  
  385.                     C:\> spool -n1 -r2 <Enter>
  386.  
  387.                     Also, in database applications where printer speed is a
  388.                     problem  because large reports are generated regularly,
  389.  
  390.                                           5
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.                     Versa-Spool may be used to divide  the  output  between
  404.                     two  or  three  printers  to afford an effective output
  405.                     rate of two or three times that possible with a single,
  406.                     unspooled printer.
  407.  
  408.                     The -r option is  only  available  after  the  resident
  409.                     portion  of Versa-Spool has been installed,  and has no
  410.                     effect during installation.
  411.  
  412.                -s   The output speed parameter determines the efficiency of
  413.                     Versa-Spool for the environment in which  it  is  being
  414.                     used.      Since   Versa-Spool  shares  the  computer's
  415.                     attention with the currently running application, there
  416.                     is a compromise between the rate at which it sends data
  417.                     to the printer(s), and the rate at which it permits the
  418.                     currently running application to perform its functions.
  419.                     Outputting data to the printer at a  rate  faster  than
  420.                     either the computer can process it,  or the printer can
  421.                     accept  it  will  result  in  Versa-Spool  hogging  the
  422.                     computer's  time  to  no  advantage,  and  causing  the
  423.                     application program to seem unresponsive.    Outputting
  424.                     too  slowly,  of  course  will cause large documents to
  425.                     take excessive amounts of time to  print.    Since  the
  426.                     circumstances  under  which Versa-Spool may be expected
  427.                     to vary widely, this parameter has been made accessible
  428.                     to the user.   This parameter is adjustable from 20  to
  429.                     16000  characters per second,  in increments of 20 cps.
  430.                     It will be some time before hardware is available  that
  431.                     will  accommodate  the  higher speeds,  but Versa-Spool
  432.                     will be ready when the time comes.
  433.  
  434.                -u   Although dos was only written to  accommodate  640k  of
  435.                     main memory, many machines are currently being produced
  436.                     which  permit  1000k  (1  megabyte)  to be installed on
  437.                     their motherboards.   The additional  360k  of  memory,
  438.                     beginning at hex segment A000 is partially allocated to
  439.                     video  board  RAM,  extended memory buffers,  and other
  440.                     such functions,  but there is frequently 64k or more of
  441.                     contiguous  space available in this area.   With the -u
  442.                     option,  Versa-Spool may be installed with its  buffers
  443.                     allocated  in this unused area,  allowing large buffers
  444.                     to be implemented while taking  up  less  than  30k  of
  445.                     precious  dos  space.    It is not recommended that the
  446.                     naive  user  try  to  install   Versa-Spool   in   this
  447.                     configuration,   but  someone  with  light  programming
  448.                     experience should be able to find between 64k and  192k
  449.                     of  unused RAM in the range of segments C000 to F000 in
  450.                     one of these 1 megabyte machines.   Once found,  Versa-
  451.                     Spool   may  be  instructed  to  allocate  its  buffers
  452.                     starting at a given segment address by entering the  -u
  453.                     parameter  followed  by the HEX address of the segment.
  454.                     Segment addresses of less that A000  will  be  adjusted
  455.  
  456.                                           6
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.                     upward to A000, and if Versa-Spool does not find RAM at
  470.                     the  specified  segment,   an  error  message  will  be
  471.                     displayed  and  the  resident  portion  will   not   be
  472.                     installed.    A typical implementation of such a buffer
  473.                     would be :
  474.  
  475.                     C:\> spool -n1 -b128 -uD000 <Enter>
  476.  
  477.                     Just to make it a little easier for the stout at  heart
  478.                     who  decide to try this,  there should be 64k available
  479.                     starting at E000 in nearly all of  these  machines  and
  480.                     128k  starting at D000 in most without extended memory.
  481.                     It is worth checking below that  area,  but  many  hard
  482.                     disk controllers have a ROM starting at C800 which will
  483.                     interfere with the buffer.
  484.  
  485.                -v   Many  TSR  programs  use  one or more of the interrupts
  486.                     between 60h and 67h for their resident functions.    So
  487.                     that  the two interrupts required by Versa-Spool do not
  488.                     contend with any of the programs that you normally keep
  489.                     resident,  you may install it with its  vectors  offset
  490.                     from  the  default  60h and 61h through the use of this
  491.                     parameter.  The example command line :
  492.  
  493.                     C:\> spool -n1 -v3 <Enter>
  494.  
  495.                     would install Versa-Spool with its  interrupts  at  63h
  496.                     and  64h.     This  option  is  only  available  during
  497.                     installation, and will default to 0 if not specified.
  498.                -?   If it is desirable to know the status  of  one  of  the
  499.                     spooled  printers,  this parameter will instruct Versa-
  500.                     Spool to display a detailed report on the screen.  This
  501.                     information includes any redirection  for  the  device,
  502.                     the  output  speed,  buffer  size,  port status,  pause
  503.                     status,  and remaining free space.   This function  may
  504.                     also  be  useful  to  programmers,  as  it  returns the
  505.                     remaining free space (in k) to dos as  an  error  level
  506.                     when  it executes.   Thus it may be used in batch files
  507.                     to test for insufficient buffer space before running  a
  508.                     program which generates large reports.  An example from
  509.                     a batch file which does this follows :
  510.  
  511.                     .
  512.                     .
  513.                     :START
  514.                          REM Get the free space in buffer 1 (send the
  515.                          REM display to nowhere)
  516.                          spool -n1 -? > nul
  517.                          REM If there is 10k or more of free space, print
  518.                          REM the next file
  519.                          IF errorlevel 10 GOTO PRINTDOC
  520.                               REM Do some word processing until the spooler
  521.  
  522.                                           7
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.                               REM is ready
  536.                               wordproc %2
  537.                          :PRINTDOC
  538.                          REM Print the report specified by %1
  539.                          printrep %1
  540.  
  541.                     :NEXT
  542.                     .
  543.                     .
  544.  
  545.                     Of  course,  this  option  is  only  available once the
  546.                     resident portion of Versa-Spool is installed and has no
  547.                     effect during installation.
  548.  
  549.  
  550.           5. Examples
  551.  
  552.           Here are a few more example command  lines  to  help  convey  the
  553.           points expressed earlier.
  554.  
  555.  
  556.           5.1. To Install
  557.  
  558.                Command                                 Configuration
  559.  
  560.           C:\> spool                         Show  syntax  for  Versa-Spool
  561.                                              but do not install.
  562.  
  563.           C:\> spool -N2 -B60                Install Versa-Spool  with  60k
  564.                                              100cps  buffers  for LPT1: and
  565.                                              LPT2:.
  566.  
  567.           C:\> spool -n1 -b350               Install a 350k, 100cps spooler
  568.                                              for LPT1:.
  569.  
  570.           C:\> spool -n1 -b128 -uC800        Install a 128k, 100cps spooler
  571.                                              for  LPT1:  with  its   buffer
  572.                                              starting at hex segment C800.
  573.  
  574.           C:\> spool -s256 -n1 -s200         Install a 256k, 200cps spooler
  575.                                              for LPT1:.
  576.  
  577.           C:\> spool -s64 -n3 -s200 -a1      Install   three  64k,   200cps
  578.                                              spoolers for auto-selection by
  579.                                              the application at the end  of
  580.                                              each page.
  581.  
  582.           C:\> spool -s64 -n3 -s200 -a2      Install   three  64k,   200cps
  583.                                              spoolers for auto-selection by
  584.                                              the application upon receiving
  585.                                              CHR$(27)+"@".
  586.  
  587.  
  588.                                           8
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.           5.2. After Installation
  603.  
  604.                Command                                 Effect
  605.  
  606.           C:\> spool -N1 -?                  Show  the  current  status  of
  607.                                              LPT1:
  608.  
  609.           C:\> spool -n1 -c                  Clear the buffer for LPT1:.
  610.  
  611.           C:\> spool -P -N2                  If LPT2: is printing,  it will
  612.                                              pause,   otherwise,   it  will
  613.                                              resume printing.
  614.  
  615.           C:\> spool -n1 -r2                 Redirect the output of logical
  616.                                              LPT1: to physical LPT2:.
  617.  
  618.           Note that the parameters are neither case-sensitive, nor required
  619.           to be in any specific order.  Thus, the lines :
  620.  
  621.           C:\> spool -n1 - C
  622.  
  623.           and
  624.  
  625.           C:\> spool -c -N1
  626.  
  627.           are equivalent.   Also,  throughout the documentation, the prompt
  628.           indicates that the current directory is C:\,  although this is by
  629.           no means required for the proper operation of the program.
  630.  
  631.  
  632.           6. Programmer's Corner
  633.  
  634.           When Versa-Spool is installed, it changes the original interrupts
  635.           17h   and  1Ch  to  60h  and  61h  (plus  an  offset,   if  any),
  636.           respectively, and installs its own interrupt handlers for 17h and
  637.           1Ch.   The new interrupt 1Ch  performs  Versa-Spool's  background
  638.           functions  and then passes control to the original interrupt 1Ch.
  639.           The new interrupt 17h performs a reset (function  2)  immediately
  640.           by  passing  control  to  the original interrupt 17h.   All other
  641.           functions are buffered by Versa-Spool.   The  new  interrupt  17h
  642.           also  has  an  additional  function  not provided by the original
  643.           interrupt,  which may be called from  a  high  level  program  to
  644.           request  the  spooler  status  or  control  the  operation of the
  645.           spooler.   The additional  function  and  its  sub-functions  are
  646.           implemented as follows :
  647.  
  648.           In all cases :
  649.                Interrupt = 17h
  650.                AH = 3                   ( Function # )
  651.                AL = Sub-Function #      ( Sub-Function # )
  652.                DX = Device # (0..2)     ( LPT1:..LPT3: )
  653.  
  654.                                           9
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.           6.1. Sub-Function 0 : Return Signature
  669.                Return  Value  :  AX  =  1234  if  Versa-Spool is installed,
  670.                     undefined if not installed.
  671.  
  672.           6.2. Sub-Function 1 : Toggle Pause
  673.                Return Value : AX = 1 if paused, 0 if resumed.
  674.  
  675.           6.3. Sub-Function 2 : Clear Buffer
  676.                Return Value : AX = 0 if cleared, 302h if not.
  677.  
  678.           6.4. Sub-Function 3 : Request Pause Condition
  679.                Return Value : AX = 1 if paused, 0 if resumed.
  680.  
  681.           6.5. Sub-Function 4 : Request Free Buffer Space
  682.                Return Value : AX = Remaining Buffer Space (in Kbytes).
  683.  
  684.           6.6. Sub-Function 5 : Request Total Buffer Size
  685.                Return Value : AX = Total Buffer Size (in Kbytes).
  686.  
  687.           6.7. Sub-Function 6 : Redirect Output To LPT1:
  688.                Return Value : none.
  689.  
  690.           6.8. Sub-Function 7 : Redirect Output To LPT2:
  691.                Return Value : none.
  692.  
  693.           6.9. Sub-Function 8 : Redirect Output To LPT3:
  694.                Return Value : none.
  695.  
  696.           6.10. Sub-Function 9 : Request Output Device
  697.                Return Value :  AX = Output Device To Which Selected  Device
  698.                     is printing (0..2).
  699.  
  700.           6.11. Sub-Function A : Request Output Speed
  701.                Return Value :  AX = Output Speed in Characters per second.
  702.  
  703.           6.12. Sub-Function B : Request Device Spooled Status
  704.                Return Value : AX = 1 if device is spooled, 0 otherwise.
  705.  
  706.  
  707.           6.13. Turbo Basic Function Call Examples
  708.  
  709.           The  following  Turbo Basic1 code will illustrate the use of some
  710.           of the previous functions.   The same principles exemplified here
  711.           will apply to all languages that permit interrupt calls.
  712.  
  713.                .
  714.                .
  715.                REG 1, &H304             ' AH = 3 AL = 4 (Function 3, Sub-
  716.           --------------------
  717.           1. Turbo Basic is a registered trademark of Borland International
  718.  
  719.  
  720.                                          10
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.                                         ' Function 4)
  734.                REG 4, &H0               ' DX = 0 (LPT:1)
  735.                CALL INTERRUPT &H17      ' Call the interrupt
  736.                PRINT "The buffer for LPT1: has ";REG(1);"k free"
  737.  
  738.                REG 1, &H304             ' AX = 304h
  739.                REG 4, &H1               ' DX = 1 (LPT:2)
  740.                CALL INTERRUPT &H17      ' Call the interrupt
  741.                PRINT "The buffer for LPT2: has ";REG(1);"k free"
  742.  
  743.                REG 1, &H307             ' AX = 307h
  744.                REG 4, &H0               ' DX = 0
  745.                CALL INTERRUPT &H17      ' Call the interrupt
  746.                PRINT "The data sent to LPT1: will now be output to LPT2:"
  747.                .
  748.                .
  749.  
  750.  
  751.           7. Revision History
  752.  
  753.           Version 1.00   1/1/89    Initial release - limited distribution.
  754.           Version 1.01   3/1/89    Documentation revised,  default value of
  755.                     n=1 implemented.
  756.           Version 1.02   3/23/89   Incorrect  return  value   of   Int   15
  757.                     function  0xfe  caused spooler to hang at end of buffer
  758.                     in some machines.
  759.           Version 2.00   7/18/89   Auto-select function implemented.
  760.  
  761.  
  762.           8. Business Stuff
  763.  
  764.           This program is distributed under the ShareWare concept.    Under
  765.           this  philosophy  you  may  run  the  program  for the purpose of
  766.           evaluation for a reasonable period of time without incurring  any
  767.           liability either to purchase a license or be held responsible for
  768.           any  copyright  violations.   If you decide that the program does
  769.           suit your purposes,  however,  you  are  obliged  to  purchase  a
  770.           license to use it and pay a registration fee.   When you register
  771.           your program,  you will receive your own  serialized  copy  which
  772.           will  probably earn you money,  since a commission of 25% is paid
  773.           to the licensee whose serial number appears on each  registration
  774.           form received.  Thus, if you upload your copy to a bulletin board
  775.           and  five people download it and register as licensees,  you will
  776.           not only have acted in good faith, but made money for having done
  777.           so.  These commissions are paid at the end of each month.
  778.  
  779.           Now that your interests are protected,  the license to use Versa-
  780.           Spool  is  issued  subject  to  the  conditions  specified on the
  781.           registration form, which protect mine.
  782.  
  783.           Thank you for your interest in Versa-Spool and I hope  you  enjoy
  784.           using it as much as I enjoyed writing it for you.
  785.  
  786.                                          11
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.           9. User Registration Form
  800.  
  801.                                 Licensing Conditions
  802.           No  warranty is either expressed or implied with regard to Versa-
  803.           Spool.   The user has more than ample opportunity to evaluate the
  804.           performance of the program under normal operating conditions, and
  805.           the  author  cannot  be  expected  to bear the consequences of an
  806.           improper evaluation.  Further,  the author will be held blameless
  807.           for  any and all damages arising from the use of Versa-Spool,  be
  808.           they direct or consequential.
  809.  
  810.           Name :______________________________________________________
  811.  
  812.           Title :_____________________________________________________
  813.  
  814.           Company :___________________________________________________
  815.  
  816.           Address :___________________________________________________
  817.  
  818.           City,State,Zip :____________________________________________
  819.  
  820.           Business Telephone :________________________________________
  821.  
  822.           Serial number of evaluation Versa-Spool :___________________
  823.  
  824.           Where did you obtain the evaluation copy ?
  825.  
  826.           (BBS, Consultant, Magazine, other) : _______________________
  827.  
  828.  
  829.           I have read and agree to the terms of the license agreement :
  830.  
  831.           ________________________________________________ ___/___/___
  832.                        (Signature)                            (Date)
  833.  
  834.  
  835.           Comments or suggestions :___________________________________
  836.  
  837.           ____________________________________________________________
  838.  
  839.           ____________________________________________________________
  840.  
  841.           Please complete the above form and send it  with  your  check  or
  842.           money order for $20 (plus appropriate sales tax in MA) to :
  843.  
  844.                                      Jeff Newbro
  845.                                 267 Lexington Street
  846.                                 East Boston, MA 02128
  847.  
  848.           Assigned Serial # :_________________________ (For office Use)
  849.  
  850.  
  851.  
  852.                                          12
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.