Introduction PRINT.COM allows a WordStar user to take advantage of many dot matrix printer functions that are not easily accessed with WordStar. Some of these features are: o Use of solid underline provided by printer as opposed to the dashed underscore by WordStar. o Use of the printer's BOLDFACE and DOUBLE STRIKE capabilities rather than WordStar multi-strike. o Many print control characters are toggles, thus dot matrix printer implementation of superscript and subscript becomes easier (you can actually use ^PT and ^PV for these respective functions). o .LH can now change Line Height on the printer, even in mid-document! Use of PRINT 1.20 PRINT 1.20 may be run from CP/M or from within WordStar (using the R Command). You may provide the file name of the file to be printed on the command line, or PRINT will prompt for the file name (NOTE: If using from WordStar R command, allow PRINT to prompt for the file name.) Examples are below: A> PRINT or A> PRINT filename PRINT reads the file and prints it, using the print control characters and dot commands entered in WordStar (not including MailMerge dot commands). Below is a complete list of dot commands understood by PRINT. They operate identically as in WordStar with a few exceptions: .LH n Sets line height to n/48th of an inch. (Default is 8/48th = 1/6 inch). .PL n Sets page length to n lines (Default: 66). .MT n Sets Top Margin to n lines (Default: 3). .MB n Sets Bottom Margin to n lines (Default: 8). .HM n Sets Number of Lines between Heading and Text. .FM n Number of lines between Footer and Text. Default for .HM and .FM is 2. .PC n Prints Page Number in column n (Default: 33). This command resets the Footer_Text. .PO n Page Offset (printer's left margin). .PA Forces a page break. .CP n Conditional page break. .HE Sets Header text .FO Sets Footer text. The default Footer_Text is the page number in the column specified by .PC. PRINT 1.20 does not recognize ^K in Heading or Footer (used for changing format on even and odd pages). .OP Omit Page Numbers .PN n Starts numbering pages with page n. If n is not specified (or is 0), the Footer_Text is reset to its default, and page numbering begins at the current page number. .PP n Page Pause. This is not a WordStar dot command, but .PP 1 allows PRINT to pause between pages, and .PP 0 disables this feature. .BP n Bidirectional Printing is on (default) if n is not zero, and Unidirectional printing is turned on for n equal to 0. (As released for the Gemini 10x, this feature is also possible through the ^PU print toggle.) All other dot commands are ignored and they will not affect printing. WordStar allows certain dot commands to appear only at the beginning of the text (.LH, .MT, ...). With, PRINT 1.20 you may place the command anywhere (just ignore the WordStar error message). For instance, .LH will allow the user to change line height many times and PRINT 1.20 will account for variations in effective page length. As distributed, PRINT is installed for use on GEMINI STAR dot matrix printers. Here are the print controls as installed: ^PA Elite print (12 CPI) ^PB Boldface (emphasized) print toggle ^PC Pause Printing ^PD Double Strike print toggle ^PE graphics characters toggle ^PH Backspace ^PI Tab ^PJ Same as Line Feed ^PM Same as Carriage Return ^PN Pica Print (10 CPI) ^PQ italics toggle ^PR download character set toggle ^PS underline toggle ^PT superscript toggle ^PU unidirectional print toggle ^PV subscript toggle ^PW Wide print toggle ^PX X-out toggle ^PY Compressed print (17 CPI) Consult the Installation Notes for modification. Limitations and Known Bugs Due to lack of memory in 64k CP/M computers, use of the printer commands which require two passes per line is limited to one such feature at at time. As distributed, PRINT only has two such features: X-out (^PX) and download character set (^PR). You may not use both of these features at the same time: you cannot x-out your downloaded characters. [Editorial Note: how many people use both if either of these featues anyway?] As written, I had planned for the PrintLine Procedure to be recursive to solve this problem, but I just didn't have the memory to recurse. .HEPRINT ver 1.0 Installation Guide page # Terminal Installation PRINT 1.20 was written for TURBO Pascal. Terminal Installation will be automatic when compiled in TURBO (assuming TURBO was properly installed). As distributed, PRINT.COM 1.0 was compiled on an Osborne I (Televideo 912C/925 screen compatible). For other compilers, you may need to write some routines that are built-in to TURBO (DelLine, GotoXY, LowVideo, NormVideo,...). Printer Installation Most printer features are installed in CONFIG1.PAS. This file (which is INCLUDEd at compile time) contains the following procedures: INIT_PRINT - Printer initialization UNINIT_PRINT - Printer Conclusion sequence CTRL_PRINTER - All special print controls (^P) INIT_PRINT initializes the printer and related variables. The first WRITE statement is the actual initialization of the printer. The following loop initialized the PRINTER_STATUS (all features are turned off except we begin with PICA print (FLAG[14]). Highlighted between the horizontal bars are variables that are relevant to certain special print features. TwoLine_Ctrl contains a list of features that require two passes of the printer to print. As released, these are ^PX and ^PR. X-out is obviously done with two passes of the print head. On a Gemini printer, the download set must be printed separately of the regular character set (thus two passes); I don't know that this is true on an Epson printer. If you redefine printer functions that are listed (or not listed if you add new functions), you may need to edit the initial value of TwoLine_Ctrl. Do not put spaces in this variable. UNINIT_PRINT sends a control sequence at the conclusion of printing. CTRL_PRINTER contains codes for the various ^P print commands. Any programmer should be able to figure it out. The format is as follows: 1 nn : begin 2 if state then 3 write(lst,on_code) 4 else 5 write(lst,off_code); 6 flag[nn] := state; 7 end; The nn in line 1 is the ASCII code (ie. ^A = 1, ^Z = 26). Line 3 : sends the code to turn ON the feature (ON_CODE). Line 5 : sends the code to turn OFF the feature (OFF_CODE). Line 6 : OMIT this line if the code is included in TwoLine_Ctrl. Note that the change in fonts is different. By selecting one print size, you must manually be sure that the one you select is on while all other is off. Take ELITE print for example: 1 : if state then begin write(lst, ON-CODE); flag[1] := on; {Elite is on} flag[14] := off; {PICA is off} flag[25] := off; {Compressed is off} end; DOTCMD.PAS also contains a line that must change with printer type. Since the dot command .LH now chnages the line height on the printer, this command must also be installed. This section of code is commented for easy installation. For those print controls that require two line for printing (ie. Download Characer set on the Gemini), you must also modify the PrintLine2 procedure in the main program. Because each situation is unique, and programming experience is required here, I will not (cannot) go into detail on modification here. For the experienced programmer: look for the CASE statement that tells PRINT how to create the two different lines. See the X-out as an example. Compiling When compiling the code in TURBO to a .COM file, it may be necessary to change the ENDING Address in order to be able to run PRINT from within WordStar. This is a result of TURBO and WordStar having different size reloaders. As distributed, PRINT was compiled on a CP/M version of TURBO with the ending address set to CC00, and it seems to work just fine. There is also some code which is commented out for compiling with TURBO 3.0. This is the code for reading the CP/M command line when PRINT is invoked. If you compile with TURBO 3.0, you may comment-out the TURBO 2.0 code, and use the 3.0 code which is marked in the MAIN PROGRAM.