The LX-80 toolkit is an 8K sideways RAM program or EPROM which can be used with most Epson printers and contains a number of commands specifically for the LX-80 near letter quality printer. It also contains a programmers toolkit and uses the rom filing system to store two BASIC utility program.

The printer utilities and toolkit commands are all, used by typing an asterisk followed by a command word. The help menu lists the commands and can be displayed by typing: *HELP LXTOOLS (or *H.L.)

LX-80 Printer Utilities

*BKSPACE (1-9)
*CONDENSED ON/OFF
*CUTSHEET ON/OFF
*DEFAULT
*DOUBLE ON/OFF
*DRAFT
*ELITE
*EMPHASIZED ON/OFF
*ENLARGED ON/OFF
*ITALIC ON/OFF
*JUSTIFY C/F/L/R
*NLQ
*PAPEROUT ON/OFF
*PICA
*POUND ON/OFF
*SMALL ON/OFF
*SUBSCRIPT ON/OFF
*SUPERSCRIPT ON/OFF
*UK
*UNDERLINE ON/OFF
*USA

Toolkit Utilities

*ALIST ON/OFF
*FUNKEYS
*KILLROM (<hex. number>)
*LOCK ON/OFF
*LOOKFOR <string>
*NAMEROMS
*RESET BEEB
*STRUCTURE
*UNLOCK ON/OFF

ROM Filing System
*ROM

(C) Gordon Horsington 1986

OS 1.20
>

The printer must be switched on when the printer utility commands are executed if the commands are to have any effect. If the printer is switched off the effect of the commands will not be stored to be executed when it is switched on. All the printer utility commands can be embedded in Wordwise text by using, for example:

<fl>OS"DOUBLE ON"<f2>

There is a bug in some versions of Wordwise Plus which makes the <f1>*DOUBLE ON<f2> format less reliable that the above format.

Many of the commands use arguments. An argument is optional if enclosed in parentheses ( ) and compulsory if not. Many of the compulsory arguments are optionally ON or OFF, but then either ON or OFF must be used. All the printer utility and toolkit commands can be abbreviated but a minimum of three characters must be used and followed with a full, stop. The commands may be typed in either upper or lower case and may be preceded with on optional X (or x) if a command clashes with another command in a rom in a higher priority socket.

There is a syntax check on all commands. If a command is given with the wrong syntax then an error message is displayed on the VDU. The syntax error message will not be displayed on the printer where it might spoil your text. All other text, such as the help menu, can be printed if required.

If the LX-80 toolkit rom is inserted into a higher priority socket than the Disc Filing System rom then, the character ignored by the printer is changed from linefeed to the null character. The interlace will be off in all modes except mode 7 and the BBC B+ will default to shadow screen mode. If Wordwise or Wordwise Plus is then used on the BBC B+ it is necessary to type *FX114,1 before typing *WORDWISE because this wordprocessor was not designed to edit in shadow mode. Typing *Fll4,1 on the BBC B will have no effect. If the toolkit is in a lower priority socket than the Disk Filing System rom then all the usual BBC defaults will be used and, because shadow mode will be off, Wordwise will be unaffected. The toolkit expects the Epson DIP switches to be set to their default values, as described to the Epson manual.

The computer should have either the 1.2 or 2.0 version of the machine operating system. Any other operating system will give the message "Unknown OS, Unable to reset" when the command *RESET BEEB is used.

Memory locations &70 to &8F are used by the toolkit and are restored to their former values by all routines except *LOOKFOR. This routine searches a BASIC program for keywords or strings and because it switches back and fore between the toolkit rom and the BASIC rom it is unable to use the stacks as a temporary store of these memory locations and then restore them when its work is finished.

The toolkit cannot be used in econet equiped BBC computers and uses the econet zero page workspace (&90-&9F) to store information and relocated vectors. These memory locations should not be used by any other software if any of the toolkit utilities are active. The toolkit will automatically disable itself if the NFS is active and only work when either the DFS, CFS, TFS or RFS is used.

