Keywords
by Glyn Kendall
from Your Computer, June 1984


Keyword
Glyn Kendall, Streatham, London SW16

HAVING RECENTLY obtained a proper keyboard for the Spectrum that did
not have the legends printed on the keys, and disliking the idea of
painting them on, I set about writing a routine to enable the keywords
to be typed in letter by letter. This may seem a retrograde step, but
using the multi-shifted Spectrum I find myself chanting things like
Symbol Shift Caps Symbol Shift x to get INK up on the screen.

The routine is not interrupt driven so will not tie up computing time;
in fact it comes into operation between the time you press enter and
the ROM's syntax checker gets at it. The working section consists of
223 bytes so you only lose about 230 bytes from BASIC.

Enter the program and RUN it; the checks will catch most of the errors
and print what line they occurred in. When correct the Program will go
into a loop and save itself in case of any undetected errors. When you
are satisfied that you have saved enough copies break into the program
and NEW it. Then enter:
	RAND USR 31274
This will put the code in the right place and turn it on. Press ENTER
and you should have a different cursor. If not or the program crashes
then load BASIC again and carefully check it against the listing. If
it is OK then ENTER the header. This must be entered as listed -
except for the colour statements - or the computer will crash.
SAVE "KEYWORD" LINE 1: SAVE "START" CODE 23300,51: SAVE "MAIN" CODE 23760,224
This will be the working copy so save it a few times. You can now
delete the header.

START is put in the printer buffer because it is only needed once, so
you can wipe it out if you want. Do not call START more than once as
it reserves memory for MAIN each time it is used. To turn it off
	POKE 23736,168: POKE 23737,16
To turn it back on
	POKE 23736,208: POKE 23737,92
It is safer if you put these commands on a single line separated by a
colon. In fact I insist that you do. Note that the address of a line 1
REM is no longer 23760.

Using Keyword: The editor will search for keywords in capitals
followed by a space or in certain circumstances non-capitals; i.e.,
numeric. If in doubt put a space. Single words like RUN or LIST can be
entered direct - no space. E mode and Graphics mode are recognised as
is Symbol Shift, Caps etc. The only thing missing is the K mode.
Anything in quotes is ignored but a REM line is not. This should not
matter as the computer will jump it anyway. Do not forget that words
like GOTO and GOSUB need spaces in them to be recognised.
