scene.org File Archive

File download

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

File size:
2 104 839 bytes (2.01M)
File date:
2025-12-30 23:34:07
Download count:
all-time: 1

Preview

  • serato_ZX81_asm_36b_vc3-2025/file_id.diz 2.09K
  • serato_ZX81_asm_36b_vc3-2025/flake-asm.txt 2.04K
  • serato_ZX81_asm_36b_vc3-2025/flake.asm 1.20K
  • serato_ZX81_asm_36b_vc3-2025/result.png 20.16K
  • serato_ZX81_asm_36b_vc3-2025/source.png 184.81K
  • serato_ZX81_asm_36b_vc3-2025/stages/ dir
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025/ dir
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025/file_id.diz 2.26K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025/flake-asm.txt 2.19K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025/flake.asm 1.32K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025/flake.bas 521B
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025/result.png 88.19K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025/source.png 205.18K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025b/ dir
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025b/file_id.diz 2.23K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025b/flake-asm.txt 2.13K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025b/flake.asm 1.27K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025b/flake.bas 521B
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025b/flake.p 1.07K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025b/result.png 4.65K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_37b_vc3-2025b/source.png 197.43K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_38b_vc3-2025/ dir
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_38b_vc3-2025/file_id.diz 1.26K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_38b_vc3-2025/flake-asm.txt 2.19K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_38b_vc3-2025/flake.asm 1.32K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_38b_vc3-2025/flake.bas 525B
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_38b_vc3-2025/result.png 88.14K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_38b_vc3-2025/source.png 204.80K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_40b_vc3-2025/ dir
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_40b_vc3-2025/file_id.diz 1.13K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_40b_vc3-2025/flake-asm.txt 2.23K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_40b_vc3-2025/flake.asm 1.34K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_40b_vc3-2025/result.png 87.63K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_40b_vc3-2025/source.png 207.24K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_42b_vc3-2025/ dir
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_42b_vc3-2025/file_id.diz 1.13K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_42b_vc3-2025/flake-asm.txt 2.03K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_42b_vc3-2025/flake.asm 1.36K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_42b_vc3-2025/result.png 88.13K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_42b_vc3-2025/source.png 216.75K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_43b_vc3-2025/ dir
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_43b_vc3-2025/file_id.diz 1.13K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_43b_vc3-2025/flake-asm.txt 2.02K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_43b_vc3-2025/flake.asm 1.42K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_43b_vc3-2025/result.png 88.02K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_43b_vc3-2025/source.png 219.47K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_45b_vc3-2025/ dir
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_45b_vc3-2025/file_id.diz 1.08K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_45b_vc3-2025/flake-asm.txt 2.06K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_45b_vc3-2025/flake.asm 1.39K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_45b_vc3-2025/result.png 87.84K
  • serato_ZX81_asm_36b_vc3-2025/stages/serato_ZX81_asm_45b_vc3-2025/source.png 338.60K

file_id.diz

36 byte Snowflake in Assembler

Author: Serato / Finnish Gold
Category: Christmas Challenge
System:   ZX81
Language: ZX81 Assembler
Len source code: 1231
Len exe file:   
Len code only:   36
Instructions:
Navigate to https://weggetjes.nl/jszeddy/jszeddy.html and paste source into ASM 
notepad and press Assemble. Then enter "1 rand usr 30473" into the BASIC 
notepad and press Compile, then press r(un) enter.
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
- Early exit after plot reaches left column, so no empty bitmap byte needed
- E is unaffected by PRINT AT so used as a sentinel by 8-bit rotate
- Start address of $7709 is in BC, so E can be loaded with $77 in 1 byte
- and also C is initialised to 9
- which also aligns bitmap bytes at $7700 + col, so low byte = C
- 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 
- jp (hl) saves a byte over jr, only possible because of in-place bitmap shift
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. The first byte 
to be consumed is the first instruction "ld e, b" which must only run once. 
The last iteration plots the outermost stars of the + and then immediately exits
before reading a bitmap byte. The code is placed immediately after the bitmap 
and the branch in the code back to start each row is implemented as "jp (hl)".
As HL is the pointer into the bitmap, and the byte pointed to has just been 
zeroed, the branched-to location consists of a string of NOP's preceding the
intended branch destination. "jp (hl)" is a 1-byte instruction, saving a byte 
over the conventional "jr xx".