Long scrolly on an unexpanded machine
Re: Long scrolly on an unexpanded machine
Hi Andy,
I tried some REM techniques in my second attempt. I'll do more experimenting.
Thanks,
Shaun
I tried some REM techniques in my second attempt. I'll do more experimenting.
Thanks,
Shaun
Re: Long scrolly on an unexpanded machine
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
Thanks Dr Beep!
Regards,
Shaun
- Attachments
-
- S6.P
- Nearly there
- (535 Bytes) Downloaded 220 times
-
- S5.P
- (532 Bytes) Downloaded 204 times
-
- S4.P
- 262 chars
- (516 Bytes) Downloaded 207 times
Last edited by Shaun_B on Mon Aug 07, 2017 9:44 pm, edited 2 times in total.
Re: Long scrolly on an unexpanded machine
306 characters, almost perfect scrolly routines. See attached!
Regards,
Shaun
Regards,
Shaun
- Attachments
-
- S7.p
- 306 characters
- (632 Bytes) Downloaded 197 times
Re: Long scrolly on an unexpanded machine
My work here is done - 322 char scrolly, unexpanded ZX81, BASIC driven.
Here is the scroller routine:
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.
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"
Regards,
Shaun.
- Attachments
-
- SF.p
- 322 chars
- (644 Bytes) Downloaded 185 times
Re: Long scrolly on an unexpanded machine
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
Cool, thanks for the improvements to the listing. Extra 13 characters potential is excellent.
Regards,
Shaun
Regards,
Shaun
Re: Long scrolly on an unexpanded machine
With some POKEing of the RAMs, could the GOTO SGN PI become CONT? I'll give it a go.
Regards,
Shaun.
Regards,
Shaun.
Re: Long scrolly on an unexpanded machine
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
Code: Select all
10 SAVE "S"
11 CONT
Thanks,
Shaun