scene.org File Archive

File download

<root>­/­parties­/­2025­/­vccc25­/­christmas_challenge/dpayne_bbcmicro_bbcbasic_70b_vc3-2025.zip

File size:
81 061 bytes (79.16K)
File date:
2025-12-30 23:34:07
Download count:
all-time: 1

Screenshot (by Demozoo)

Screenshot

Preview

  • CODE.png 34.53K
  • file_id.diz 1.95K
  • RESULT.png 47.24K
  • SOURCE.txt 108B
  • VCCC25.ssd 200.00K

file_id.diz

snowflake (BASIC) 1.2

Author: David Payne
Category: Christmas Challenge 2025
System: BBC Micro
Language: BBC BASIC
Len source code: 70 bytes
Len exe file: 70 bytes
Len code only: 70 bytes
Instructions:
Save the VCCC25.ssd file on your local PC
From the https://bbc.xania.org website
click on Discs
From examples or local
Choose file
select the saved VCCC25.ssd file
enter CHAIN"PROGRAM"

Description:
the program is simply:
for y = -9 to 9
   for x = -9 to 9
      if expression then print "*"; else print " ";
   next x
   print
next y

I realised that abs(x)*abs(y) is the key to it all due to the 8-fold symmetry. The 1st term looks
complex but it simply checks whether abs(x)*abs(y) is equal to 0 or 4 or 7 or 10 or 16 or 30 or 35.

the expression is comprised of 2 terms, when they are ORed together they give the whole snowflake.

INSTR(" $'*0>C",CHR$(ABSx*ABSy+32))>0 gives:
.........*.........
.......*.*.*.......
....*...***...*....
....*....*....*....
..**...*.*.*...**..
.....*..***..*.....
.........*.........
.*..*..*.*.*..*..*.
..*..*...*...*..*..
*******************
..*..*...*...*..*..
.*..*..*.*.*..*..*.
.........*.........
.....*..***..*.....
..**...*.*.*...**..
....*....*....*....
....*...***...*....
.......*.*.*.......
.........*.........

ABSxMOD9MOD8=ABSy gives:
...................
...................
..*.............*..
...*...........*...
....*.........*....
.....*.......*.....
......*.....*......
.......*...*.......
........*.*........
**.......*.......**
........*.*........
.......*...*.......
......*.....*......
.....*.......*.....
....*.........*....
...*...........*...
..*.............*..
...................
...................

Comments:
To type this program in manually, press shift F3 instead of typing in MOD. This saves 1 space that
would normally be required before the MOD.

It was a bit trickier this year, but still fun. Thanks to Logiker for running this contest again.