Page 2 of 2
Re: Long scrolly on an unexpanded machine
Posted: Mon Aug 07, 2017 8:14 pm
by Shaun_B
Hi Andy,
I tried some REM techniques in my second attempt. I'll do more experimenting.
Thanks,
Shaun
Re: Long scrolly on an unexpanded machine
Posted: Mon Aug 07, 2017 8:30 pm
by Shaun_B
Latest version has 262 characters, attached. S5.P has 264 characters and better logic, S6.P is almost complete logic I think... nearly there.
Thanks Dr Beep!
Regards,
Shaun
Re: Long scrolly on an unexpanded machine
Posted: Mon Aug 07, 2017 9:21 pm
by dr beep
Shaun_B wrote: ↑Mon Aug 07, 2017 8:30 pm
Latest version has 262 characters, attached.
Regards,
Shaun
SGN PI=1
NOT PI=0
and shorter than CODE " "
Re: Long scrolly on an unexpanded machine
Posted: Tue Aug 08, 2017 10:23 pm
by Shaun_B
306 characters, almost perfect scrolly routines. See attached!
Regards,
Shaun
Re: Long scrolly on an unexpanded machine
Posted: Tue Aug 08, 2017 10:53 pm
by Shaun_B
My work here is done - 322 char scrolly, unexpanded ZX81, BASIC driven.
Here is the scroller routine:
Code: Select all
1 LET X=SGN PI
2 LET Y=CODE "3"
3 LET Z=Y
4 PRINT AT NOT PI,Z+NOT PI;A$(X TO(X+Y)-Z)
5 LET Y=Y-(X+Y>=LEN A$)
6 IF NOT Y THEN GOTO SGN PI
7 LET X=X+(SGN PI*(Z<=NOT PI))
8 LET Z=Z-(SGN PI*(Z>NOT PI))
9 GOTO VAL "4"
Remember to enter the A$ string in direct mode to save bytes; type GOTO 1 to test and run. Because of a slight imperfection, leave at least two white spaces at the end of your message. Should easily allow for another half a Twitter of text above the 322 chars achieved if you're careful enough.
Regards,
Shaun.
Re: Long scrolly on an unexpanded machine
Posted: Fri Aug 25, 2017 5:37 pm
by SafePit
Pretty cool. Runs well too. You can get a few more bytes (15 by my count) out of it. I dropped unneeded parens and removed +NOT PI on line 4. I found you don't need the SGN PI*() in lines 7 and 8. Flipping lines 5 and 6 lets you drop a space from A$ which gives you another byte. Allows you to add 16 more characters to A$.
Code: Select all
1 LET X=SGN PI
2 LET Y=CODE "3"
3 LET Z=Y
4 PRINT AT NOT PI,Z;A$(X TO X+Y-Z)
5 IF NOT Y THEN GOTO SGN PI
6 LET Y=Y-(X+Y>=LEN A$)
7 LET X=X+(Z<=NOT PI)
8 LET Z=Z-(Z>NOT PI)
9 GOTO VAL "4"
Re: Long scrolly on an unexpanded machine
Posted: Fri Aug 25, 2017 8:51 pm
by Shaun_B
Cool, thanks for the improvements to the listing. Extra 13 characters potential is excellent.
Regards,
Shaun
Re: Long scrolly on an unexpanded machine
Posted: Fri Aug 25, 2017 8:54 pm
by Shaun_B
With some POKEing of the RAMs, could the GOTO SGN PI become CONT? I'll give it a go.
Regards,
Shaun.
Re: Long scrolly on an unexpanded machine
Posted: Fri Aug 25, 2017 9:47 pm
by Shaun_B
The CONT command can be used in the SAVE routine, like:
As for replacing GOTO with CONT in place of GOTO SGN PI, not sure yet.
Thanks,
Shaun