WRITING AIDS
Julian Wood, Downham Market, Norfolk
from Your Computer, June 1983

THE FOLLOWING machine-code routines are a great aid to the BASIC programmer
writing and developing programs. The explanation of how to enter and use each
routine refers to the listings of the relevant BASIC program which POKEs the
machine code into memory.

First a Line Block Delete: Enter a line 1 REM followed by 96 characters
and then:
	POKE 23756,0
which changes it to line 0, so it cannot be deleted. Enter the rest of the
program and RUN 10, and the routine will he POKEd into line 0. To delete the
now unwanted data, RUN the program and enter 10 and then 77 for the inputs.
If all is successful you should find that lines 10 to 77 have been deleted,
leaving the delete program which can be SAVEd as a normal program.

Next, a Utilities program. Enter it and RUN it, and the machine code will be
POKEd in above RAMTOP, and can be SAVEd using:
	SAVE "util" CODE 32416,184
When loading back, it is necessary to CLEAR 32415 beforehand. The subroutines
are as follows:

	ATTR CHANGE
To use this, you simply have to use the normal BASIC colour commands and then
RANDOMIZE USR 32416. For example:
	FOR a=32 TO 255: PRINT CHR$ a;: NEXT a:
	PAPER 1: INK 6: FLASH 1: RANDOMIZE USR 32416
prints the character set, and then sets the whole screen flashing with blue
paper and yellow ink without clearing the screen.

	SEARCH AND REPLACE
Replaces any specified character with another character. POKE 32435 with the
search character code and 32437 with the replace character code. For example,
to change all the PRINT commands to LPRINT:
	POKE 32435,245: POKE 32437,224: RANDOMIZE USR 32434

The next Utilities subroutine is:
	SCREEN$
This differs from the one in ROM as it works with the pre-defined graphics and
the user defined graphics, as well as the normal ASCII characters. To use it,
PRINT AT the position on the screen you wish to check and call the routine.
For example:
	PRINT AT 10,10;: LET L=USR 32477
will give the code of the character at position 10,10. If there is no such
character, then L will equal zero.
