scene.org File Archive

File download

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

File size:
159 797 bytes (156.05K)
File date:
2025-12-30 23:34:07
Download count:
all-time: 2

Preview

  • file_id.diz 1.69K
  • program-screenshot.png 12.26K
  • source-code-screenshot.png 151.48K
  • vccc2025-atari-asm.lst 5.21K
  • vccc2025-atari-asm.mac 3.56K
  • vccc2025-atari-asm.obx 142B

file_id.diz

Snowflake encoded as 57 numbers

Author: Mira
Category: Christmas Challenge
System:   Atari XL/XE
Language: Assembler, MADS 2.1.5 (cross assembler)
Len source code: 3641
Len exe file:    142
Len code only:   130
Instructions:
In Altirra: File - Open Image... - vccc2025-atari-asm.obx
Use Altirra emulator. 
Description:
The shape (19x19) symbols is encoded as three 7-bit numbers per line, that is 3x19=57 bytes.
The code itself has only 73 bytes. Code+data = 130 bytes.

printAsBinary routine consumes a 7-bit number and prints 7 characters on the screen.
A set bit (1) corresponds with *, a clear bit (0) corresponds with the space character.
To save program space, the 7-bit bytes are processed from the least significant bit (bit 0).
Once 7th bit (bit 6) is processed, the routine ends.

main routine has two nested loops, the inner loop iterates over 3 columns, the outer iterates over 19 rows.
For each iteration, a number is loaded and printAsBinary is called.
After each column, an EOL character is printed out.

The screenshot looks like it is run in Altirra BASIC, but it is not. The machine code program ends with RTS instruction,
which leaves teh control flow to Altirra BASIC. A cleaner solution would be to implement an infinite loop at the end,
however, that would require 2 or 3 bytes (RTS is only 1 byte long).

Comments:
Thank you for organiying this wonderful competition!
The screenshot looks like it is run in Altirra BASIC, but it is not. The machine code program ends with RTS instruction,
which leaves teh control flow to Altirra BASIC. A cleaner solution would be to implement an infinite loop at the end,
however, that would require 2 or 3 bytes (RTS is only 1 byte long).