*BKSPACE (1-9)

*BKSPACE is used to move the print head a specified number of spaces to the left. This allows the characters to be printed on top of one another. For example, *BKS. 6 will move the print head six spaces to the left. If no argument is specified one backspace is performed.

*CONDENSED ON/OFF

*CONDENSED ON is only effective in draft mode. It produces characters which are half the width of the normal draft characters. *CONDENSED OFF cancels the condensed printing.

*CUTSHEET ON/OFF (LX-80 only)

This command is used with the optional cut-sheet feeder. *CUTSHEET ON will switch on the cut-sheet feeder and *CUTSHEET OFF will switch it off.

*DEFAULT

*DEFAULT resets the printer to the power-on state, including top of form. It clears the buffer of all data entered before the command.

*DOUBLE ON/OFF

*DOUBLE ON is only effective in draft mode and causes characters to be printed twice. It may be used in conjunction with *EMPHASIZED ON for even darker print. *DOUBLE OFF is used to switch off double-strike mode.

*DRAFT (LX-80 only)
*DRAFT is used to switch off the near letter quality mode.

*ELITE

*ELITE selects elite pitch (12 characters per inch). The elite pitch is cancelled with *PICA

*EMPHASIZED ON/OFF

*EMPHASIZED ON produces a darker character at a reduced speed by printing the character a second time at a position slightly shifted along the line. It is only effective in draft pica and NLQ modes and may be used in conjunction with *DOUBLE ON in draft mode. *EMPHASIZED OFF is used to switch off emphasized mode.

*ENLARGED ON/OFF

*ENLARGED ON switches enlarged characters on until switched off with *ENLARGED OFF.

*ITALIC ON/OFF

*ITALIC ON causes characters to be printed using the italic character set. *ITALIC OFF switches off the italic mode.

*JUSTIFY C/F/L/R (LX-80 only)

Before using this command be sure to select the near letter quality mode with *NLQ. Do not use this command if your word processor is also setting justification modes since the two will conflict.
*JUSTIFY C centres a line of text between the margins.
*JUSTIFY F puts extra spaces between words where necessary so that both left and right margins are even.
*JUSTIFY L makes the left margin straight and the right margin ragged.
*JUSTIFY R makes the right margin straight and the left margin ragged.

*NLQ (LX-80 only)

*NLQ selects the near letter quality mode.

*PAPEROUT ON/OFF

*PAPEROUT ON enables the paperout sensor so that the printer buzzer sounds when the printer runs out of paper. *PAPEROUT OFF turns off the paperout sensor so that you can print right to the base of a single sheet of paper.

*PICA

*PICA selects pica pitch (10 characters per inch). This command is used to cancel the *ELITE command.

*SMALL ON/OFF

When the United Kingdom character set is selected the Epson prints the £ character as # and the # character as £. *POUND ON will cause these characters to be printed properly. If your printer is not using the United Kingdom character set, select it with *UK before using *POUND ON. *POUND OFF will turn this utility off.
*POUND ON cannot be used if *ALIST ON is being used. This is not a problem since ALIST automatically accesses the POUND correction.

*SMALL ON/OFF

*SMALL ON can be used in draft mode to select a very small character set. *SMALL OFF will restore printing in Draft Pica.

*SUBSCRIPT ON/OFF

*SUBSCRIPT ON selects subscript. *SUBSCRIPT OFF cancels subscript.

 
*SUPERSCRIPT ON/OFF

*SUPERSCRIPT ON selects superscript. *SUPERSCRIPT OFF cancels superscript.

*UK

*UK selects the United Kingdom character set.

*UNDERLINE ON/OFF

*UNDERLINE ON selects underlining mode. *UNDERLINE OFF cancels underling mode.

*USA

*USA selects the American character set.

All toolkit utility commands can be used in the BASIC command mode.

*ALIST ON/OFF

