WordMaster The Word Processor For 48k, 128k, +2 and Spectrum +3 Computers P.C.G. Computer Software WordMaster The Word Processor Spectrum 48k/128k/+2/+3 Computers (C) Copyright B M Parkinson & Paul Sneesby 1987 Revised Manual Version 2: September 1988 All rights reserved. This manual and software may not be reproduced, let for hire or in any way duplicated without the express consent of the copyright holders. Copying any part of WordMaster or the associated documentation other than for the purpose of making a back- up copy for the registered user’s own use will constitute an infringement of this copyright. Contents Introduction 1 Setting Up 2 Making a Back-Up Copy 2 How WordMaster Works 4 The File Handling Menu 5 Saving and Loading 7 Loading Graphics 9 The Options Menu 10 Column Width 10 Find Page 11 Editing The Document 11 Special Keys 11 Delete/Undelete 12 Blocks 13 Search/Replace 13 Commands 14 Resetting the Printer 14 Margins 15 Draft & NLQ 15 Pitch 16 Justification 16 Sending Control Codes 16 Page Breaks 17 User Definable Characters 17 Wide Spacing 17 Problems With Commands 18 Control Characters 18 Page Numbers 19 Graphic 20 The Graphic Commands 20 Notes 21 Headers & Footers 22 The at Command 23 Sending Control Codes In a Header 23 Left & Right Handed Headers 24 Printing 24 SingIe Sheet Paper 25 Page NumberIng 25 Printing Selected Pages 25 Printer Requirements & Customising 26 Notes 26 Problems When Printing 27 Appendix A: The WordMaster Character Set 28 Appendix B: Useful Printer Control Codes 28 Appendix C: Abbreviated Commands 29 Introduction WordMaster is a word processor designed specifically for the 48k ZX Spectrum. It will run on the 128k Spectrums in 48k mode and on the +3 in 128k mode. Available memory is over 29000 characters - roughly 5000 words. WordMaster incorporates advanced features such as graphics and multiple file handling. This last feature enables you to hold several short documents in memory at one time. moving between documents without having to save one and load the other. Graphics can be loaded as SCREEN$ and stored in memory as files, ready to be printed out within your documents. Many of the special features are accessed by command lines and embedded characters which select different print styles such as emphasised and superscript. The command line system allows great flexibillty to the experienced user, and to assist new users most of the commands are in plain English - typing >elite would select elite pitch; >1arge, double-width printing and so on. The text for this manual was originally typed on a 48k Spectrum+. Version 1 of this manual was printed with WordMaster on an Epson LX- 86 printer. For this new version, the text was ported across to another computer and printed on a QMS-PS810 laser printer. Menu Structure: 1 Setting Up Ideally you should reset the computer before loading WordMaster. You should then enter the instructions necessary to set up your printer interface. Token expansion and line feeds should be set to OFF. For the Kempston "E" interface this is done with the commands: COPY:REM =# COPY:REM CHR$ 0 For other interfaces: Interface 1 RS232: OPEN #3;"b" ZXLPRINT III: LPRINT' Plus D and Disciple: POKE @6,1 Other hardware interfaces will have their own peculiar syntax. Check the documentation supplied with the interface. Software driven interfaces and some hardware interfaces require special driver software to be 'patched' into the program. You will need a modified version if you wish to use any of the following interfaces: 128/+2 RS232 RAMPRINT ZXLPRINT III OPUS DISCOVERY TASMAN "B" KEMPSTON "S" INTERPRINTER DK' TRONICS Note that for the OPUS Discovery you should not add the OPEN *3;"b" instruction, as in this special version the printer port is enabled from machine-code. At the printer end, the DIP switch affecting line feeds should be set to OFF. Default pitch should be set to PICA (10 cpi). Making a Back-Up Copy +3 Version As this is supplied on disk, it is unlikely you will ever feel the need to use the Tape options. Make sure your master disk is write protected, then copy this with COPY "A: *.*" TO "B:" following the prompts as the +3 asks you to swap disks. 2 Microdrive version Type out the following BASIC program: 5 CLEAR VAL "24733": LOAD * "M";1;CHR$ 255 CODE 6 OPEN #3;"b" 10 RANDOMIZE USR 63315 Now save this to microdrive with: SAVE * "M";1;"run LINE 5 Now load WordMaster from the cassette Press [L] and when the input cursor appears Press [ENTER]. Now restart the tape, and a file will be loaded into WordMaster. When loading has finished, press [Q] to list the files in memory. You should see a file called >F-XE.back-up! If this isn't there try repeating the loading procedure to see if it's further along on the tape. Now press [G] and at the input type "back-up" and [ENTER]. The screen should clear as the "back-up!" extension program is run. Now follow the prompts for saving the WordMaster machine code to microdrive. Disk Versions (1) Load WordMaster from cassette. (2) Press [SYMBOL SHIFT] and [E] to escape into BASIC. (3) Alter LINE 100 to auto-load from disk, and add the printer interface commands (see previous section). (4) SAVE "run" LINE 100 (5) SAVE "WM" CODE 54174,11362 You can use this method to make a back-up at any time, but first you must delete all the files shown in the FILE HANDLING listing. If you don't do this, the copy on disk will be unusable. Special Versions Certain printer interfaces require a special version of WordMaster (see SETTING UP). With these, the RANDOMIZE USR address in LINE 10 of the BASIC should be changed. For OPUS Discovery, RAMPRINT, ZXLPRINT and software driven interfaces this should be RANDOMIZE USR 62438. For the 128k and +2 RS232 port this should be RANDOMIZE USR 62376. 3 Backing up Files WordMaster document files, graphics and extension programs should be backed up in the following way: (1) Set DRIVE 0 on the FILE HANDLING menu by pressing [D] repeatedly. (2) Load the file from cassette, (3) Set DRIVE 1 to select disk or microdrive 1. (4) Use the [S] option to save all the files in memory. (5) Delete all the files from memory with the [DELETE] key, and go back to (1) How WordMaster Works WordMaster is unique among Spectrum word processors in that it can hold several text files in memory at once. You can store as many files as you like, given the memory limitations of the Spectrum. The FILE HANDLING menu shows a listing of all the files in memory. They are listed in the order they are stored, with the last file on the list being the last file created or worked upon. Whenever files are loaded, they are loaded to the spare space at the end of the listing. WordMaster can be used with disk, microdrives, and cassette. The currently selected storage device is shown on the File Handling menu as the DRIVE number: 0 or T=tape; 1 or A=disk A; 2 or B=disk B. +3 users also have a Drive M, the ram disk. All SAVE and LOAD functions use the device selected hy the DRIVE number. Files can be saved individually or as a group of several files. When you load a group of files, you will find that several new files appear in the listing. This is the way that the WordMaster demo's were saved. An ordinary word processor will only load one type of file - a text or document file. WordMaster supports several different file types: Text Files These contain the ASCII characters from 32-126 (letters, numbers, punctuation marks). and some special characters described in Appendix A. See also CONTROL CHARACTERS. Any ASCII file can be loaded into WordMaster and edited, though files from some other programs may be stored in a peculiar format (Ie. with a carriage return at the end of each line). See the LOADING section and the OPTIONS (ASCII) section for more on loading nonstandard files. 4 Graphic Files These are special files containing the data bytes (from 0-255) used to build a picture. If you could edit these you would see a meaningless Jumble of characters. WordMaster knows that a file is a graphic if the first character in the fIle is a 255. You cannot enter this character from within WordMaster but be careful if loading files from another program, as a graphic file of an incorrect format will corrupt the screen and may cause a crash. Extension Program Files These are machine-code files such as the custom! and back-up! files immediately after WordMaster on the cassette. They are marked with the first character a 255 like a graphic file, but are listed as 'F-XE' on the file-handling menu rather than 'FILE'. When these are accessed with the 'get file' option, control is passed to the extension program - in the case of the back-up! program, allowing you to back-up your copy of WordMaster to microdrive. Other Files If you have the Headliner or 'I'ypeliner extension programs, you will find that with these come several other types of file such as fonts and page-layout description files. These are shown in the listing in different ways - Typeliner fonts are shown as 'Fnt3' files. The File Handling Menu Most of the options on this menu present you with an input and ask you to '[ENTER] filename'. The input works in a similar way to the usual Spectrum input. Press [EDIT] and the text on the line is cleared; press [ENTER] when you've typed the name of the file you require. For operations on files in memory and on tape the case of the filename is ignored, as is the length of the string you input, so to 'get' a file called "thisfile" you could type "t" or "T", or "THIS". If you input an empty string the first file in the listing (or the first found on tape) will be selected. You can also input a wildcard '?' character, which is taken to represent any character, so inputting "t??sf??e" would be equally valid as the other inputs shown above. For operations affecting files on microdrive you must input the name of the file in full and in the correct case otherwise a 'Not found' error will be generated. Disk systems like the +3 and Plus D ignore the case of filenames. 5 Listing the Files You can list the files in memory by pressing [Q], which you will need to do particularly after a LOAD. if there are more than 20 files in memory the listing halts when the screen is full and asks you to 'press any key' before continuing the list. If you press [BREAK] at this point the listing will stop and the FILE HANDLING menu reappears. Get File This option is used to access a particular file stored in memory. If the file is a graphic, it will be displayed. If it's an extension program it will be run. If it is a text file, this option takes you through to the OPTIONS menu. Create File This option creates an empty text file at the end of available memory ready for you to write a document. Two files can have the same name, but this would cause confusion and is not recommended. You can create files with a 'blank' filename, where in fact the filename is" " (ten spaces). If necessary, text files can be renamed from the OPTIONS menu. Delete File The 'delete' option first asks 'Yes/No?', to which you must press the 'Y' key to continue. Enter the name of a file and it will be deleted from memory. The same rules for filenames apply as described previously. Link Files Two text files can be linked together, allowing you to work on individual sections of a document separately before linking. Once files are linked they cannot be split. so again the 'Yes/No?' prompt is used. You must then type the name of the file you wish to link to the last file on the listing. If you type the name of the last file itself, then this file will be linked to the file preceeding it. If you find you have made a mistake, use the BLOCKS function from editing to move the sections around again. Drive The DRIVE number (or letter on +3 versions) shows the currently selected storage device. Pressing [D] will increment the drive number from 0 to 2 and back to 0 again. If drive 0 is selected, then all SAVES and LOADS are to tape. If you do not have a disk or microdrives you should leave this set to 0. 6 On the +3, the Drive number cycles through T:, A:, B: and M:. These refer to tape, disk A, disk B and the RAM disk Erasing A File The ERASE function on the FILE HANDLING menu will erase a named file on the currently selected disk. Inputting an empty filename will abort this before execution. CAT You can CAT the selected drive from FILE HANDLING by pressing [K]. The directory displayed will not be cleared unless you press [Q] to list the files in memory (or any other key that would clear the screen). Saving & Loading Wordmaster works with both cassette and disk, cassette operations being selected by setting 'drive 0' or 'drive T' on the FILE HANDLING menu. If you have disks or microdrives you will have to transfer the program and demonstration files from the cassette to a disk. How to do this is described in the MAKING A BACKUP COPY section. (BREAK) Pressing [BREAK] during a cassette operation will not in any way affect the running of program. You can do this to abort the automatic VERIFY after a SAVE operation, or to halt a LOAD if you have not found the file you want. Pressing [BREAK] during a microdrive operation can have unforseen consequences, such as corrupting the cartridge or certain memory areas. As in all other circumstances, the microdrives must be handled with care if they are to perform efficiently. You can abort a disk SAVE, LOAD or ERASE by inputting a blank filename, in which case you will return to the main routine. Loading Files If loading from cassette, entering an empty filename will load the first CODE file found. The same rules for filenames (wildcards, case ignored) apply as described previously. If loading from disk you must enter the filename in full, otherwise an error will be generated. The error will also occur if the file you try to load is a BASIC or other than CODE-type file. 7 If there is insufficient memory to load the new file a 'No Room' error will be generated. if this happens you will have to delete some of the files in memory to make more room, then retry the load. The above conditions apply also to loading graphics. Saving Files with the [S] option on the FILE HANDLING menu all the files currently in memory are saved as a group. If a group of files are saved, all the length and name data for each file is saved together, whereas if a file is saved on its own only the contents of the file ltself are saved. This means that when files are loaded back into WordMaster, the program must be able to tell whether the file being loaded is a group or a single file. In the case of files saved to cassette, this is done by adding 128 to the ASCII code of the first character of the filename (underlining it). When the files are loaded back in, this is detected and the appropriate action taken. This can be troublesome if you load a file from another program (or a CODE fileby mistake) where the first character in the filename is a BASIC token or a UDG. The best solution is to keep your WordMaster files separate from other CODE files, which is a good idea in any case. This problem does not occur with microdrives, as 'groups' saved to these are marked in a special way that you cannot duplicate other than from machine-code. Disk and Microdrive Errors Disk errors will return you to BASIC. You can restart WordMaster by typing RUN 10. Because of the great number of disk interfaces for the Spectrum it is not possible to describe every possible error for each system. When a disk error occurs you should consult the relevant manual for more information as to why this occurred. The most common (and slightly confusing) disk error is "CODE LENGTH ERROR" or similar. This happens when you try to load a file into a space which is too small for It. If this happens when using the [L] load option on the FILE HANDLING menu, it means there isn't enough room for the file. You will have to delete some files in the listing in order to make room. Most microdrive errors are detected and trapped by the microdrtve version. If you try to load a non-CODE file a "Not Found" message will appear; if there's not enough memory to load a file a "No Room" message appears. +3 Users may encounter problems with filenames when saving or loading from disk. The original Spectrums used a ten character filename system, the +3 uses a twelve character system. 8 Because the present +3 version of WordMaster is a direct conversion of the 48k version, only ten character filenames can be used. The +3 also does not permit certain characters such as '-' and '*' to be used in a filename. You should study the relevant part of the +3 manual to see which characters can be used. Loading Non-Standard Files Any CODE file that is no longer than 29600 bytes can be loaded into WordMaster. Files from other applications may be stored on disk as string- array or 'print' type files. You will have to convert these into CODE files and re-SAVE them. It may be easiest to load the file back into the original application and then save it onto tape, where it will most probably be saved as CODE. You can then load from tape into WordMaster. Some files may contain non-ASCII characters. These can be removed with the ASCII function on the OPTIONS menu or by using the SEARCH/REPLACE function. Warning: if a file is marked like a graphic or extension-program file with a 255 as the first character (see FILE TYPES) accessing the file may well cause a crash. Files loaded from tape should not have any BASIC tokens in the filename. Loading Graphics To print graphics, the graphic has to be in memory (shown in the FILE HANDLING listing). You can use the HEADLINER extension program to create graphics from within WordMaster itself, or you can Import graphics from other programs such as Art Studio. To load a SCREEN$, press [GRAPH] on the FILE HANDLING menu. Then input the name of a SCREEN$ stored on the current drive. Once the SCREEN$ has loaded, you will find a new menu appears on the bottom two lines of the screen and a flashing box in the upper display. You can now sample a section of the display and store it as a graphic file. The 'q', 'a', 'o' and 'p' keys move the box around the screen and the cursor keys alter its shape. Pressing [SPACE] will abort and quit to FILE HANDLING, pressing [ENTER] will store the area enclosed by the box. The new file is stored in a compressed state under the name with which it loaded. Once you have stored a graphic you can save it as a file with the normal save options. If you save a graphic file to disk you can later reload it with the [L] load option rather than the [GRAPH] option, which should only be used to load SCREEN$. Remember that a graphic has to be in memory before you can print it! 9 The Options Menu The OPTIONS menu is reached whenever you 'create' or 'get' a text or graphic file. If it is a graphic file then it is displayed and there are three options open: [Q] returns to FILE HANDLING. [S] saves the file to the currently selected drive. [R] asks you to input a new name for the file. If it is a text-file, several more options are open. Also displayed is a line of status information on the bottom line. This tells you the current display column setting; the number of words in the file; the length of the file in characters and the number of character spaces free for use. [P] takes you to the PRINT menu, described later under PRINTING. [ENTER] takes you into text editing - see EDITING THE DOCUMENT. Column Width The displayed column width can be altered from this menu by the left/right cursor keys. If there is some text in the file, you will see it being rejustified as the column width is altered. The text will be printed out in this column width unless overrided by the >column command (see COMMANDS). Colours [C] takes you to the colours menu. Pressing C, B or D will now change the command-line, border and text display colours. You can cycle through the colours until you find the combination you want, but beware - if you return with a border colour of white on white (or similar) you will find that all the menus are invisible! You should also make sure that the command-line paper colour is different to the display paper colour! ASCII [A] for ASCII is potentially very destructive. What this does is strip away all command lines, special characters and underlines from the text. All non-standard characters other than 13's (carriage returns), 8's (backspaces), and 9's (tabs) are removed. You are asked 'Yes/No?' before this is executed. On a large file with many characters to be deleted this may take some time. 10 Find Page [F] for find page will move through the file placing the cursor at the start of each page as it would be printed. The location of page-breaks depends very much on the settings made on the 'print' menu and any commands in the text such as 'wide'. See the COMMANDS and PRINTING sections for further details of their operation. Editing The Document The process of actually writing your documents can be approached in a number of ways. Generally it is best to do the writing first and worry about print-styles and layouts later. WordMaster is very flexible when it comes to the final layout stage. The more advanced features are available through the command-line system described later, though for simple letter writing you will probably only need to use the commands affecting margins and Justification. Another point to note is that unless you use commands that override it, the screen layout represents exactly what will be printed. This can he very useful for tabular work, indented text etc. Special Keys [INVERSE VIDEO] Quit back to OPTIONS menu [CAPS LOCK] Upper/Lover case text [DELETE] Delete character behind cursor [ENTER] New line/end paragraph [TRUE VIDEO] Insert COMMAND LINE marker [EXTEND MODE] Insert mode on/off [SYMBOL SHIFT] & [Q] FastScroll on/off [GRAPH] Select CONTROL CHARACTER [SYMBOL SHIFT] & [I] Underline character beneath cursor [EDIT] DELETE/UNDELETE word or line [SYMBOL SHIFT] & [W] BLOCK handling function [SYMBOL SHIFT] & [E] SEARCH/REPLACE function [ENTER] inserts a carriage return into the text (displayed as an arrow pointing downwards) this marks the end of a paragraph and a line feed, and can be used to separate sections with blank lines or to double- space paragraphs. [TRUE VIDEO] inserts (on a new line) a command character that looks like a '>'. The new line will be displayed in a different colour to the main text. The text on the line following the command character is not printed, instead it is interpreted by WordMaster rather like the instructions making up a BASIC program. to produce effects on printout like elite & condensed pitches, or centred justification. See the section on COMMANDS for how to use these. 11 Insert Mode The insert mode is switched with the [EXTEND MODE] key. It works by pushing all the text right and inserting a character at the current cursor position. If insert is off, then the character under the cursor is overwritten with any new character typed. Paragraphs can be indented by inserting spaces at the start of the paragraph. In a similar way words can be pushed across to the right of the screen or tabulated into lists. Pressing [DELETE] when in this mode pulls all the text to the left, thus deleting the character behind the cursor. Fast Scroll This is switched on and off with [SYMBOL SHIFT] & [Q]. Normally you scroll the text up or down one line at a time by moving the cursor to the top or bottom of the screen and 'pushing' against the edge. With fast scroll on, the screen scrolls down eight lines at a time, and moves up to the start of the last paragraph. Control Characters Pressing [GRAPH] will bring up a new menu in the lower screen allowing you to insert printer control characters into the text. These are used to select different print styles such as emphasised and italics when the document is printed. See the CONTROL CHARACTERS section for more details. Underlining Words are underlined by moving the cursor over the word and pressing [SYMBOL SHIFT] and [I]. Repeating the procedure de-underlines the word. Cursor Movement & Wordwrap When the text is displayed WordMaster checks that words are not split at the end of each line. If a word is overlapping the edge of the line, the line is broken at the last space before the word, and the word printed on the next line. This means that the lines as displayed are all of varying lengths. The effect of this is that if you move the cursor to a position beyond the end of a line, then press a key to insert a character, you will find that the cursor Jumps back to the end of the line. This sounds confusing but is easily apparent in use. Delete/Undelete Pressing the [EDIT] key brings up a new menu with several options. The [EDIT] key will now delete the word behind the cursor, storing it to be un-deleted if required. [ENTER] un-deletes the word, useful if you deleted it by mistake. 12 [DELETE] will now delete all the text on the line behind the cursor, and [CAPS-LOCK] will insert a blank line ready for you to overwrite. You can move round in this mode using the cursor keys, handy for swapping round short phrases or words without using the BLOCKS functions. Any other key will return you to the main menu. Blocks Pressing [SYMBOL SHIFT] and [W] activates the BLOCK handling function. The cursor will flash rapidly and you will be prompted to [ENTER] the start of the block. Pressing [ENTER] will place a marker at the cursor position. It should be noted that the markers for start and end of block are temporary and are erased if you clear (ie. scroll) the screen. If the block is very large, you may find you cannot remember where you positioned the markers, but fear not, if you get lost you can quit this function at any time by pressing [SPACE]. After marking the start and end you are prompted with the options available for the block. DELETE and SAVE are fairly self explanatory, though be careful when deleting as the removed text cannot be recovered. MOVE block allows you to relocate the block anywhere in the textfile. Take the cursor to the new position and press [ENTER]. COPY block will copy the block to wherever you position the cursor even if this is inside the present block, though I wouldn't recommend doing this. As you might imagine. you cannot MOVE a block to within itself. Search/Replace [SYMBOL SHIFT] and [E] activates the SEARCH/REPLACE function, asking you to input the 'search$'. This can be any string of characters up to 64 characters long. You can also input the special characters produced with [GRAPH] (see CONTROL CHARACTERS section). and the wildcard '?' character as for other input. A carriage return (paragraph end) character can be entered by pressing [GRAPH] then [ENTER]. Next you are asked for the 'replace$'. After this input, if you inputted an empty 'search$' you will return to the main routine. The first incidence of the search phrase is found and the cursor moves to the start of this and flashes. There are now three options. [SPACE] will quit the search, leaving the cursor at the word just found. [ENTER] will ignore the word, looking through the text to find any further occurrences. [DELETE] will replace the word with the 'search$' - if this is blank. the word is simply deleted. There are two switchable options with this function. By default both are switched OFF whenever you enter the routine. The auto-replace setting will, if ON, automatically replace every occurrence of the 'search$' with the 'replace$'. 13 The check-case setting selects case sensitivity. With this OFF, a search for "the" would find "The", "THE" or "tHe"; with this ON, case has to match exactly. if check-case is switched off then the way the word is replaced depends on the case of the first letter of the 'replace$': Word found: 'replace$': After replace: today Yesterday Yesterday Today Yesterday Yesterday today yesterday yesterday Today yesterday Yesterday As you can see, if the first letter of the replace$ is lower case, then the case of the output string is matched with that of the word found, Remember that words which start sentences have a capital (upper case) letter, whereas the same word in the middle of a sentence could start with a lower case letter. This 'toggling-case' function allows you to replace all the incidences of a word without worrying whether the word starts a sentence or not. Commands Because of the wide variety of print options available with WordMaster a system of command lines is used to select certain functions for printout. Pressing [TRUE VIDEO] inserts a command character, the '>', into the textfile. The character always appears on a new line at the left of the diplay, and the line is printed in a different colour to the main text. Commands must be typed immediately after this character. All commands must be in lower case letters: invalid commands are simply ignored. None of the text on the command line will be printed, hence you can use a command line to hide comments within the text. The main commands are described here. There are some other commands which are dealt with under the GRAPHICS and HEADERS & FOOTERS sections. Most of the commands can also be abbreviated: >Lprint can be shortened to >L or >l for example. The commands and their abbreviations are listed in Appendix C. Resetting the Printer >reset You should always RESET the printer to its switch-on state whenever you start a new print. You can do this by temporarily switching off the printer or by using the >reset command at the start of the text file. 14 The >reset command switches off all margin, style and pitch settings, and sets top of form, hence if you are using form feeds you should only use this at the top of a page Line spacing is set up after the >reset command, When in 'single' sheet print mode, a reset is sent at the start of each page (to set top of form) and then margins, styles etc. are set before printing continues, NOTE: The BROTHER HR-5 does not have a reset function. You should use the custom! extension program to disable this function by changing the codes used for reset to 0. The printer will have to be reset manually (by switching off then on again) whenever you start a print. Margins >marqin n >column n The >margin command sets a left margin of 'n' characters. The margin is always set in pica (10 th's of an inch), even if you have another pitch set. It does this by temporarily switching off the other pitches while it sets the margin. The >column command sets the width of the printed lines to 'n' characters in whatever pitch you have set. You can set a column width from 16 to 255 characters independent of how the text is displayed, though effectively you are limited by the printer carriage. If you do not use the >column command, the text will be printed in whatever display column you have set. NOTE: The BROTHER HR-5 does not have a margin function, so you should not use the margin command with this printer. See the PROBLEMS WHEN PRINTING section at the end of this manual for details of how to get around this problem. Draft & NLQ Print-Modes >draft >nlq These commands select either of the available print-modes. NLQ mode often overrides pitch settings such as elite and condensed, so make sure you switch these off before selecting NLQ. If your printer does not have a NLQ mode, you should not use either of these commands. 15 Pitch >elite >pica >condensed >large >normal The above commands all affect the pitch of the printed text. They can be used in all the valid combinations your printer accepts, so you could put >e1ite & >condensed at the start of the text file (after the >reset command!), and all the text from that point on would be printed in condensed elite. The >large command produces double-width printing. When this is selected, the text is automatically re-formatted on output so you can leave the column width set as normal. The >normal command switches off both >large and >condensed if either of these are set. Justification >fill >centre >right >left The Justification commands determine how the words are positioned within a line. This page is printed in >fill Justification - all the spaces between the words are 'filled' out so that left and right margins are even. In >leftJustification the text is printed exactly as displayed, with the right margin ragged. In >right Justification the reverse is true, the text is pushed across to the right margin and the left margin appears ragged. In >centre mode, the lines are centred to the current column width, for titles and headings. You can also manually centre a line of text by setting the insert mode to ON, moving the cursor to the start of the line and adding spaces to the start. Sending Control Codes >Lprint n,n,n,n,n,n,n.... The >Lprint command allows you to send a sequence of up to sixteen codes to the printer. You can use this for various functions, such as switching off the paper end indicator or selecting special character sets. 16 You should not, however, use this to set pitches or any other function for which there is a special command. This is because WordMaster must keep track of certain parameters such as pitch and line spacing in order to calculate the size of graphics, page lengths etc. If you used >Lprint to set these functions, WordMaster would not know about it and confusion would result. Some of the more useful printer control codes are listed in Appendix B. Page Breaks >form This forces a page break in the text, if you have selected a footer (see HEADERS & FOOTERS) this will now be printed, and if form feeds are ON the paper will be fed to the next page. User Definable Characters >def x n,n,n There are seven user-definable characters accessed by pressing [GRAPH] then a number key 1- 7. You can use these to print special characters not in the normal character set. The'x' in the command refers to which UDC you wish to define, and each 'n' to a code you wish to assign to it. As an example: >def 2 97,8,94 The '2' shown above must be the special UDC character accessed by pressing [GRAPH] then [2], not the numeral '2'. The example defines the second UDC as the three CHR$ codes 97,8,94 (a, backspace & ^), The result when printed looks like this: â Up to three codes can be assigned to each character, in the range 0-255. Wide Spacing >wide This command selects wide spacing and fill justification for draft copies, manuscripts etc. The text is automatically printed double spaced so there is no need to alter the lines/page setting. It is important to note that this mode, once selected, cannot be switched off - and that headers/footers remain independent. 17 Problems With Commands If you place comments on a command line after a command, like this,.. >Lprint 7 (comment: this sends the ASCII code 7) ...do not, as in the above example, place any numbers in the comment. When the line is interpreted, any numbers after the >Lprint command are sent to the printer, no matter where they are in the line. Hence the above example, instead of sending one 7, would send two. The above example is fairly innoccuous (7 being the 'bell' code) but if you were setting a form length or selecting a character set the results could he most undesirable. This problem really only occurs with the >Lprint and >def commands, as >margin and >column only look at the first number encountered in the line. Control Characters When you press the [GRAPH] key during text editing, a new menu appears in the lower display. Pressing a key from this menu results in a control character being added to the text. The control characters are shown inverted in the display, and are used to mark changes in print styles: [GRAPH] &: Produces: E Emphasised on D Double-Strike on I Italics on S Subscript on ^ Superscript on e Emphasised off d Double-Strike off i Italics off s Super/Subscript off As an example: create a new text file and type "This is emphasised printing" at the start of the file. Switch the Insert mode ON and Caps Lock OFF. Now move the cursor to the start of "emphasised" and press [GRAPH] followed by [CAPS SHIFT] & [E]. The E control character should appear. Now move the cursor to the start of "printing" and press [GRAPH] followed by [e]. The e control character should be inserted. If you print this out, you should find that the word "emphasised" is printed in the printer's emphasised style. 18 User Definable Characters Pressing [GRAPH] then a number key from [1]-[7] inserts a special definable character into the text. Each of these can be defined to hold a string of up to three codes in the range 0-255. See COMMANDS for how to define the characters. Backspace Pressing [DELETE] inserts the backspace character, displayed as a backwards pointing arrow. This can be used for overprinting; type "a" then hit [GRAPH] and [DELETE] then"´". When printed, the"´" character is backspaced over the "a", producing "á". Tabs In order to speed up the printing of a 64 column line TABS are not implemented within WordMaster. To produce tabular work, lists etc. you will have to layout the work on the screen, using the insert mode to move the text to the required position. The ASCII number 9 character (a tab) can be inserted into the text by pressing [EDIT]. On output this will cause the text to move across to the next tab position on the printer, though this will probably ruin any Justification you have set. The character is displayed as a forwards pointing arrow, and was mainly incorporated so that you can use WordMaster to prepare text for other applications (we use it when producing files for the HiSoft Devpac assembler). Page Numbers You can print the current page number anywhere in the text, though it is most convenient to place it in a header or footer (see appropriate section). Pressing [GRAPH] then [CAPS LOCK] inserts a large dot'.' character into the text. After this you should type three zeros (thus: '.000') as the three characters after the dot are overwritten by the page number and following spaces. 19 Graphics Incorporating graphics into your documents is an advanced feature more commonly found on expensive word- processors for 16-bit machines. Graphics and text can be produced quite easily with WordMaster, but it should be noted this is not a full page layout system. Printer Requirements To print graphics your printer must have the facility to set line feeds in 72nds of an inch and the ESC "L" graphics mode, producing bit-image graphics at 120 dots per inch. To print graphics with text alongside (justified to either left or right) WordMaster must know the pitch of the text to be printed. The >large setting is assumed to produce double-width characters. The pitches assumed for the various combinations of elite/condensed/pica are: PICA 10 CPI (Characters/Inch) ELITE 12 CPI CONDENSED PICA 17 CPI (approximately) CONDENSED ELITE 20 CPI If your printer produces a different pitch with any of these combinations you should avoid using that combination when printing graphics and text together. The Graphic Commands Like most of the other print functions, a graphic is positioned within the text by a command line. The key command is: >graphic z,y [name] Where: x = width of graphic *1-4 y = height of graphic *1-2 [name] = the name of a graphic file currently in memory. If a graphic file of the correct name is not found the command will be ignored. The x & y parameters can be left out, in which case the graphic is printed in *2 width and *1 height. These are the 'normal' settings, and produce a fair representation of the graphic as displayed on the screen. If you use the >graphic command on its own, printing of text will be halted while the graphic is printed. To print the text alongside the graphic one of the following commands must be used immediately after the >graphic command: >textleft >textright 20 Your text will now be printed to the left or right of the graphic. WordMaster calculates how wide the lines of text are from the current pitch settings, the column width and the graphic width, You should not change these while the text is being printed alongside the graphic. You can 'switch off' the text with the command: >text off Two other commands select whether shading (where colours are represented as shaded patterns on printout) is on or off: >shaded >ink If >ink is selected then only those pixels in the display which are set to ink will be printed. These commands must be used before the >graphic command and will affect all the graphics printed from that point on. Notes: (1) If there Is no room for the graphic on the current page, the page is ended and the graphic is printed on the following page after the header. This can cause problems if the graphic is larger than the lines/page setting permits. (This problem will only occur with very small page sizes; printing identical labels for example). You can detect where this is happening by using the FIND PAGE function to step through the text a page at a time. If the cursor refuses to pass a particular graphic. the graphic will have to be resized or the lines/page setting altered. (2) If printing text alongside a graphic, WordMaster first checks that there is sufficient room in the column for the text. If not the text is 'switched off' until the graphic is finished. (3) Only one graphic can be printed at a time, so two graphics cannot be printed alongside each other. If a second >graphic command is encountered while a graphic is being printed, WordMaster waits until the first graphic is fInished before it prints the second. 21 Headers & Footers A header is a section of text printed at the top of each page of a printed document. It usually contains the tifle of the document, and sometimes the page number, Footers are (as you might expect) printed at the foot of the page. and usually contain the page number. The page numbers in this manual are examples of this. Creating a Header To create a header or footer, you must first exit the main document and return to FILE HANDLING. Now create a new text file called "top" (or any suitable name), and type into it whatever you wish to be printed as a header for your document. Now return to the main document and type at the start of the file the command line: >header [top] This selects the file [top] as a header for the document. If you now PRINT the document, you will find that the text from [top] is printed at the head of each page. You can add carriage returns to the [top] file to move the main text's start position down the page. Alternatively you could use the >at command described later to do this. Effectively, a header reduces the amount of text on the page, as the number of lines used by the header decreases the number of lines available for text. The header can be changed throughout the document by selecting different files to use. The >header [filename] command should always be at the head ofa page. Creating a Footer >footer [filename] A footer is created in a similar way, only in this instance you can use the >footer command anywhere on the page where you want the footer to start, If you Just want the page number in the footer, insert the special'.' character (see CONTROL CHARACTERS) into the file selected as a footer. Once the footer has been printed, the paper will be fed to the next page; the header printed; then the text; then the footer; and so on until the end of the document is reached. 22 The >at Command >at The >at command moves the printhead down to line 'n' before resuming printing. If >at is used when the printhead has passed beyond the specified line the command is ignored. You can use this to position the footer on the page (you can put it beyond the lines/page limit) or to position parts of the main text at specific line positions. NOTE: For the BROTHER HR-5 and other printers which lack the VERTICAL SKIP printer function, add the following instructions to the WordMaster BASIC: POKE 56902,47 POKE 56909,201 If this is done then a series of LINE FEEDS will be sent to the printer instead of the VERTICAL SKIP. Switching Off Headers & Footers >header off >footer off If, at some point in the document, you wish to switch off headers or footers, you can do this by using the main command but not specifying a filename. The above commands do this, though the 'off' is not really necessary. Using Different Styles The styles and pitches used in headers and footers are completely independent of those used in the main text. Try printing the main document in italics. You will find that the header is still printed in the default draft mode. You can set up the header to print in any style, pitch or Justification mode you want with the appropriate commands and control characters. Column widths and margins can also be independent. If you do not specify a >margin within the header it simply inherits the previous margin used; not specifying a >column means that the display column setting will be used. Sending Control Codes With a Header If you are using single sheet paper, you may find it useful to set up a header containing the >Lprint command, to send a set of printer control codes at the start of each page. This could be used to set the form length, disable the paper-end detector or select a special character set. The file need not contain any text for printing, in which case it will have no visible effect on printout. 23 Left & Right Handed Headers & Footers >headleft [name] >headriqht [name] >footleft [name] >footright [name] The commands above set up lefthanded and righthanded headers & footers. The file selected by >headleft will be printed on every even numbered page and the >headright file on every odd numbered page. This works to best effect if the left-handed header is set to >left Justification with the appropriate command, and similarly with the right-handed header, Printing Printing your document is the stage where you spot all the typing errors and layout problems that you will have to correct before printing it again! The extra features offered by WordMaster mean that there is much more to go wrong, so you will rarely be satisfied with the first draft of a document. It is a good idea to use draft mode and make a few test prints before making the final NLQ copy. The settings on the PRINT menu, when combined with commands in the text, determine the overall layout of document. The actual PRINT command is executed by pressing [P]. The print menu then flashes to tell you that codes are being sent to the printer. if the printer is off-line (or switched off) you can quit this with [BREAK], as you can at any stage of the printing procedure should an error become apparent. Lines Per Page The lines/page setting determines the length of the printed part of the page. This is measured from the first line printed (the HEADER if selected) to the last line of text inclusive. Space for a FOOTER should be left on the paper after the main text has been printed, thus the lines/page setting should be less than the page or form length. This setting determines to a large degree the pagination of the document - where the page breaks occur. You can see this if you use the FIND PAGE function on the same document with different lines/page settings. For standard 11 inch paper a setting of around 50-56 lines/page is usual. if you are using nonstandard paper you will need a ruler to work out exactly how many lines to use, and how many lines to leave for the footer. There are special rulers available which are very useful for wordprocessing as they have markings in pica, elite and condensed pitches. The lines/page should not be less than the number of lines in the HEADER! 24 Form Length Pressing [F] on the PRINT menu switches form feeds on and off, If you are using standard 11 or 12 inch continuous paper you can usually set the form length with a DIP switch on the printer itself. Alternatively you can set a form length with the >Lprint command. For single sheet paper, the form length should ideally be set within a HEADER as described in the HEADERS & FOOTERS section. Single Sheet Paper With the single sheet option ON, you are prompted you to load a new sheet of paper at the end of each page. You can switch off the printer while you do this because the printer is reset anyway when the new page is started. What happens is that style settings, margins and pitches are 'remembered' by WordMaster, then after the reset these are switched on again. However, this does mean that settings made with the >Lprint command are forgotten by the printer, so if you have switched off the paper end detector on the first page, it will be switched on again by default on the second page. The solution is either to make permanent settings via the printer DIP switches, or to use the >Lprint command in a HEADER which will be printed at the start of each page. Page Numbering You can start the numbering of the pages from any number 0-999 by pressing [N] and inputting the required starting number. The FIND PAGE function also uses this as its starting number. This means that very long documents can he printed in separate parts, but still with consecutive page numbers. Printing Selected Pages The start and end parameters will determine which pages are printed. Normally these are set to 1 and 999, which will print the whole file, but if you set a start of 8 and an end of 9 then only pages 8 and 9 will be printed. This is useful for checking the layout of a specific page, particularly if it incorporates graphics. If you are printing selected pages, note that command line settings such as 'elite' or 'nlq' will still be active at the selected start page, even if these were used on previous (unprinted) pages. Style settings such as emphasised are not carried through from the unprinted pages, so you will have to use the FIND PAGE function to move the cursor to the page required and set up the style combinations required there. 25 Line Spacing Line spacing is set in 72nd's of an inch - 12/72nd's is the normal setting and produces six lines of text per inch, Altering this to 8/72nd's will produce nine lines per inch with no gap between the printed lines, which is what you want for printing block/line graphics from the printer's own character set, You will not often want to alter this, and should not set it to more than 72/72nd's if you want to print WordMaster graphics. Printer Requirements and Customising WordMaster can be used with Just about any printer, though naturally you will not be able to produce graphics on a daisywheel (see the GRAPHICS section for the particular requirements). The printer uses control codes to select the different print options such as emphasised or italic printing, and it is the different standards used on different printers that cause most of the compatabffity problems. WordMaster is set up with the standard EPSON printer control codes, which are used across a wide range of printers. If your printer uses different control codes to these, you will have to 'customise' the codes sent by WordMaster to suit. This is achieved with the 'custom!' program on the tape after WordMaster. Load this in and 'get' it from FILE HANDLING. You can now type in the control codes used by your printer to suit each particular function. You can save the custom! settings with the program from the FILE HANDLING menu. Notes: (1) Pressing [DELETE] or [SPACE] when using the custom! program will delete the code number under the cursor. (2) if you wish to disable a function you should enter the NOP code, which is simply ignored by the printer. Usually this is 0, but check your printer manual. (3) Some functions sends an additional code after the sequence listed on the customise menu. An example is the 'margin' sequence, which sends the codes 13, 27 & 108 then sends a code for the margin you require. (4) The code sequence for the margin setting contalns a 13 (carriage return) before the actual margin-setting codes. This is so that the printer buffer is cleared before the margin is set. (5) The same codes are used to set superscript and subscript. What happens is that the third number in the sequence is set to either 1 or 0, depending on which style has been selected. 26 Problems When Printing Printer output Is garbage or in incorrect style The printer interface should be set to TOKENS OFF. The printer should be RESET before starting a new print. Do this by adding the command to the text file or by switching off temporarily. Check that your printer fully supports the features you are trying to use. If you are trying to set NLQ print mode and your printer does not have this, it will not recognise the control codes you send for NLQ. Similarly, some style combinations may not be supported by your printer. On many printers you can have condensed and elite modes, but you cannot combine the two. No Margin Printed If your printer does not have a margin function (like the Brother HR5) you cannot, so it would seem, set a left margin on your printouts. Luckily there is a solution to this. At the end of each line printed WordMaster sends a carriage return. if you load up the custom! extension program you can alter the codes used for this. Set the codes to 13 (return) and 9 (horizontal tab). Now after every line the printhead will tab across to the first tab position, leaving a neat margin. Graphics do not print correctly A 'venetian blind' effect when printing graphics has one of three causes: (1) The printer DIP switch affecting LINE FEEDS is set to ON. This should be set to OFF. (2) The printer interface is sending an extra line feed after every carriage return. You should add the commands to the BASIC which disable this function. (3) You have a +3 computer! The +3 issues a ground signal to the printer on pin 14, overriding the DIP switch settings and forcing an additional line feed. This problem only occurs with printer leads that have pin 14 connected. Either cut the wire to pin 14 or isolate it with insulating tape. 27 Appendix A The Character Set WordMaster text files contain the following characters. The main difference from the normal Spectrum character set is that there is no '£' sign. You should find that the '#' character produced with [SYMBOL SHIFT] & [3] prints as a pound sign. The '£' is not a standard ASCII character. Code: Function: 0-7 Not Used 8 Backspace 9 ASCII TAB character 10-12 Control Characters 13 Carriage Return - used as paragraph end marker 14-23 Control Characters 24 Command Character 25-31 Definable Characters 32-95 ASCII characters as normal Spectrum character set 96 ASCII "`" - the "£" in the Spectum character set 97-126 As normal 127-159 Not Used 160-254 Underlined characters - normally the BASIC tokens 255 Marks the start of a graphic or machine-code file. The data for the character set occupies 768 bytes starting at address 64512. You could design your own characters and load them at this address. To see how the data is organised, CLEAR 24733 and load the WordMaster machine code, then POKE 23607,251. Appendix B Useful Printer Control Codes These are the standard EPSON codes for various printer functions. They may be used with the >Lprint command as described in COMMANDS, providing that your printer supports these functions. Codes: Function: >L 27,56 Disables paper-out sensor >L 27,57 Enables paper-out sensor >L 7 Rings the printer's bell >L 27,67,0,n Sets the FORM LENGTH to 'n' inches >L 27,67,n Sets the FORM LENGTH to 'n' lines at the current line spacing: n should not be 0 >L 27,82,n Selects international character set 'n' UK=3, USA=0, etc. 28 Appendix C Abbreviated Commands All commands must be in lower case letters apart from the >F (form) and >L (lprint) commands which may be abbreviated to a single character either upper or lower case. Pitch >elite >pica >cond >large >norm Justification >fill >cen >left >rig Page Dimensions >mar n >col n >at n Print Mode >dra >nlq Also >def x n,n,n >L n,n,n,n,n... (lprint) >wide >reset >F (form) Graphics >graph x,y [name] >textl >textr >text (off) >sha >ink Headers & Footers >head [name] >foot [name] >headr [name] >footr [name] >headl [name] >footl [name] >head (off) >foot (off) 29