scene.org File Archive

File download

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

File size:
197 494 bytes (192.87K)
File date:
2025-12-30 23:34:07
Download count:
all-time: 1

Screenshot (by Demozoo)

Screenshot

Preview

  • serato_ZX_Spectrum_asm_36b_vc3-2025/file_id.diz 1.15K
  • serato_ZX_Spectrum_asm_36b_vc3-2025/flake-asm.txt 1.93K
  • serato_ZX_Spectrum_asm_36b_vc3-2025/flake.asm 1.17K
  • serato_ZX_Spectrum_asm_36b_vc3-2025/result.png 12.99K
  • serato_ZX_Spectrum_asm_36b_vc3-2025/source.png 193.88K

file_id.diz

36 byte Snowflake in Assembler

Author: Serato / Finnish Gold
Category: Christmas Challenge
System:   ZX Spectrum
Language: Z80 Assembler
Len source code: 1196
Len exe file:   
Len code only:   36
Instructions:
Assemble, load, and start with LIST USR 30474
Techniques that save bytes:
- Simple iteration, no subroutines
- Program flow automatically renders the central + (no cost)
- Only draws stars (not spaces) so no character code calculation
- Start address of $7709 is in BC, loaded to HL in 2 bytes
- aligns bitmap bytes at $7700 + col, so L is also column number
- H = %01110111, so an 8-bit rotate sets C to 0 every 4th time
- Modifies the bitmap in place so no need to keep value in register
- branch on carry set is both conditional plot and also rotation loop exit flag 
More detail:
This routine draws the pattern from the inside out, by first drawing the stars 
that form the + and then right shifting bits out of the bitmap from preceding 
bytes one at a time. The first iteration plots the bitmap along the same row and
column as the + so the contents of the pattern byte do not matter. This bit
shifting is done in place turning each byte of the bitmap to 0.