*ALIST ON enables an assembly language formatter which can also be used with BASIC files. The formatter is used when listing source code making it easier to read and understand. It remains active until *ALIST OFF is used. When this utility is active files can be loaded into memory or saved or listed, but not edited or run. If *POUND ON has been used, type *POUND OFF before typing *ALIST ON. ALIST automatically uses the pound correction when printing. An example of the use of *ALIST is shown below.

>LIST
10osasci=&FFE3:DIM space%100:FORpass=0T03STEP3:P%=space%
:[OPT pass:LDA #7:LDX #2:.bell:JSR osasci:DEX:BEQ finish: JMP
bell:.finish:RTS:]:NEXT
>
>*ALIST ON
>
>LIST
10 osasci=&FFE3
 : DIM space%100
 : FORpass=0T03STEP3
 : P%=space%
 : [       OPT pass
 :         LDA #7
 :         LDX #2
 : .bell
 :         JSR osasci
 :         DEX
 :         BEQ finish
 :         JMP bell
 : .finish
 :         RTS
 : ]
 : NEXT
>*ALIST OFF
>

*FUNKEYS

*FUNKEYS is used to define the red function keys for use with the Wordwise word processor. You can type *FUNKEYS either before typing *WORDWISE or in the Wordwise menu. If you type Y in reply to the question "Are you using Wordwise? (Y/N)" the function keys will be defined with the following Wordwise commands which can be added to the text in the edit mode by typing <CTRL> <SHIFT> <f-key>.

<f0>	New paragraph.
<f1>	Double strike on.
<f2>	Double strike off.
<f3>	Underline on.
<f4>	Underline off.
<f5>	Emphasized on.
<f6>	Emphasized off.
<f7>	Italics on.
<f8>	Italics off.
<f9>	Delete line.

Unlike embedded LX-80 toolkit commands the embedded commands generated by function keys 0-8 can be used to print text on a computer not equipped with the LX-80 toolkit rom.

*KILLROM (<hex. number>)

*KILLROM is used to disable paged roms until <BREAK> is pressed. If no argument is specified the LX-80 toolkit rom itself is disabled. For example *KILL. E will disable the rom in socket E (14), *KILL. will disable the LX-80 toolkit. A list of the socket numbers and their contents caw be obtained by typing *NAMEROMS.

*LOCK ON/OFF

This utility is used to produce locked cassette files which can only be subsequently *RUN and not *LOADED. For example:

>*TAPE
>*LOCK ON
>*SAVE myfile 2000+200
>*LOCK OFF
>*DISC

*LOCK should always be switched off, as shown above, immediately after use.

*LOOKFOR <string>

*LOOKFOR is used to find the occurrences of a particular string in a BASIC program. For example, *LOOKFOR PRINT (or *LOO. P.) will list the line numbers of every line containing the BASIC keyword PRINT.

*NAMEROMS

*NAMEROMS is used to produce a list of the paged roms, their hexadecimal socket numbers, and type (either service S or language L).
For example:

>*NAMEROMS

E (S) LX-80 Toolkit
D (S) Slogger DDOS
C (L) BASIC
B (L) WORDWISE-PLUS
A (S) CARETAKER
9 (S) DISC DOCTOR
8 (S) TOOLKIT
4 (S) HELP (*H)
2 (5) AID

>

*RESET BEEB

*RESET BEEB resets the computer to its switch-on state. User memory is cleared but sideways RAM is unaffected. *RESET BEEB can be abbreviated to RES. BEEB, that argument BEEB must be typed in full to help avoid an accidental reset.

*STRUCTURE

*STRUCTURE is used to produce a structured renumber of your BASIC program. A structured renumber will reveal the structure in your program by starting at line number 10, giving each line an increment of 10 and starting all procedures and functions with a multiple of 100. An example is appended to this manual. Your program should always be saved before using this command in case it fails when there are too many program lines.

*UNLOCK ON/OFF

