scene.org File Archive

File download

<root>­/­parties­/­2024­/­vccc24­/­christmas_challenge/serato_c64_asm_45b_vc3-2024.zip

File size:
155 155 bytes (151.52K)
File date:
2024-12-29 14:13:04
Download count:
all-time: 3

Preview

  • serato_C64_asm_45b_vc3-2024/box-sys713-asm.txt 1.58K
  • serato_C64_asm_45b_vc3-2024/box-sys713.asm 1.58K
  • serato_C64_asm_45b_vc3-2024/box-sys713.prg 47B
  • serato_C64_asm_45b_vc3-2024/file_id.diz 959B
  • serato_C64_asm_45b_vc3-2024/result.png 56.23K
  • serato_C64_asm_45b_vc3-2024/source.png 98.32K

file_id.diz

45 byte Christmas Present in Assembler

Author: Serato / Finnish Gold
Category: Christmas Challenge
System:   C64
Language: C64 "64tass" Assembler
Len source code: 1613
Len exe file:    47
Len code only:   45
Instructions:
Load PRG and SYS713
Description:
This routine works by interpreting a script that contains either literal
characters to print, or instructions to loop back to a different section N
times. The counters for each loop are maintained separately. In this way a
recursive run-length encoding scheme is implemented.

For example, the sides of the box contain a ! followed by 8 hyphens, twice over,
with a final !. The script could represent this as "! ", loop to space 7 times,
then loop to ! 2 more times, then a new-line, then loop to ! again 7 times.
Thus that section of 160 bytes of output can be encoded in 6 bytes of script.

The entire 392 byte output is encoded in a 19 byte script. The interpreter takes
up the other 26 bytes.