home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / dos / mspool.lzh / MSPOOL.DOC < prev   
Encoding:
Text File  |  1985-11-11  |  5.0 KB  |  98 lines

  1.  
  2.                           Multi Spooler
  3.  
  4.      So what does the world need another print spooler for?
  5.      I've been dissatisfied with all the spoolers I've seen, for 
  6. various reasons.  Some can't even drive an Epson at full speed, 
  7. some interfere with interrupt handling (as when downloading over 
  8. a COM port and printing at the same time), some spend more time 
  9. in wait loops than they do printing, some have a set, unchangable 
  10. buffer size, some are so inefficient that it's a wonder the 
  11. computer gets anything else done, and most are insensitive to 
  12. competing demands for CPU time, making the term 'background job' 
  13. inapplicable.  
  14.      I wrote this spooler with speed, flexibility and background 
  15. execution in mind.  Unlike most other spoolers I've seen, it is 
  16. not driven by the timer interrupt.  It's driven by an excellent 
  17. indicator of free CPU time, the keyboard I/O interrupt.  Any time 
  18. a program requests keyboard input, it can be assumed it has a 
  19. little free time on it's hands, especially since the keyboard is 
  20. the slowest I/O device on the computer; and since keyboard I/O 
  21. gets high priority in any interactive program, it's assured that 
  22. the spooler will be called often enough to drive a printer at a 
  23. good clip, usually at top speed.
  24.      As far as flexibilty, the size of the spooler buffer is 
  25. specified in 8K increments at startup, as well as which printer 
  26. (LPT1-LPT3) to spool for.  In fact, 3 printers can be spooled 
  27. simultaneously by running the spooler 3 times, specifying each 
  28. printer in turn.
  29.      Once the spooler is installed, it's buffer can be purged in 
  30. the middle of a print by running the spooler again, specifying 
  31. the appropriate printer (if it's not LPT1).  If the program finds 
  32. there is already a spooler for that printer installed, it will 
  33. ask if you want to purge the buffer.  
  34.      The spooler has 3 modes of operation.  In one mode, if the 
  35. buffer gets filled, it will begin printing a character for each 
  36. character it puts in the buffer, until things get caught up.  The 
  37. second mode arises when a keyboard I/O call is made which 
  38. requests that the keyboard routine return the next character in 
  39. the keyboard buffer, or if there is none, wait until one is 
  40. entered and then return it.  This is the optimum mode for the 
  41. spooler.  If there is no character in the keyboard buffer, it 
  42. will begin looping and printing until one is entered, and then 
  43. release control (BASIC often makes I/O calls of this type).  The 
  44. third mode is used when a keyboard I/O call is made which only 
  45. requests the status of the buffer. (i.e. return a character if 
  46. one is there, but don't wait for it.)  In this event, the spooler 
  47. will print one character and exit. (WordStar makes use of this 
  48. type of I/O call).  Depending on the activity of the program 
  49. making the call, type three will drive a printer at a rate 
  50. anywhere from tolerable to top speed.  Using WordStar, my 
  51. Okidata 82A is run at full tilt.  The other two modes will drive 
  52. a printer at full speed.
  53.      Use the HEX2BIN program to convert MSPOOL.HEX to MSPOOL.COM.
  54.  
  55. SYNTAX:
  56.  
  57.      To install:
  58.      A>mspool a b
  59.  
  60.      To purge buffer:
  61.      A>mspool a
  62.  
  63. Where: a (= 1, 2 or 3) specifies the printer, and
  64.        b (= 1 - 7) is the size of the buffer in 8K blocks.
  65.  
  66. Limitations:
  67.  
  68.      This program will not spool for a serial printer, even if 
  69.           the MODE LPT#:=COMn command is in effect.
  70.      Programs such as QSWAP, which switch the entries in the 
  71.           printer table in the ROM bios data area, will not 
  72.           affect this spooler once it is installed.  (In the 
  73.           interest of speed, the appropriate entry in this table 
  74.           is put into the spooler code itself at initialization)
  75.      Programs which bypass INT 16 for keyboard I/O will stop the 
  76.           spooler. (This is conceivable, although I've never seen 
  77.           such a program.  The program would have to have very 
  78.           specific I/O requirements, such as, perhaps, APL.)
  79.      In order for the buffer purge routine to work, the spooler 
  80.           should be the last resident routine loaded which 
  81.           intercepts INT 17 (printer I/O).  This is because the 
  82.           spooler looks at where the INT 17 vector is pointing to 
  83.           determine whether it has already been installed.  If 
  84.           more than one printer is being spooled, the spooler 
  85.           will pick it's way though all the installed spoolers in 
  86.           an attempt to find one configured for the printer 
  87.           specified in the command.  When/if it finds one, it 
  88.           asks whether you want to purge it.  If it lands in
  89.           unfamiliar territory, it assumes there is not yet a 
  90.           spooler installed for that printer, and proceeds 
  91.           accordingly.  
  92.      When more than one printer is being spooled, in some 
  93.           circumstances (i.e. in mode 2 above), the last spooler 
  94.           loaded will have priority, then the second to last.
  95.  
  96. Rich Winkel
  97. Columbia, Mo.
  98.