Search found 449 matches

by Shaun_B
Mon Jan 14, 2019 8:45 am
Forum: ZX BASIC
Topic: Determine a Finonacci number
Replies: 2
Views: 765

Re: Determine a Finonacci number

Hi Moggy,

I see what you've done there. Thanks for the hints.

Shaun.
by Shaun_B
Sat Jan 12, 2019 11:15 pm
Forum: ZX BASIC
Topic: Determine a Finonacci number
Replies: 2
Views: 765

Determine a Finonacci number

Hi all, The following BASIC program will tell you whether or not the number you have entered is in the Fibonacci number sequence, printing 1 for true and zero for false. It should allow you to work out the first 50 or so Fibanacci numbers in the sequence. Tested with normal ROM and ZX81 ROMx2 on an ...
by Shaun_B
Thu Jan 10, 2019 10:08 pm
Forum: ZX BASIC
Topic: Random maze generator.
Replies: 9
Views: 2183

Re: Random maze generator.

You can save more BASIC bytes like this:

Change line 7 to:

Code: Select all

   7 CONT
Then add in the following line:

Code: Select all

   2 STOP
Now RUN the program, remove line 2 and then enter the CONT command. Hey presto, another BASIC token saved!

Regards,

Shaun.
by Shaun_B
Mon Jan 07, 2019 9:52 pm
Forum: ZX BASIC
Topic: Random maze generator.
Replies: 9
Views: 2183

Re: Random maze generator.

Here's an infinitely scrolling random maze, requires 2K or more
random-maze.png
random-maze.png (1.87 KiB) Viewed 661 times
For a 1K ZX81, change line 4 to:

Code: Select all

   4 FOR N=SGN PI TO CODE "3"
Regards,

Shaun.
by Shaun_B
Sat Jan 05, 2019 6:39 pm
Forum: ZX BASIC
Topic: Chase the Ace (not a card game)
Replies: 0
Views: 410

Chase the Ace (not a card game)

Here's a new game for the unexpanded ZX81 and TS1000:

https://cgc.source.run/entries.html#chase-the-ace

It's a not real entry into the CGC 2018 which has an extended deadline.

Regards,

Shaun.
by Shaun_B
Sat Jan 05, 2019 11:59 am
Forum: ZX BASIC
Topic: 1k bouncing ball
Replies: 2
Views: 207

1k bouncing ball

Here's a 1k bouncing ball demo using some useful memory saving techniques. 2 SAVE "B" 3 CLS 4 PLOT X,Y 5 LET X=X+A 6 LET Y=Y+B 7 IF Y>=CODE "F" OR NOT Y THEN LET B=-B 8 IF X>=CODE "Z" OR NOT X THEN LET A=-A 9 GOTO PI In direct mode, enter LET X=NOT PI LET Y=X LET A=NOT X LET B=NOT Y GOTO 2 Regards, ...
by Shaun_B
Thu Jan 03, 2019 8:37 pm
Forum: ZX BASIC
Topic: Happy New Year MMXIX
Replies: 1
Views: 170

Happy New Year MMXIX

Hi,

Here's a little scrolly to wish you all a Happy New Year. This version is programmed with the fantastic ZX81x2 ROM to show the improvements with the PAUSE command.

Regards,

Shaun.
by Shaun_B
Thu Jan 03, 2019 2:24 pm
Forum: Software
Topic: 2k adventure
Replies: 26
Views: 2005

Re: 2k adventure

1 LET R=PI/PI 5 LET L=NOT R 10 LET Q=NOT PI/PI 20 PRINT ,,("YOU ARE IN A CAVE." AND R=1);(" IN THE CAVE IS A LAMP" AND NOT L AND R=1);(" LAMP TAKEN, YOU CAN NOW SEE FURTHER." AND L=1 AND R=1);(" THE CAVE IS NOW BRIGHT AND YOU CAN SEE THE TREASURE I THE DISTANCE" AND L=1 AND R=1);("TRAP SPRUNG. YOU ...
by Shaun_B
Thu Jan 03, 2019 10:24 am
Forum: Software
Topic: TODOS - a to do list generator for the ZX81
Replies: 0
Views: 403

TODOS - a to do list generator for the ZX81

J. D. Smith entered a to do list generator for the 2018 Crap Games Competition, it's available here:

https://cgc.source.run/entries.html#todos

Regards,

Shaun.
by Shaun_B
Wed Dec 12, 2018 10:52 pm
Forum: ZX BASIC
Topic: ZX Basic vs Commodore V2.00 (Vic 20)
Replies: 24
Views: 2308

Re: ZX Basic vs Commodore V2.00 (Vic 20)

Not sure what you're driving at but no GOSUB or GOTO is required when defining a function within a string or its later evaluation. IE.. 10 INPUT A 20 INPUT B 30 INPUT X 40 LET Z$="A*B/SIN X" 50 PRINT VAL Z$ Functioned defined within Z$ and evaluated in line 50 using the variables previously input a...