Moving the margins on the screen

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
Posts: 440
Joined: Wed Apr 22, 2009 10:22 am

Moving the margins on the screen

Post by Shaun_B » Wed Jan 24, 2018 10:42 pm

I've noticed that it's fairly easy to generate 33 or 34 column text on the ZX81, so let's say I want 34 x 24 text display, is it possible to move the screen position left one character to compensate?

Also, if I wanted, say, 30 X 25 text (if that's possible), could I move the screen right and up easily enough?

Are there any assembly tricks to do such wizardry?



dr beep
Posts: 1127
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Moving the margins on the screen

Post by dr beep » Thu Jan 25, 2018 11:38 am

Count the columns in my game AIRPIPES and you have the answer.
You can move the text by a column when you alter the value in A just before calling the print from the ROM.

Since the ZX81 can handle less than 32 bytes (compressed screen) it can also handle more by just making a screen wirh more columns.
As for more textlines than 24: just increase the B-register.

However: the ROM will reset the screen to 32x24 when you use CLS, so this must be avoided ( make your own CLS).
The best way to use this all is in MC, so do not return to BASIC anymore.

User avatar
Posts: 875
Joined: Thu May 08, 2008 9:30 am
Location: Dauernheim, Germany

Re: Moving the margins on the screen

Post by siggi » Thu Jan 25, 2018 3:57 pm

My ZX81 web-server: online since 2007

Post Reply