scene.org File Archive

File download

<root>­/­parties­/­2021­/­vintagecomputingchristmaschallenge21­/­challenge/julgran-c64.zip

File size:
5 395 bytes (5.27K)
File date:
2021-12-25 12:55:53
Download count:
all-time: 18

Preview

  • julgran-c64.bas 79B
  • julgran-c64.diz 1.17K
  • julgran-c64.png 2.78K
  • julgran-c64.prg 76B

file_id.diz

Author: Anders Carlsson <anders.carlsson@sfks.se>
System: Commodore 64
Language: BASIC V2 (default)
Source code: 77 characters (maximum abbreviated)
Executable code: 76 bytes (including 2 byte load address)

How to run:

1. Start a C64 emulator like x64/VICE
2. Drop PRG file into the emulator
3. Program loads and autostarts

How the program works:

The length of each line, 1-23 is encoded as a letter A-O which is stored
as a string. One character at a time is extracted, its ASCII value is
retrieved and the base 64 is removed from the value. The tabulator is
advanced half (20) the screen width minus half the size of the string to
be plotted. Then another loop plots as many stars as required. A blank
line is added to advance a line and the main loop closes.

Unfortunately due to the way VICE petcat works, it does not recognize the
question mark as an abbreviation for PRINT so the generated PRG file was
created with a slightly expanded version of the program. If the source is
copied and pasted directly into an emulator (or typed in on the real thing)
it would work as given.

(this description already is more tnan 15 times the size of the executable)