*UNLOCK ON is used to *LOAD a locked cassette file into memory. A locked file can normally only be *RUN. For example:

>*TAPE
>*UNLOCK ON
>*LOAD myfile
>*UNLOCK OFF
>*DISC
>

Unlock should always be switched off, as shown above, immediately after use.

The rom filing system (RFS) accesses data stored in paged roms in the same way as the cassette filing system (CFS) accesses data on tape except that saving or writing to rom is not available. The RFS is selected by typing *ROM. All the CFS commands except save, *SAVE, OPENOUT, BPUT#, and PRINT# are available. The programs stored in the RFS can be catalogued by typing *CAT (or *.) and full cyclic redundancy checking can be enabled with the *OPT1,2 command.

There are two BASIC programs stored in the RFS.

RELOC has been designed to allow the user of a computer with disc drives to use programs written for a tape based system.

Many commercially produced cassette tape programs written for the BBC micro are located in an area of memory claimed as workspace by the disc filing system. In order to run these programs from disc it is necessary to load the code into a safe area of memory, select the tape operating system, and relocate the code from the safe area to the original area of memory.

RELOC adds a small machine code routine onto the end of your BASIC or machine code program to enable you to load your program into memory, select the tape operating system (if required), download the program (if necessary), and then complete the action of either LOADing, CHAINing, *LOADing or *RUNning the program. Your program will be permanently altered so that the command *RUN <filename> will do all this automatically.

The program should be used in MODE7. It needs a private workspace of &D00 bytes in which to run (eg. from &1900 to &2600) and adds a minimum of 1 byte and maximum of &73 bytes onto the end of your program. The routine it generates must be outside RELOCs workspace or the error message "not enough workspace" is given and the program stops. Because this program is written in BASIC, PAGE can be altered to locate it anywhere in memory and the need for &D00 bytes of workspace should not cause any problems.

Using the program is probably best demonstrated with an example. The game Killer Gorilla has a BASIC loading program called "KILLER" and a second machine code program called "GORILLA". The BASIC program *RUNs the second program. Both programs can be transferred to disc as shown on the next page.

>*TAPE
>*OPT1,2
>*LOAD KILLER 1900
KILLER 06 066F 00000E00 00008023
>*DISC
>*SAVE KILLER 1900+066F 8023 0E00
>*TAPE
>*LOAD GORILLA 1900
GORILLA 2B 2C00 0000D00 00003807
>*DISC
>*SAVE GORILLA 1900+2C00 380 0D00

This method will transfer both programs from tape to disc without corrupting them in any way. The first program is written in relocatable BASIC and can be CHAINed with PAGE = &1900. When the first program tries to *RUN the second it fails because the first program tries to load the second into the workspace of the disc filing system. The second program can be modified with the relocator as shown below.

>*ROM
>LOAD"RELOC"
>*DISC
>RUN

1 = *RUN
2 = *LOAD
3 = CHAIN
4 = LOAD

Choose l-4 1

Temporary LOAD address &1900
Original LOAD address &D00
Length of file &2C00
Execute address &3807
Filename? GORILLA
*TAPE on (Y/N) Y

All OK? (Y/N) Y
>

Using this method to modify the second program enables the first program to load it into a safe area of memory and run it in the original area. To halt the program press <BREAK> and type *RESET BEEB

As well as the use described above the program can be used to relocate programs without running them and to *RUN BASIC programs.

The second program stored in the RFS is ROMCOPY.

ROMCOPY is used to examine and/or save roms onto either disc or tape. ROMCOPY presents the user with a menu of the roms fitted to the computer. Selecting a rom from the menu will display a paged

hexadecimal and ASCII dump of the contents of the rom which will be displayed until <ESCAPE> is pressed. The user is then asked if he or she wants to save the rom to the currently active filing system.

An example of the screen output of ROMCOPY is shown below.

