TEXTPRO
by Julian Ossowski
from Your Computer, June 1984


[NOTE: In the archive, TEXTPRO.P is the master program and SLAVE.P]
[is the slave program, as mentioned in the text below.  To use the]
[program, load TEXTPRO, follow the instructions, and enter SLAVE  ]
[when prompted for a file name at the bottom of the screen.   JimG]


TEXT EDITOR

An "electronic notepad", which is easily updated
with 12 "pages" - Julian Ossowski explains.


BEING BORED with zapping space invaders, I decided to sit down and
write a really useful ZX-81 program, and 'Textpro' was what I came up
with. The program is essentially an electronic notepad, allowing
access to an infinite number of screens which can easily be updated at
any time. The program has the following features:

* Instant access to 12 "pages" stored in memory;
* Saving of pages on tape;
* Editor to write and update pages;
* Help page;
* Two display formats;
* Print function allowing pages to be dumped onto a printer;
* Scroll function for advertising displays etc.

Now onto the program itself. It is largely in Z-80 machine code, and
has two parts, the first sets up the machine code, and then loads the
second, which is the "slave" program used for storing pages on tape.

Type:
	POKE 16389,80
and then NEW, now type in listing 2 and RUN it and so load in the
machine code.

Now type NEW and create REM lines 1-16, each 96 characters long -
excluding the REM - then type:
	POKE 16511,92
	POKE 16512,6
to make one long line, then type:
	POKE 16510,0
to prevent it from being edited and:
	POKE 16514,118
	POKE 16515,118
to prevent it from being listed. Now type:
	RAND USR 21658
to down load the machine code and save the REM statement just in case
something happens. Now type in the rest of listing 4, start the tape
recorder on record and type run.

Type NEW and type in listing 3, save it just in case, and then RUN it.


Command and Edit modes

Now load listing 4 from tape, add line 10 RAND USR 16962 and RUN it
after setting your tape recorder to record. This is now the complete
master program. Now Break out of it.

Type NEW, type in listing 1, RUN it, if all is well a message should
appear, press "S", type
	SLAVE
between the quotes, and then follow the instructions after pressing
newline. This is the complete slave program.

There are two modes, Command and Edit. If you are ever stuck, and you
are in Command mode, then if you press H you will get the help page.
So after following the procedures above you will have just saved a
blank page and you will be back in Command mode so if you press H you
will get the help page, which will tell you how to use the system. If
you want to type something, you have to go into Edit mode. To do this
press shifted one, and a cursor and a message will appear. This editor
is very much like the 81's editor in that you can move the cursor
around with shifted 5, 6, 7 and 8 and you can also use rubout.

You can store a page in memory by pressing M and then location 0 to 9
- there are two other pages which you can use for temporarily storing
pages in: A and B. Retrieving pages is by pressing R and then the page
you want - 0 to B. If you select a page other than 0 to B you will
return to Command mode.

To save a page press S and then enter the file name, and follow the
instructions. It is a good idea to save the page in memory first in
case you cause an input error; eg. rubbing out a quote gives an error.

To load a page, press J and then type the file name - if you do not
know this, then just press newline.

If you press B you will scroll through all 12 pages at a moderate
rate. If, however, you press any key then they will whizz past your
face and you will return to Command mode.

There are a few bytes of system variables in front of the main machine
code, one of them being SYSP - the current page number - which is
mentioned in the listings.
