scene.org File Archive

File download

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

File size:
114 745 bytes (112.06K)
File date:
2025-12-30 23:34:07
Download count:
all-time: 1

Preview

  • CODE.png 69.11K
  • file_id.diz 1.28K
  • RESULT.png 47.60K
  • SOURCE.txt 560B
  • VCCC25.ssd 200.00K

file_id.diz

snowflake (65C02) 1.0

Author: David Payne
Category: Christmas Challenge 2025
System: BBC Master 128
Language: 65C02 assembly language
Len source code: 522 bytes
Len exe file: 62 bytes
Len code only: 62 bytes
Instructions:
Save the VCCC25.ssd file on your local PC
From the https://bbc.xania.org/?model=Master website
click on Discs
From examples or local
Choose file
select the saved VCCC25.ssd file
enter *RUN 65C02

Description:
The same as the BBC Micro 6502 version but replacing:
CLC
ADC #1

with the 65C02 instruction:
INC A

which saves 2 bytes.

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.