CHRISTMAS CHALLENGE 2023

Author:   Diederik Huys
Category: Christmas Challenge
System:   C64
Language: BASIC V2
Len source code: 114
Len exe file:    118
Len code only:   N/A
Instructions:
   Load "2023.prg" using Smart Attach in Vice (x64sc).
   Type RUN and watch the show.


Description:
The code exploits the mathematical properties of modulus and absolute value to create an oscillator based on the number of the produced line.
The oscillator value is used to generate two offset values, so the same simple text string (asterix-signs separated with cursor-right codes)
can be printed over each other to produce one output line.

Comments:
(1) I used the following function to calculate the code length :
   On a freshly started virtual machine:
   ? fre(0)+65536

   Result: 38909

   After loading the code:
   ?38909-(65536+fre(0))

   Result: 114

(2) As length of the executable, I simply used the file length of the PRG file as reported by Windows.