* PRINT THIS FILE WITH PRN.COM AND CHAR.DEF FOR MAXIMUM CLARITY * PRN PRN is a graphics processor for WordStar, NewWord, or for any word processor which can embed control characters in text files. * PRN allows the user to draw any graphic symbol, or combine such graphics into pictures, and will automatically print these graphics in context when it prints a text. * PRN sends printer control sequences to the Epson printer, allowing full use of its special features. * PRN matches printer control sequences, to detect mistakes in printer control. * PRN prints WordStar document and ASCII (non-document) files, formatting and paging them, as desired. TABLE OF CONTENTS Page 2 Description of PRN Facilities 3 PRN Files and Usage 4 The Main Menu and Options 5 Printer Control 6-8 Editing Graphic Characters 9 Surveying Existing Graphics 10 The Print Command Summary 11 Printing and Checking a File 12-13 Composition of Files for PRNting 14-15 Dot Commands 16 Continuous Graphics 17-18 Hardware Requirements, Configuring PRN 19 CHRTX.COM ----------------------------------------------------------------- (c) Mike Yarus, 1986. PRN is released into the public domain, and may be used freely for any non-commercial purpose. No part of PRN may be sold, or used to enhance the value of other products without the explicit permission of the author. ----------------------------- NOTICE ----------------------------- The Program PRN sets overall printer strategies (Main menu option #1), such as emphasized print, left margin, or lines to skip for a bottom margin. Used in this way, it allows an Epson printer to be preset for printing any document, under the control of any program. Such "printer-formatted" text can also be printed with Main Menu Option #6 of PRN itself. However, PRN also completely controls the printing of documents without depending on the printer (Main menu option #5), and it will divide any ASCII file (a file containing only printable characters), made by any other program, into pages. PRN also responds to the special formatting commands put in a file by WordStar, and is not confused by the unusual characters imbedded in such a file. PRN is more versatile than WordStar however, in that it makes available (for example) imbedded sections of! text in italics!, in a different type #font# $or using altered line spacing$. More than that, PRN uses the graphic capabilities of the Epson printers to create any desired set of new symbols. The user draws characters (Main menu option #2) from the keyboard. PRN records the user's drawing of the new character, and prints it in context during the production of the final document. That is, PRN allows the user to draw a sigma ((), a taw (s), or any other desired graphic (R). PRN stores these graphics, and can be called from the no-file menu of WordStar to print text containing these symbols. PRN will define, edit, and employ several alternative alphabets, if desired. The number of graphics available for printing can be virtually unlimited. PRN does not disturb the text formatting capabilities of WordStar because most of its signals masquerade as new "print commands" analogous to the existing WordStar commands. Furthermore, PRN is fast, and will drive an Epson through most text at full speed. For printing of precise scientific or technical hieroglyphics, or for expressive purposes in any text, PRN provides full, convenient use of the custom-printing capabilities of the dot- matrix printer. Ever wanted to say: # i=10# ( iqi(u) du # i=0# ? Well, read on anyway... hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh The Files PRN itself is in the file PRN.COM. PRN will automatically look for a set of character definitions in CHAR.DEF. This manual is PRN.DOC, which should be printed by PRN itself for full intelligibility. CHRTX.COM is a character transfer utility, used for moving existing graphics between character files. PRN will look for its character list, CHAR.DEF, on the logged disk. If it isn't there, PRN will make a new, empty CHAR.DEF on the logged disk (eg, B:). This is a useful property, because it suggests that you keep a safe copy, or an alternate set, of your characters in CHAR.DEF on your text files disk. PRN's creation of new CHAR.DEF files is also used to keep multiple character lists (see below). To get started, type: A>PRN from CP/M or use "R", then PRN from WordStar's main menu. PRN always communicates !via! the message line at the bottom of the screen: CHAR.DEF **>> The file name at the left of the message line is the character file in use. If no alternate file has been selected, it will say CHAR.DEF. The Main Menu ----------------------------------------------------------------- P*R*N Main Menu v3.6 >1> Set overall Epson printer options >2> Define/edit special print character >3> List special characters/change char file >4> List print commands and print formats >5> P*R*Nt a file, format pages >6> P*R*Nt a file, no page formatting >7> Check a file for paired print commands >8> Get the directory for a disk >9> Leave PRN CHAR.DEF **>> OPTION ? Nr ----------------------------------------------------------------- 1. Overall Options: selection of #1 will present a largely self- explanatory menu for the resetting of the Epson printer. The options stay in effect until the printer is turned off, until they are individually reversed by PRN, or until CLEARed by the global reset option (Z) of PRN itself. Not all options are available on all printers; for example, only recent models can accept the LQ command from PRN. An MX-80, which does not have the LQ command, will ignore it. In addition, it is sometimes important to know that the Epson cannot simultaneously execute all commands, even when it understands them all. Underlined superscript italics are possible, if unlikely. But emphasized (bold) printing excludes certain other options. If you need to do something truly baroque, experiment. ----------------------------------------------------------------- **>> Epson ON, select(A) or cancel(\A) options <<** C: Compressed print on \C: Compressed off D: Double strike on \D: Double strike off E: Emphasized print on \E: Emphasized off F: Proportional bold on \F: Proportional off I: Italics on \I: Italics off L: Line spacing 8/inch \L: Line spacing 6/inch M: Set left margin \M: Set right margin O: Unidirectional print on \O: Unidirectional off P: Skip lines at page bottom \P: Cancel skip R: LQ mode on \R: Draft mode on S: Superscript mode on \S: Superscript mode off T: Elite font on \T: Pica font on U: Underline on \U: Underline off V: Most signif bit = 0 \V: Msb = text value W: Double width print on \W: Double width off X: Down one line \X: Up one line Y: Go to Top Of Form \Y: Set user line spacing Z: CLEAR all, reset TOF \Z: Send user set-up string Q: QUIT, return to main menu ----------------- Option #1, Printer Settings ------------------- Note that the Z option also resets TOF (top-of-form), which means that the Epson will mark that position and start pages there subsequently. Unless you wish to move TOF, use Z at the top of a page. TOF is also set on startup, so the TOF may also be moved by turning the Epson off, rolling the paper to place the printhead at TOF, then turning the Epson on again. This discussion of setting of TOF by manipulating the Epson illustrates the philosophy of PRN toward the vertical format of a page. This subject is benignly neglected. The vertical placement of text is easily and accurately done manually, by moving the paper. Thus the .mt and the .mb (top and bottom margin) dot commands and all their relatives will not be recognized by PRN. When PRN encounters an unknown dot command, it will send a warning to the screen only, and continue printing. Unless the line spacing is changed within a file by a ^Y$, ^Y%, or ^= command (see "special print commands" below), PRN puts 55 lines of text on a page (as does WordStar), with spaces and blank lines as specified by the writer of the file being printed. For a list of print commands which are recognized, use option #4 from the Main Menu. For simplicity, the printing facilities of PRN (Option #5 and #6) do not react to the printer settings made under Option #1. Many unexpected interactions are possible when print options are set both outside and inside files. A policy which seems to minimize confusion is: Option #1 is used to set the printer for use when printing ordinary text using option #6 (or CP/M's TYPE command), which supply no page formatting of their own. When print commands have been put in the file, use option #5. However, the user is completely free to pick what is set !via! overall commands sent outside the file from Main Menu Option #1, and what is set within the file by print commands. Finally, note \Y and \Z at the bottom of the menu for option #1. The user may patch in a custom line spacing at location 0128 in PRN. This allows the printer to be set for half-line or double spacing if desired. The number at 0128 is in hex, and is the number of 1/72" between lines. In the distributed version of PRN, the number at address 0128 is 18 hex (24 decimal), which gives standard double spacing. Thus \Y will cause the printer to shift down two lines (1/3") at every carriage return. You may change this as you like. But note that if your file was composed in double spacing, this printer setting in addition will give quadruple spacing! \Z sends a string of characters to the printer. This string may also be patched by users familiar with their printer's character codes. The string can be up to 16 characters long and begins at 0130 within PRN. The first byte is the number of bytes in the following string, then comes the printer command(s). Patching allows you to send a printer command I didn't include in option #1, or to send a series of printer commands to set up the printer in an often-used way. The distributed PRN has the string: 0130---------- address --------0138 08 ESC 'E' ESC 'N' 06 ESC 'l' 05, or, completely in hex: 08 1B 45 1B 4E 06 1B 6C 05, which says: "8 bytes follow - give me emphasized (bold) print, a margin of 6 lines at the bottom of the page, and a left margin of 6 spaces". I use this string to set up my printer for neat, clear printing of continuous unformatted text files such as program documentation, using PRN option #6. aaaaaaaaaaaa 2. Define/Edit special characters: selection of #2 gives you access to the part of PRN which edits and records your individual graphics. The diagram which comes up first illustrates the commands used in drawing, and is worth a close look. Once you have selected a character to work on (by giving the number of the "frame" which will contain it), you edit a character using a triangle of keys at the left of the standard keyboard. These move the cursor within the frame, and allow you to fire a printer pin, or erase a pin, at the cursor position within a character frame. The "frame" corresponds to the 12 horizontal positions (shown by dots ..........:: at the top) occupied by the printhead as it moves across one character space. The 11th and 12th columns of the character frame are marked :: because they are usually left blank to provide the space between characters. However, if you wish continuous graphics (for example, cursive script), the 11th and 12th columns may be used in the same way as the rest of the frame. ------------------------------------------------------------------------- Composing new characters: set the pins which will fire as the 8 vertical pins of the printhead move to 12 positions across the space containing your character. Note the keyboard pattern of the movement, fire, & erase keys. These allow you to move within the frame defining your character. MOVE UP ^ E MOVE LEFT <-S D-> MOVE RIGHT Z X C / v \ FIRE PIN MOVE ERASE PIN DOWN P = Print char / = delete entire char O = cOpy to frame N = Next char Q = Quit drawing L = save chars to fiLe CHAR.DEF **>> Commands work within a frame -->> Hit any key to proceed ----------------------- Option #2, First Diagram ------------------------ The frame's vertical boundary corresponds to 8 pins of the printhead (shown by 8 dashes - at the sides). Thus you draw a new character by filling in the (12 x 8=) 96 possible positions where a pin may fire during the printing of a character. This process quickly becomes second nature. But because it is not precisely like manual printing, you might like to examine examples already drawn in the distribution version of CHAR.DEF, to see how printed effects are obtained. Because composition takes place at high magnification, it is sometimes helpful to get up from the computer, walk across the room, and look back at a nascent graphic on the screen, which will now be a more realistic size. ----------------------------------------------------------------------------- ..........:: ..........:: ..........:: ..........:: ..........:: ..........:: - - -OOO O O O - OO - - - - - OOO - OO O - O - - - - - O O - OO - O - OO O OO -O OOOOOO - - OO OO - O OO - OO - OO - O O O - O O - - O O - O O - OO - OO - O O O - O OO O - - O O O - O O - OO O - O - O O O - O OO O - - OO OO - O OOO -OOO O O O - O - O -OO O - - - O - - OO - OOO - - ..........:: ..........:: ..........:: ..........:: ..........:: ..........:: Nr 1 = a Nr 2 = b Nr 3 = ( Nr 4 = i Nr 5 = F Nr 6 = s L = save E P = print S D N = next Z X C / = delete fire erase Q = finished O = copy CHAR.DEF **>> -------------------- Option #2, Character Editing Screen -------------------- Besides the keys for composition, other commands are provided for use during graphic composition. These are displayed at the bottom of the preliminary diagram and at the right of the mini- menu which is always in mid-screen during the editing process: $# hh Graphic Editing Commands hh L: L saves the current set of characters to the disk file, either CHAR.DEF, or your alternate file. If you do not record them yourself, PRN will automatically record them on exit (editing option Q) if any character has been edited. P: P sends the character you are now editing to the printer so that you can see it on paper. If the program freezes when you ask it to print, check to make sure the printer is ON and ON LINE. If the character is a new, unnamed one, you must name it before it will print. Almost any single key from the keyboard can be a name: 5,F,|,a and so on. The character's name will be used in a printed document to order its use. That is --> ^Yi^Y onscreen would indicate a PRN command to print the graphic character whose name is "i" (ctrl-PYictrl- PY was typed while editing a document to indicate a print command to WordStar). Eight exceptions to the free use of any printable key as a character name are blank, !, @, #, $, %, &, and =. Note that the unusable characters are grouped on the keyboard. These character names will be rejected by PRN because !, @, #, $, etc. are used by the program as names for printer functions. The blank or space (the symbol put in a file by the space bar) is the name PRN uses for an empty frame. This leaves about 90 characters usable as names. There is more discussion of these symbols in the section on writing a file to be PRNted, below. N: N allows you to select the Next character to see or edit. When the number of that character is given, the screen display is revised to show that character, and the cursor is moved to its frame. /: / is the symbol for deletion of a character. The deletion key is well-spaced from other editing keys to avoid accidents, and you are asked to reflect on the destruction of an existing character before it is finally snuffed. You can recover a character even after this point. Recall that the characters are actually stored in the disk file CHAR.DEF. Until this is rewritten by the character save command L (qv) or by exit from the character editing section of PRN (option Q) the character still exists. If you RESET the computer (cold boot) without leaving PRN, the character will still be in the disk file. However, this strategy also discards changes in other characters which may have been made in the same session (if not saved with an "L"). Q: Q returns you to the Main Menu when you are satisfied with your editing. Any new symbol may be used immediately in a printed document. O: O is a character construction aid. It will copy another character !in toto! to the frame in which you are now working. Thus you can reconstruct an already defined symbol, taking advantage of work already done without destroying the original. There is one subtlety to the use of the O command. A copied character must be renamed, to distinguish it from the original. But copying a character to its own frame is also allowed. Just give the current frame number when asked which frame to copy to. This allows you to change the name of an existing character without creating a second version of it. Similarly, you can exit from a frame with "N" without giving a new character a name. When you want to use that character, use "O" to copy into itself in order to name it. As the notes just below indicate, unnamed characters are sometimes useful. Like many other things in computing, these options are easier done than said.$# FF Some notes on the special characters: a. When printing a document PRN searches the list of special characters in numerical order, looking for user-defined characters. Thus the first graphic character with a given name will always be selected for printing. This can be used to maintain two characters under the same name. When you want to use the one which is later in the list, change the name (see the O edit option, above) of the first one. b. A character frame named blank (space) terminates the list of characters, as far as PRN knows. Characters in use should occupy consecutive frames. To put this property another way, a "caboose" of characters which are usually invisible to PRN during output of a document can be maintained in CHAR.DEF behind a frame named blank. When you want to used the stored graphics, rename the intervening frame with an O (copy) operation, and the stored characters will become accessible. The characters are, of course, always visible onscreen to the user under the Main Menu #2 and #3 options. hhhhhhhhhhhhh 3. List/look at chars: option #3 gets you a look at a set of characters without having to edit. You might wish to check to make sure your characters are still on file, for example. This may be essential if PRN is under heavy use by CP/M adepts. Note that PRN's first action on being called is to read its characters from any file named CHAR.DEF (which holds 54 character definitions in coded, binary form). Because of the abstract method used by PRN to store characters, these files will not be readable or alterable by any other means. It is possible to keep an arbitrary number of characters ready by renaming the current CHAR.DEF (eg, to CHAR.0 using CP/M's REN or file utilities NSWP or ZX). Now there is no CHAR.DEF for PRN to find. PRN will react to the absent CHAR.DEF on the logged disk by creating a new, empty CHAR.DEF file. New characters may then be put in this file using the character-editing function of PRN (Main Menu Option #2). There is also a character-transfer utility, CHRTX, for easy transfer of existing characters to a new CHAR.DEF file. Ask an adept, who will know where CHRTX is. By renaming character files, you may keep as many sets of characters as you need. The file which is named CHAR.DEF when PRN is called will be used by the program. If you put a lot of effort into a custom set of graphics, maintain a backup copy of your CHAR.DEF, CHAR.0, CHAR.1... A highly illuminated text file should probably be stored with its appropriate CHAR file. This is automatic if you log onto a files disk in B: when using PRN from A:, because PRN will either find CHAR.DEF on the logged disk, or create a new, empty one before beginning to work. Option #3 also lets you call up any other character file by name, and use it instead of CHAR.DEF, if you wish. I suggest that all such files be called CHAR. + a descriptive file extension. Option #3 asks if you want a printed guide to all defined characters in the current CHAR file, whether CHAR.DEF or another which you have selected. If you answer yes (Epson ON), a list of all currently defined codes and their graphics will be printed for reference during the composition of your file. The list can be essential: if someone has edited another graphic and given it the same name as one of yours, this can make your graphic inacessible to PRN. For this reason, any duplicate codes are marked in the printed list. Caveat scriptor. After one chance to change the CHAR file, one screenful of characters and one character reference list, you are returned to the Main Menu. bbbbbbbbbbbbb 4. Commands: This Main Menu option gives a screenful of information about the print commands which are implemented, and the current values for the left margin, etc. PRN resets these values to the defaults every time a new document is printed (every time option #5 or #6 is selected). ----------------------------------------------------------------- **>> DOT COMMANDS: .PA, go to next page .OP, omit page numbers, page numbers now= TRUE .PL x, lines of text/page, now x= 55 .PN x, makes x the number of this page .PO x, left margin (page offset) x spaces, now x= 8 .FI n.typ, insert text file n.typ at this point .CF char.alt, use character file char.alt from this point **>> PRINT COMMANDS: ^B..^B > boldface : ^D..^D > double strike ^H > overprint : ^R..^E > italics | note | ^V..^V > subscript : ^Q..^E > subscript | same | ^T..^T > superscript : ^W..^E > superscript | term | ^S..^S > underline : ^Y..^Y > PRN environment ^Y..^Y redefines !,@,#,$,%,=,& and graphic names ! .. ! > italics : @ .. @ > Elite font # .. # > compressed : $ .. $ > line spacing 8 lines/inch % .. % > 9 lines/in : = .. = > user line spacing & .. & > LQ mode : CHAR.DEF **>> PRN writes on this line: press any key to continue ------------------- Option #4, Command Summary ------------------- jjjjjjjjjjjj 5. Print a file: Call this option, give the name of the file you want PRNted, and PRN will interpret the file, and send it to the printer and the screen so that you can follow the process. You are offered the chance to start printing at a trigger phrase rather than at the beginning of the file. The trigger phrase may be used to print part of a file. Just search for the trigger to start, and stop print with ^X (see below) when you have enough. PRN searches for your phrase at about 6 seconds/single-spaced page, but sends only print commands, and no text, to the Epson. Thus when the trigger occurs in the middle of a ^B..^B, for example, it will be printed in boldface, as usual. The page number, page offset, and so on will also be just as if the entire file had been printed. This facility is useful in order to view only the part of a file which has just been redrafted. PRN sends text to the screen, so keep your printer OFF, and quickly see page breaks, etc. Examining the pagebreaks is useful when PRN and WordStar differ (when altered line spacing has been used). PRN begins printing at the beginning of the line with your phrase in it. If PRN can't find the phrase, it returns you to the Main Menu, and no hard feelings. The search is conducted for the phrase just as you type it, so take care with capitalization, etc. If you wish to stop printing, type ^X (Ctrl X) to return to the Main Menu. When you use ^X, be aware that you may be in the middle of a passage which will leave the printer set for something other than normal font, spacing, etc. hhhhhhhhhhhh 6. Print without page formatting: This option does not assume a margin or 55 lines/page. It is for printing plain text, such as programs or documentation. Text printed under option #6 can be paged and formatted by the printer itself, using option #1 to set the printer. For example: set left margin 5, condensed font, 8 lines/inch, skip 6 lines at page bottom (from option #1) will give a very compact copy of an undivided text for use as draft documentation. The large margins are convenient for comments. However, option #6 still recognizes all the printing and graphics commands of PRN if they are present in a file. It differs from #5 only in that the default page format (identical to WordStar's format) is turned off. Check the list of dot commands under option #4 after selecting option #6, and you will see how the page formatting is avoided. However, if page formatting dot commands (for example, PO) are encountered under #6, they will be obeyed as usual. Trigger phrases, selection of CHAR files, and FIle insertion also work as under option #5. 7. Check a file for paired print characters: This is designed to prevent printing 17 underlined pages because the second "underline" print toggle was left off an "^Semphatically..." Given a file name, this option reads the file and pairs up all print commands. Option #6 uses PRN's usual print command rules and will cancel ^R when it finds ^E, and so on. At the end of the file, it will write a list of any unpaired print commands. These may be corrected by searching for them in WordStar using the ^QF "find" command. iiiiiiiiiiiii 8. Get a disk directory: Option #7 writes a disk directory for any disk, alphabetized horizontally, and including the file sizes in kbytes. If you have ever forgotten the name of the file you intended to print, you know what Option #8 is used for. ------------------------------------------------------------------- A: CHAR .DEF 1k > GRA .PAS 9k > GRAFIC .PAS 2k A: MOD1 .PAS 1k > MOD2 .PAS 1k > MOD3 .PAS 1k A: MOD4 .PAS 1k > MOD5 .PAS 1k > MOD6 .PAS 1k A: MOD7 .PAS 1k > P0 .COM 30k > P0 .PAS 18k A: P1 .PAS 13k > P2 .PAS 10k > P3 .PAS 14k A: RAMDISK .COM 9k > RDTU .COM 1k > RESQ .COM 9k A: RESQ17 .PAS 4k > SETDISK .COM 6k > SODU .COM 11k A: TOON12 .COM 1k > TURBO .COM 30k > TURBO .MSG 2k A: TURBO .OVR 1k > TURBOMSG.OVR 2k > VDE .COM 7k A: ZX .COM 3k CHAR.DEF **>> Press any key to continue.. ------------------- Option #7, Disk Directory ------------------- gggggggggggg 9. Exit: Returns control of the computer to the CP/M operating system, if PRN was called from CP/M. If working from the "R" option of WordStar, Option #9 takes you back to the WordStar menu. hhhhhhhhhhhh Composition of Files for PRNting With few exceptions, you simply type your file under the Document mode of WordStar, as usual. The exceptions occur when you wish to use one of the functions unique to PRN. **>> Anything enclosed by ^Y..^Y (you type ctrl-PY) is in a PRN environment and will be handled in a special way. Each character is examined to see if it is the name of a character you have defined, or a special PRN signal. If it is the name of a character, your predefined graphic is printed. If it is a standard print signal, like ^T..^T (superscript), it is obeyed. If it is a special PRN signal for the printer (!, @, #, $, %, &, or =), then the printer is sent the appropriate command. When the second !, @, #, .. is encountered within a ^Y..^Y environment, the special printer command is cancelled. If the character is none of the above, it is simply printed as usual. Note that this protocol is very flexible: it allows you to bracket passages to be interpreted by PRN, even though the bracketed passages contain complex mixtures of special graphics, print signals, and normal characters. PRN uses almost all the standard WordStar print commands, which can be listed from Main Menu option #4. When you type ^PD..^PD (^ means the ctrl key; ^PD shows onscreen as ^D), the characters surrounded will be printed in Double Strike mode, as always. Similarly for ^V..^V, ^B..^B, etc. Some of the limitations of the Epson have been overcome "in software" within PRN. For example, bold printing usually excludes subscripts, so that you cannot use the Near-Letter- Quality printing mode (bold) to produce final versions of documents which also include subscripts. Ah. PRN will do it, though, if bold is ordered within the file using ^B..^B. There are other examples of this which will be discovered if a variety of fonts are used. PRN also understands the extra symbols used by WordStar for special printer functions: for example, ^Q...^E will produce Epson-style (in-line) subscripts. Note that there are two ways to indicate italics: ^Y!^Y..^Y!^Y and ^R..^E. The latter OFF character (^E) also turns off super/subscripts. The former is a PRN method which affects italics independantly. All print commands are usable in normal text, as well as when included between the special PRN signals ^Y..^Y. PRN's special print symbols are usually grouped for easy memory on the keyboard (check it out), and have a mnemonic content: h Special Print Commands for Files h ! upside-down i = italics @ unusual a = alternate font, Elite # pound sign, suggesting weight = compressed font $ barred S = close line $pacing % no line = very close spacing, for continuous graphics & fancy letter = letter quality print = two spaced marks = user controlled line spacing These commands are imbedded in files between PRN signals. For example, ONSCREEN ----> PRINTED .zip..^Y!^Yitalics^Y!^Y..zip. .zip..!italics!..zip. All the other usual print functions are accessible within a ^Y..^Y. Thus : ^Y..zip..^B..dark..^B..zip..^Y ..zip....dark....zip.. Printed output lacks any trace of the ^Y, #, or ^B print commands, just as the WordStar printer ignores this sort of command. Compose your text assumming that all commands will vanish: if "a" is the name you gave an alpha graphic: |^Ya^Y| |a| Outside a ^Y..^Y, ^B, ^D, ^Q..^E are still non-printing commands, but !, @, #, $, and % will print as usual. Thus use of PRN is consistent with use of the dollar sign ($) for its usual purpose. ^Y...$8 lines/inch$..^Y, but $100.00 is still a C-note, and a good cigar's a smoke. Just remember that !,@,#,$, %, &, and = and the characters you have used as names of your graphics will be redefined within the PRN environment, ^Y..^Y. That's all there is to it. Limit the extent of your ^Y..^Y's to the areas where you are using redefined characters, because PRN will be quicker if it isn't required to analyze every character in a file. Most of the delay in fancy printing is attributable to the complicated routine carried out by the Epson whenever it makes a transition from the normal character set to graphics, or !vice versa!. A note for right justifiers: if you use WordStar to give even right margins, you should be aware that WordStar ignores ^Y's when formatting a line, but counts !,@,#,$, %, &, and = as one space. Thus !,@,#,$, and % will draw the right margin in one space when used between ^Y's, because WordStar allows a space for them, but they are not printed. Usually you can hide them between paragraphs or lines. Dot Commands Dot commands follow WordStar format: .NN ## a dot in the first column, a two letter command (NN), and then a numerical argument, where required. PRN uses a subset of the WordStar dot commands, described below and summarized in Main Menu option #4: .OP Omit Page numbers; PRN assumes page numbers unless they are turned off using this command. .PA Page; go to the bottom of this page, write number if called for, print next text at the top of the next page. This command can be use to eg, leave a space for an intercalated photo, or to force a graphic to appear at the top of a page. .PL 55 Page Length; sets the number of lines PRN will print on one page. This is the only dot command whose use differs from the same command in WordStar. The page number will appear 4 lines below the text. Recall that ^Y$.. or ^Y%.. , which change line spacing, will automatically alter PRN's line count so that pages will be the correct length. If instead you alter line spacing from option #1, you must use PL to set page length to match, or PRN will break off in the middle of pages (at 55 lines). WS and PRN have the same definition of a page, so that the WordStar page breaks shown onscreen are also accurate for PRNting. HHOOWWEEVVEERR: use of altered line spacing via PRN commands will make the onscreen WordStar page breaks inaccurate because WordStar definitely does not know from eg, graphics spacings. .PN 4 Page Number; the command at the left will make this page number four. This may be useful for printing a document which is a series of files, and keeping the page numbers consecutive. .PO 8 Page Offset (left margin); the margin may be changed freely at any point in a PRN text. The default margin, until reset, is 8 spaces, as shown. .FI B:comment.txt File Insert; the file named is printed in context at the site of the command. The inserted text (the FIle) may be searched for a print trigger phrase. While printing or searching the FIle, it will send print or dot commands just as if it were the main file. Pages of the FIle are numbered consecutively with the main file. This resembles the WordStar Mail-Merge function, except that it is carried out anywhere in a PRNted file without calling a special printing facility (such as WordStar's Merge-print). The only limitation is that the first file called for PRNting must contain all the FI commands. An inserted FIle may not order the insertion of further FIles. The FI command may be used to insert preexisting text into a new file. However, it is also used to write manuscripts as separate, small, easily handled sections. The sections are then combined by writing a master file of instructions, and calling PRN to print it. For example: PR.RNA ^B .op .fi titlepg.rna ^B^Y#^Y .pa .pn 1 .fi summary.rna ^Y#^Y **************************************************************** .fi intro.rna and so on... If PRN is told to print file PR.RNA, it will print the title page file in boldface, then go to the top of a new page and switch to compressed font for the summary file. The title page is not numbered: page 1 contains the summary and introduction. For the intro PRN returns to normal font, inserts a blank line, a line of asterisks, another blank line, and continues with the introduction on the same page... Another use for instruction files like PR.RNA is to order automatic printing of multiple copies, using multiple identical (.FI) commands. Remember to type at the end of the last line of inserted FIles. WordStar does not terminate such last lines automatically, and PRN correctly resumes printing an unterminated line (after it goes on to the main file or the next inserted FIle) in the middle of the line. An alternative which also prevents the joining of lines is to follow FI commands with ('s) in the main file, as is done between summary and intro in PR.RNA, above. .CF char.grk Character File: check for the character file CHAR.GRK on the logged disk. If it exists, load it and use it instead of the previous character file. There are up to 54 individual graphics in a standard character file. This dot command lets you use as many graphics files as you wish, automatically switching between CHAR files as you print. If you wish to write a novel in which one character speaks Russian, another Arabic, and a third Hebrew, here is the means to write in all languages. There will only be two people who can read your novel, but... More seriously, graphics of any size are made possible by this dot command, which of course does not exist in WordStar at all. If the CF command calls for a character file which cannot be found, PRN returns to the default file CHAR.DEF. PRN will search the entire line after all dot commands for a required argument, which may therefore be anywhere on the line. Any and all other characters on the same line, including print commands, will be discarded. Therefore, if you're the sort of person who finds it functional to talk to yourself by leaving imbedded notes in your files, you may do it after a pseudo dot command: .MY This data stinks, must think of another argument! The above line will cause PRN to admonish you !via! the screen that it has detected an unknown dot command in the file, but it will not print any of it, in effect deleting the entire line. The line will appear as shown when viewed with WordStar, for your possible edification when re-editing your file. %```````````````````````````````~~`````````````````````````````` ```````````````````````````````~~``````````````````````````````% Warp Twelve, Mr. Sulu!, or, Continuous Graphics If you think about the graphics that PRN makes, you see that it can print a continuous line of them by using the 11th and 12th columns of each character frame, instead of leaving these blank to give spaces between characters. What is less obvious is that the special print command % (^Y% %^Y) is chosen to precisely obliterate the space between lines of graphics. Working in a ^Y% %^Y environment, PRN can fire the printer pins to place a dot anywhere on a page, at a resolution of 960 dots per horizontal 8 inch line. Check the bar above this section. Now suppose that you define picture elements, instead of letters, in your CHAR.DEF. If you defined "l" as a frame ~1/3 filled with dots, when ^Y% ll %^Y occurs you get a continuous patch of medium grey. Thus if you define a group of suitable graphic characters in CHAR.DEF, you can "draw" a picture using WordStar. The lines of characters in that part of your file are interpreted by PRN as edges, shaded areas, lines, or whatever, stored as individual frames in CHAR.DEF. On detection of the signal ^Y% PRN will begin interpreting this part of your text file as continuous pictorial information, and will redraw your picture. Viz: %! f------t \ OI, / \ / \ VEY. / l______> o o o pnpnpnpnpnpnpnpnpnpnpnpnpnpn !% Dot matrix printing is a deliberative, rather than a highly spontaneous, medium of expression. But it allows both a systematic approach, using a drawing made on eg, graph paper, and a more impressionistic style, in which one composes freely at the keyboard, using the list of your custom graphics gotten from Main Menu #3. There is considerable freedom, because the elements of composition can be remade for each picture. Once done, editing a picture is easy. The resulting picture file can be copied, and moved to any position in any document which will be printed by PRN. All normal print commands and characters can be used for text within pictures (as above), and will be seen in final form intercalated among the graphic character names in the picture file. +he PRN program automates the commands required to create harmonious, illuminated text, or unprecedented garbage. Unfortunately, the latter is easier. For this reason, intricate graphic passages are more easily drafted as separate, small files in order to facilitate the printing of trial versions. WordStar makes this straightforward: ^KR = read a specified file into this file, at the cursor ^KW = write the stuff contained between ^KB..^KK to another file. These commands permit quickly printed draft versions to be returned to the main file when perfected. Passages are also easily extracted to move graphics around. % *) a..w % You have completed the PRN manual. As Nietsche once said to Kirkegaard, your options reduce to one: GRAB IT AND GROWL! Hardware Requirements, Configuration for Different Terminals PRN requires a printer which understands Epson print and 8-pin graphics commands. Check your printer manual if you are not sure whether your printer uses this command set. Many non-Epson dot matrix printers do. PRN is a fairly large program, and needs about 40k of RAM to run. However, as of PRN v3.5, no addresses above 0A000h are used. If you have a computer which uses Lear-Siegler commands (Kaypro, Morrow, ..), you are in luck. The distributed version of PRN is set up for this group of control strings (for example, clear to end of line = ^X). If you have another type of screen control command set, you can patch PRN.COM for your terminal by altering the locations shown below. If you are getting odd-looking screens when you try to run PRN, you need to do these patches. In each case, the control string begins with the number of bytes in it, then the string itself. Let's take clear to end of line, as an example: Address Byte Comment (all numbers hexadecimal) 01BC 01 ..This string is only one byte, as distributed01BD 18 ..This is ^X (CANcel) as a byte. 01BE ..done, no need to use this position Now for the list of locations to be set for your terminal 018B ..Size, cursor position string, includes 018E-F 018C ..the string 018D ..more here 018E ..00 if row & column are binary, 30 if characters 018F ..00 if row & col sent together, else put in number sent between 0190 ..make same as 018E 0191 ..if a number follows row & col, put it here 019B ..01 if row & col are binary, 00 if chars 019C ..number added to col, 20 in distributed PRN 019D ..number added to row, 20 in distributed PRN 019E ..03 if col before row, 04 if row before col 019F ..04 if col before row, 03 if row before col 01A2 ..clear the screen, size of string 01A3 ..the string 01A8 ..cursor to home position (set=00 if 01A2 does it) 01A9 ..the string 01AE ..insert line 01AF ..the string 01B4 ..delete line 01B5 ..the string 01BC ..clear to end of line 01BD ..the string qqqqqqqqqq CHRTX CHRTX.COM is a utility program, separate from PRN.COM, which will be useful when you have more than one file of graphics: CHAR.DEF, CHAR.GRK, etc. The program allows you to transfer characters from one CHAR file to another CHAR file, so that a useful symbol does not have to be redrawn. Both CHAR files must already exist, created by PRN.COM. You will have renamed one of them, unless they are on separate disks. Type A>chrtx , and the program will introduce itself and ask for the file to transfer from. Tell it the file name, and CHRTX will ask if you want to print a character list, just like the list generated by Main Menu Option #3. You might want a list, because you'll have to tell CHRTX the number of the character you want to move. If you do ask for a list, make sure the printer is on line. Then CHRTX will ask for a second file name to move to, and give you a chance to list the current characters. Finally, you will be prompted for the number of the character to move, and CHRTX will do the move, putting the character in the first open frame it finds in the target CHAR file. Now you will be asked if you wish to move another character, or exit. ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] Good luck with your new graphics facility! February, 1986 Mike Yarus 2231 16th Street Boulder, CO 80302 Compuserve 73145,513