Who is up for a 1K BASIC challenge?

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

Who is up for a 1K BASIC challenge?

Post by Shaun_B »

I thought it'd be fun to post your 1K listings here - I made my bouncy scrolly text work in 1K, as follows:

Code: Select all

    3 LET Y=Y+X
    4 IF NOT Y OR Y>PI+PI THEN LET X=-X
    5 PRINT AT Y,NOT PI;S$;A$( TO CODE "4");S$
    6 LET A$=A$(VAL "2" TO )+A$(SGN PI)
    7 GOTO PI
 9998 SAVE "1K"
 9999 GOTO SGN PI
A$ is used for the scrolly text string; to save byte, enter this in direct mode, like:

Code: Select all

 LET A$="MERRY CHRISTMAS TO ALL WWW.SINCLAIRZXWORLD.COM FREQUENTERS :-)   "
I have tested up to 67 characters and I'm sure more will be possible.

You will also need the S$ variable to clear the scrolly text above and below as it moves. Again, using direct mode, type:

Code: Select all

 LET S$="                                "
Finally, set and X and Y variables:

Code: Select all

 LET Y=SGN PI
 LET X=Y
When you're happy, type GOTO 9998 and we're all good.

Regards,

Shaun.
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

Re: Who is up for a 1K BASIC challenge?

Post by Shaun_B »

I was thinking about having a snowfall-type effect, does anyone think this is possible on the unexpanded machine?

Thanks,

Shaun.
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

Re: Who is up for a 1K BASIC challenge?

Post by Shaun_B »

Here's my starter for 10... supposedly a snow-fall type effect. Maybe not.
Edit: new revision here -
SNOW.P
(422 Bytes) Downloaded 269 times
Will anyone do better?

Regards,

Shaun.
Attachments
SNOW.P
(369 Bytes) Downloaded 243 times
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Who is up for a 1K BASIC challenge?

Post by dr beep »

I will skip the BASIC since I can do much more in 1K in machinecode.
Even some kind of pixelwise snowingeffect in hires.
(See facebook my firework demo, the routine could be used for snoweffect too)
vwbz80a
Posts: 31
Joined: Wed Nov 29, 2017 2:35 pm

Re: Who is up for a 1K BASIC challenge?

Post by vwbz80a »

Shaun_B wrote: Sun Dec 24, 2017 10:41 pm Here's my starter for 10... supposedly a snow-fall type effect. Maybe not.
Edit: new revision here - SNOW.P
Will anyone do better?

Regards,

Shaun.
later than you think----- just now---- got it running in emu yea
:D :D :D :D
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: Who is up for a 1K BASIC challenge?

Post by PokeMon »

Hmm why not let rain sausages ? :lol:
vwbz80a
Posts: 31
Joined: Wed Nov 29, 2017 2:35 pm

Re: Who is up for a 1K BASIC challenge?

Post by vwbz80a »

PokeMon wrote: Wed Jan 31, 2018 10:23 am Hmm why not let rain sausages ? :lol:
:lol:
Post Reply