RAP USER MANUAL 3/07/88 (C) Copyright 1988, Roy Lipscomb Permission is hereby granted only for non-profit copying and distribution. All other rights are reserved. Logic Associates 1433 W. Thome Chicago, IL 60660 (312) 274-0531 ------------------------------------------------------------------------------ PURPOSE ------- RAP is a utility that intercepts all output to the printer and redirects it to a disk file instead. It is designed to be simple to both install and remove. ------------------------------------------------------------------------------ USES ---- There are time when it is convenient to divert data intended for the printer into a disk file instead. Some programs that create print output allow the option of sending the data to a disk file instead. But some don't, and these are the ones that RAP was designed to help. Uses for such "printfiles" include-- [] Keeping computer tasks on schedule while the printer is incapacitated. [] Saving a report--or even printer-graphics output--for later reprinting. [] Allowing further editing or processing of a report or graphic before printing it. (For instance, you might convert the file's imbedded control codes to those appropriate for another type of printer.) [] Saving paper during test runs that are intended to check report formatting. [] Inserting samples of printout directly into a user-manual file. [] Saving the operator's time (somewhat like a printer buffer). [] Maximizing use of the computer. (Reports can be saved, then printed in one batch, unattended, during times off-hours.) [] Saving a report so it can be mailed on a disk or sent by modem. ------------------------------------------------------------------------------ EXECUTION --------- Install RAP by typing-- RAP or-- RAP where "" is your choice of filename and "" means "carriage return." [] RAP will display a brief summary of its options. (See "MESSAGES" section below.) [] If you don't give a filename, the name defaults to "PRINTER.LOG". [] If the file does not exist in the current user area, RAP will create it. [] If the file does exist, RAP will append all new print data to the file without disturbing the old print data already in the file. Examples: RAP RAP XYZ RAP B:X.LOG RAP USER.MAN If RAP is already active, executing it again simply confirm its presence and will not affect its operation. ------------------------------------------------------------------------------ REMOVAL ------- RAP is removed from operation by warmbooting your system. This means that you either type control-C on the CP/M command line, or exit to the command line from a program. (There are some few programs that do not warmboot when they exit back to CP/M.) When removed, RAP will print a message confirming that the printfile is closed. (See "MESSAGES" section below.) The absence of such a message indicates that RAP is still active, probably because some utility has be executed that makes it impossible for RAP to unpatch itself from CP/M. Be sure that RAP is removed before you print the data saved by RAP. If you don't, you may be feeding your printfile back into itself, not into the printer--and the printfile may outrun your disk's capacity! ------------------------------------------------------------------------------ SUGGESTIONS ----------- [] To insure that reports start at the top of a new page, some programs will output a form feed at the head or tail of a report. But not all programs will do this. Use RAP/FF.COM to send a formfeed to your printer whenever desired. If RAP is active, of course, the formfeed character will be sent to the printfile instead of the printer. Executing RAP/FF.COM will not cause RAP (if present) to be terminated. RAP/FF.COM is provided as part of the RAP package, and is executed by simply typing-- RAP/FF where "" means "carriage return". ------------------------------------------------------------------------------ LIMITATIONS ----------- [] RAP is not intended for use with modem programs. In such application, RAP may fail to save all print data sent from the modem program. Modem programs need to signal the remote computer to stop sending data while the local computer writes data to disk. RAP has no way of telling the remote computer to stop, so any data received while RAP is writing to disk will be lost. [] RAP sends all printdata intact and without change to disk, with one exception: Any control-Z is changed into control-Y. CP/M interprets any control-Z in a text file as the end of that file, and not as part of the text in that file. Thus, all data sent to the file after a control-Z will be lost. For this reason, control-Z cannot be inserted into the printfile. Fortu- nately, control-Z appears only very rarely in the print stream, usually only as a graphics character, or possibly as a column number. For those purposes, control-Y mimics control-Z very closely, but without the unwanted "end of file" side effect. Since control-Y likewise occurs only rarely in a print stream, there is little likelihood of problem arising from substituting control-Y for control-Z. The value of the high bit (0 or 1) of the control-Z is preserved when it is converted into the control-Y. [] RAP should not be used inside an EX15.COM batch job. When the EX job ends, it will unpatch some, but not all, of RAP's patches. As a result, RAP will stay active and continue to write out to the printfile, but it will display no messages and will not terminate until you press reset. If you wish to use RAP during an EX batch job, execute RAP first, then execute the EX job. RAP will then operate and terminate normally. RAP has no such problems operating with $$$.SUB batch jobs, which are created by SUBMIT.COM and other batch processors. [] RAP will operate with the normal control-P option of CP/M. When CP/M detects a control-P typed at the console, it begins echoing all console output to the printer. This operation is turned off when another control-P is detected at the console, or when the system warmboots. The above feature does work reliably from the CP/M command line, but it often gets "forgotten" by CP/M during the operation of some programs. Because this option does not work reliably with all programs, we do not recommend use of this option with RAP as a way of capturing console output. To reliably capture console output, consider using a utility designed specifically for that purpose, such as the public-domain REDIR31.COM. [] RAP has been designed to "peacefully co-exist" with any and all other utilitities that may load themselves below the CCP. These utilities are frequently called "Terminate and Stay Resident" (TSR) utilities. If you find a TSR that does not let RAP load under it, you can probably solve the problem with one of these two strategies: [] Load RAP before, instead of after, loading the other TSR. [] Run SAFRAM (version 6 or later) just before running RAP. SAFRAM is a public-domain TSR "insulator" available on many RCPM's or from your local CP/M user's group. A copy has been provided on your RAP master diskette. ------------------------------------------------------------------------------ MESSAGES -------- At logon, RAP displays the following screen: IIIIIIIIII IIIIIII IIIIIIIIII IIII IIII IIII III IIII IIII IIII III IIII III IIII III IIIIIIIIII IIIIIIIII IIIIIIIII COMMENTS IIII III IIII III IIII -------- IIIIII IIII IIIII IIIII IIIIII Copyright 1988, Logic Associates, 60660 RAP 1.0 Installed at C836-D0FF <--Your "at" may differ. Reroute/append printer data to a file. * Execute as-- RAP <--Both modes assume the or as-- RAP filename <-- current user area. * Creates file if absent. * De-installs itself at warmboot. _______________________________________ ............................................................................... The above message is followed by a one-line message, like one of the following messages. ("A0" means "Drive A, User number 0".) * File PRINTER.LOG opened on A0. * <--RAP begun, using new file. * File PRINTER.LOG reopened on A0. * <--RAP begun, reusing old file. * File PRINTER.LOG already open on A0. * <--RAP already begun; stays on. * File PRINTER.LOG closed on A0. * <--Warmboot, RAP removed. * File PRINTER.LOG active on A0. * <--Warmboot, RAP not removed. ** ABORT: Unable to locate CCP. *** <--RAP cannot find safe haven. ** ABORT: Cannot create printfile. *** <--Directory of disk is full. ** ABORT: Unknown error during install. <--Wish I knew! ............................................................................... Once in operation, RAP will output one or more of the following messages before it terminates: * File PRINTER.LOG closed on A0. * >>ERROR: Printfile absent from disk.<< >> Printing is now disabled. << >>ERROR: Printfile disk is full. << >> Printing is now disabled. << ------------------------------------------------------------------------------ TECHNICAL OPERATION ------------------- RAP temporarily installs itself at the top of transient program memory (TPA). At warmboot, it removes itself unless inhibited from doing so by some other TSR that has overlaid RAP's trap vectors. In that case, RAP will continue in operation until it can remove itself safely or until the reset button is pushed. When RAP is active, all print data is diverted into RAP's memory buffer. The buffer is flushed to disk whenever the buffer is full or when RAP terminates. RAP's normal buffer size is 1K. This size can be changed to any integral multiple of 1K by changing the variable "buffk" in the source file, then re-assembling. With a 1K buffer, RAP uses about 2K of RAM when installed. RAP reports if either of two errors occur during writing of data to disk: 1) The disk with the printfile has been removed from its drive, or 2) The disk with the printfile has run out of space. Any other disk-related errors (such as "bad sector") are left to be handled by CP/M or by the program that is generating the printout. ------------------------------------------------------------------------------ RE-ASSEMBLING ------------- This source uses the LINK pseudo-operation featured in Ward Christensen's LASM.COM (available on RCPM's) and its predecessor LINKASM.COM (available from CPM Users Group as 36.11 and 36.12). This feature is used here to link RAP.ASM to itself, and thus introduce two (partial) copies to the assembler. The two copies are used by the the resultant RAP.COM to produce a relocatable module. If neither of the above assemblers is available, this source can be re-assembled in a more roundabout fashion. First, delete these three statements from the end of RAP.ASM: if not copy1 link RAP endif Next, execute the following commands: PIP RAPX.ASM=RAP.ASM,RAP.ASM ;The next step can use ASM.COM or any standard assembler. ASM RAPX LOAD RAPX ERA RAPX.HEX ERA RAPX.PRN The resulting RAPX.COM in equivalent in every respect to RAP.COM. ------------------------------------------------------------------------------ OTHER SOFTWARE -------------- In addition to our variety of freeware, Logic Associates offers a selection of commercial packages. These packages have been reviewed in DR. DOBBS JOURNAL, SEXTANT Magazine, COMPUTER SHOPPER, and various user-group newsletters. Among our packages are-- COLUMNS Easily converts single-column text into multi- column pages with margins. And vice versa. Allows page formatting, column deletion, column "zippering", more. DISKGUISE 1) Allows trouble-free use of Wordstar(tm) in any drive and user area, even if Wordstar and its overlays are not present there. 2) Allows you to assign implicit user-area numbers to disk drive names, so that user areas become transparent--available for reassignment, and usable by virtually any other software. TUTORI/O Demystifies the BDOS functions, using "show and tell." For assembly-language programmers. SUPERMIT Endows any batch-processing language with BASIC-like extensions: GOTO line number, IF...THEN...ELSE, dynamic variables, etc. Compatible with SUBMIT, EX15, SUPERSUB, etc. MEGABACK Safely backs up your hard disk to floppies. VERSBASE Automatically updates filenames with version numbers instead of with ".BAK". Interactive or automatic modes. Our packages come with a 30-day money-back guarantee. We would be hapy to provide reviews and other information. Just write or call-- Logic Associates 1433 W. Thome Chicago, IL 60660 (312) 274-0531 Thank you, and hope you enjoy "RAP"ping! ------------------------------------------------------------------------------ [end]