braner@batcomputer.tn.cornell.edu (braner) (01/12/87)
[] Consider the following situations: You're trying to do some fancy printout, but your word processor doesn't print what you think you told it to. You would like to be able to see exactly what control characters were sent to the printer... You want to print on a remote printer, send a document e-mail, or input it to another program, but your word processor (or whatever) will only save documents in its own wierd format, not as a formatted ASCII file... You have a printer-driver to print graphics from program X on printer A. But you would like to use printer B. You have the documentation for both printers. You could easily write a "post-processor" program that will replace one set of control chars with another. But first you need a method of capturing the output for printer A in a file... You want to print long files without holding your computer up in the meanwhile... It is all possible with the program "BUCKET" (binary posted separately, source (in AL and C, compilable with Megamax) available upon request). BUCKET intercepts BIOS calls, and when they concern the printer it redirects them to a RAM buffer. It achieves background printing by installing a routine in the VBL queue (i.e. only about 60 cps). When you run BUCKET for the first time in a session (from the desktop or from the auto folder) it installs a RAM buffer plus some resident code. You enter the desired size of the buffer in units of 16K: a number between 1 and 9. Then, and every time you run the (same) program later in the session, you get to choose items from a menu: Activate bucket - save printouts in RAM Deactivate bucket - stop saving Empty bucket - make room for new stuff Write bucket to a disk file - file the RAM buffer Read a file into bucket - for background printing Print bucket in background - after Activity or Reading Stop printing - but can resume later Quit - but leave settings intact The bucket is automatically emptied whenever background printing catches up with the saved stuff. It is NOT emptied upon writing to a file, so if you want to do both you should write the file first. Enjoy! - Moshe Braner <braner@amvax.tn.cornell.edu>