snowflake (6502) 1.0
Author: David Payne
Category: Christmas Challenge 2025
System: BBC Micro
Language: 6502 assembly language
Len source code: 529 bytes
Len exe file: 64 bytes
Len code only: 64 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 *RUN 6502
Description:
The snowflake is mostly encoded as bits in 9 bytes of data. This is possible due to the symmetry.
the algorithm is along the lines of:
data = [73,146,4,9,114,48,81,2,0]
dir = -1
x = 9
repeat
for y = -9 to 9
if x = 0 or y = 0 then
print "*";
else
i = abs(y)
a = data[x-1]
repeat
LSR a
i = i - 1
until i = 0
if carry flag is set then
print "*";
else
print " ";
end if
end if
next y
print
x = x + dir
if x = 0 then dir = 1
until x = 10
Comments:
It was a bit trickier this year, but still fun. Thanks to Logiker for running this contest again.