Increase screen size to 24 rows

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
alowe
Posts: 19
Joined: Sun Aug 26, 2012 2:58 pm

Increase screen size to 24 rows

Post by alowe »

I used to be able to do this but have forgotten how to (laptop got stolen with all my work on it :cry:).

The thread: Setting the screen size in BASIC does NOT provide the answer. After 2 days of searching I still haven't found the answer.

All I want to do is extend the printable rows to include the two below the default limit of 22 used for error codes and input. My program doesn't give out error codes and I manage my own input so these lines are unutilised space.

I don't need to expand the rest of the border beyond the default, just want those two rows back.

Can someone with a better ZX81 brain please tell me what's probably obvious to them. I don't program assembly but can follow any instructions that involve BASIC code. For example, the thread: Disable and Enable BREAK at will is an excellent example of clear instructions that work.
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Increase screen size to 24 rows

Post by 1024MAK »

Is this what you mean?

Code: Select all

10 LET P=16418
20 PRINT PEEK P
30 POKE P,0
40 FOR A=20 TO 23
50 PRINT AT A,0;A;
60 NEXT A
70 IF INKEY$=“” THEN GOTO 70
80 POKE P,2
Listing
Listing
Output
Output
The POKE to 16418 is the DF_SZ system variable that sets the number of editing/report lines in the lower screen. See here ;-)

Beware, always save programs that mess with system variables like the example above. Because if an error occurs and BASIC gets confused, it’s possible that a crash may occur.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
alowe
Posts: 19
Joined: Sun Aug 26, 2012 2:58 pm

Re: Increase screen size to 24 rows

Post by alowe »

Thankyou. Your answer is simpler than my question. :D

And I like how it pokes 2 back into DF_SZ to return to default before the program ends. Nice.

I should read the manual but just use it for reference cause my memory is so poor these days, even if I read a page, it's lost before I get to the next one. But I really should have known about DF_SZ.

Thankyou for letting me (and anyone who didn't already) know. <3
Post Reply