ZX ideas - Enlarging Text and Suppressing Errors When Outputting Data in BASIC

ZX Revija #01

Tricks for Enlarging the Font and Suppressing Errors When Outputting Data in BASIC

ZX Ideas

We received a contribution for this section from:

KESER MLADEN-DADO
Video klub TV BAJT
Banja Luka

Messages from BASIC

Many people have put their own messages in BASIC!

Those who don’t know machine code put messages in ordinary SPECTRUM letters. They usually think it’s impossible to write letters in BASIC that are five times larger than normal. I’ll prove that this isn’t quite true, and that BASIC should never be underestimated. This listing lets you enlarge your messages in BASIC fivefold.

10 FOR f=72 TO 79:POKE 23681,f:LPRINT CRACKED by DADO :NEXT f

You don’t need to type a space before the letters you put after the LPRINT command. The message can be 32 characters long. You can change the numbers 72 and 79 to these pairs of numbers to get different effects: 64 and 71, 80 and 87.

The next thing we received from MLADEN is a way to make a listing in BASIC of machine code, in decimal form and in CHR$ code, without getting the INVALID COLOUR error! The following listing will look simple, and some of you may wonder (once you’ve typed it in) why the error message doesn’t appear! Here’s the explanation:

The CLEAR 25099 command and the POKE 23613,0 command disable all output from the ROM, so the program keeps running despite errors.

REMEMBER! You’ll be able to list in CHR$ code up to address 27500. The commands mentioned above won’t help you beyond that, because then the ROM takes over again. You can continue the listing without any problems if you remove line 30. The listing will then be in decimal form:

1 REM DECIMAL AND CHR$ LISTING
2 REM WRITTEN by DADO
3 REM VIDEO KLUB TV BAJT
5 CLEAR 25099:POKE 23613,0
10 FOR f=X TO X
20 PRINT f;;PEEK f;
30 PRINT CHR$ PEEK f
40 NEXT f

X is the address you want; just make sure your machine-code program isn’t below address 25100. And now, one more routine from MLADEN.

Type line 5 from the previous listing, then type a REM instruction on line 1, before that line, followed by at least 50 words. Then type LOAD in line 10 and see what effect you get when you press the SPACE key as you start the program.

That’s all from MLADEN for this issue of ZX Revija. For the next issue, he’ll delight you with some machine-code listings!

Share your thoughts about the article