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 changing 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. [I've omitted this last

feature, which is less than helpful under emulation.] When

you are satisfied that you have saved enough copies break

into the program and New it. Then enter

        RANDOMIZE 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. [Amusingly,

this header was not listed with the article at all! The

text below made it possible to create one which works,

though.]

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 [sic!] and Gosub [sic!!] need spaces 

[Sic!!! Did Your Computer's editors ever even *read* the

text they "corrected"?] in them to be recognised.

  [A few notes. The TZX contains first the (reconstructed)

header and machine code, and then the machine code loader.

You should not need the latter, but you could, if you want,

load the system from it. Finally, the system does not work

with the Interface 1 attached. It clobbers all over the

Microdrive maps and related areas.]