>*ROM
>LOAD"ROMCOPY"
>*DISC
>RUN

 0
 1
 2 AID
 3
 4 HELP (*H)
 5
 6
 8
 7
 8 TOOLKIT
 9 DISC DOCTOR
10 CARETAKER
ll WORDWISE-PLUS
12 BASIC
13 Slogger DDOS
14 LX-80 Toolkit
15

Which ROM (0-15) 14

8000  00 00 00 4C 33 80 82 16 ...L3... 
8008  00 4C 58 2D 38 30 20 54 .LX-80 T 
8010  6F 6F 6C 6B 69 74 00 28 oolkit.( 
8018  43 29 20 47 6F 72 64 6F C).Gordo 
8020  6E 20 48 6F 72 73 69 6E n Horsin 
8028  67 74 6F 6E 20 31 39 38 gton 198 
8030  36 0D 00 48 98 48 8A 48 6..H.H.H 
8038  A9 00 AA A8 20 DA FF C9 .... ... 
8040  05 30 03 4C 41 81 68 AA .0.LA.h. 
8048  68 A8 68 48 C9 03 D0 26 h.hH...& 
8050  98 48 8A 48 A2 09 A0 80 .H.H.... 
8058  20 34 8D 20 E7 FF 20 E7  4. .. . 
8060  FF A9 06 A2 00 A0 00 20 .......  
8068  F4 FF A9 90 A2 FF A0 01 ........ 
8070  20 F4 FF 4C 41 81 C9 09  ..LA... 
8078  D0 45 98 48 8A 48 B1 F2 .E.H.H.. 
<ESCAPE>

Save ROM? (Y/N) Y
Filename? : LX80
Another (Y/N) N
>

An example of the effect of *STRUCTURE

>L.
 10 PROCone
 20 PROCtwo
 30 PROCthree
 40 A%=FNone
 50 B%=FNtwo
 60 C%=FNthree
 70 END
 80 DEFPROCone
 90 D%=E%
100 ENDPROC
110 DEFPROCtwo
l20 F%=G%
l30 ENDPROC
140 DEFPROCthree
150 H%=I%
160 ENDPROC
170 DEFFNone
180 = 1
l90 DEFFNtwo
200 = 2
210 DEFFNthree
220 = 3
>*STRUCTURE
Saved your program (Y/N) Y
>L.
 10 PROCone
 20 PROCtwo
 30 PROCthree
 40 A%=FNone
 50 B%=FNtwo
 60 C%=FNthree
 70 END
100 DEFPROCone
110 D%=E%
120 ENDPROC
200 DEFPROCtwo
210 F%=G%
220 ENDPROC
300 DEFPROCthree
310 H%=I%
320 ENDPROC
400 DEFFNone
410 = 1
500 DEFFNtwo
510 = 2
600 DEFFNthree
610 = 3
>
	
Abbreviations, 2
Alist, 7
Arguments, 2
Appendix, 13
Backspace – see Bkspace
Bkspace, 4
Character set - see UK or USA
Condensed, 4
Cutsheet, 4
Default, 4
Disable rom - see Killrom
Double size, 4
Draft, 4
Econet, 3
Elite, 4
Emphasized, 4
Enlarged, 4
Find - see Lookfor
Funkeys, 8
Format - see Alist
FX, 2
Help menu, 1
Initialise - see Default
Italic, 5
Index, 14
Justify, 5
Killrom, 8
Lock, 8
Lookfor, 8
Memory usage, 2
Nameroms, 9
Near letter quality - see NLQ
NLQ, 5
Operating system, 2
Pica, 5
Pound, 5
Reloc, 10-11
Reset, 9
Renumber - see Structure
Romcopy, 11-12
Rom filing system, 10
Rom names – see Nameroms
Rom priority, 2
Structure, 9
Shadow mode, 2
Subscript, 5
Superscript, 6
Syntax errors, 2
UK character set, 6
Underline, 6
Unlock, 9
USA character set, 6
Wordwise, 2, 8