NEWSMONGER
by Frans Zijm
from Your Computer, February 1985

Hear the latest from Frans Zijm and his ZX-81.


NEWSMONGER IS a menu-driven program for the ZX-81 16K to show a text
in giant letters. The menu has nine options:
* Character size 8 by 8.
* Character size 16 by 16.
* Character size 16 by 24.
* User-defined graphics.
* Fill character.
* Speed.
* Input text.
* TOP line number.
* Save.

The almost entirely Basic program uses a machine-code routine held in
line 0. The machine code is only 576 bytes long. The text may contain
unshifted characters, inverse - shifted - function - and graphics.

The function characters plus the shifted character H represent the
lower case characters. The shifted characters A, S, D, F, G, W, E, R,
T, Y, 2, 3 and 4 are reserved for user defined graphics - UDGs. You
can define eg., the character "!" and its inverse, which do not belong
to the standard character Set. When you don't like the lower case
character set, you are also able to alter this.

In total you have 26 + 13 UDGs. You can't alter the "shifted"
character Q because this character is used in string input. When you
are not familiar with UDGs, read the article in Your Computer April
1984.

The data of the standard ZX-81 character set begins in the ROM at
address $1E00 (7680 dec.) and ends at address $1FFF (8191 dec.) Only
the data of the characters with codes 0-63 are in the ROM.

The data of the UDGs begin at address 16760; it starts with the data
of the "shifted" character Q - code 192. Then the data of the
"function" characters with codes 193-215, followed by the "shifted"
characters with codes 216-229. The data of the "function" characters
M, B and T with codes 64-66 are placed after the "shifted" characters.

You have the option to alter the fill character of the giant letters,
the speed and the top line number. The fill character can be an
"unshifted" character, an inverse, or a graphic. Address 16690 holds
the code.

	PEEK (16751)/2-1
gives you the speed on a scale 0-9; 0 is fast, 9 is slow. 5 is the
most "readable" speed. The top line number can vary for option 1 from
1-17, for option 2 from 1-9 and for option 3 the top line number will
be 1. The program checks for invalid values.

There are different ways to save text. First you can run the program
and enter your text in option 7:
	"TEXT" N/L
Z$ holds your text. Returning to option 7 and typing new text, the old
text is rubbed out. To prevent the loss of the old string variable Z$,
you have to break out during input mode by rubbing out the first quote
and then press "shifted" A N/L. Then you type:
	LET A$=Z$ N/L
and the old text is saved in the variables area. You return to the
Basic program by typing:
	GOTO 0 N/L
Do not use the command RUN because this command will also clear the
variables area, and that is what you don't want!

Second: you can break out during input mode to enter different string
variables. You can use the string variables A$-x$ and sub- scripted
string variables with no limitations.


You can rub out the quotes

Do not use Y$ and Z$ because the program uses these string variables.
You can type; eg.:
	LET A$="TEXT" N/L
	LET B$="TEXT" N/L
	DIM A$(10,10) N/L
	LET A$(1)="TEXT" N/L
You return to the menu by typing:
	GO TO 0 N/L
When you return to option 7, you can rub out the quotes and type; eg.:
	A$+B$ N/L
strings which you have entered before. Z$ holds then
	A$+B$
You can also type: "TEXT", jump over the quote and type:
	+A$ N/L
Z$ holds then
	"TEXT"+A$

When you want to save on tape the string variables or your UDGs,
option 9 gives you the opportunity. After typing: 9 N/L during menu
mode, the program waits for pressing a key. It gives you the time to
set up the tape recorder.

When you want to break out of the machine code routine during option
1-3, just press a key a while. It is advisable not to use the "break"
key because then you also break out of the Basic program. Then it is a
habit to type: RUN N/L, but then you will clear the variables area.
Use always the command GOTO 0, and you will get the menu again with
the variables still present.

Before you can enter the machine code, you have to make a line with a
REM containing at least 576 bytes. To create this Rem first enter line
1 with a Rem containing 91 dots. Check the number with:
	PEEK (16511)+PEEK (16512)*256
The number must be 93:
	REM + 91 dots + N/L
Then using the Edit alter the line number so that you have 6 lines
with 91 dots. Then type:
	POKE 16514,118 N/L
	POKE 16515,118 N/L
	POKE 16510,0 N/L
	POKE 16511,66 N/L
and you have created line 0 with a Rem containing 567 bytes.
	PEEK(16514+576)
must be 118, check this! Then enter the Basic program hexload. The
start address is 16514, the end address 17089. Save the program on tape
after entering the hexadecimal numbers. Then enter:
	LET Z$="TEXT" N/L
	LET L=USR 16524 N/L
and the program should run. Pressing a key a while will bring you back
to Basic. When the program doesn't work, check the addresses
16514-17089.
