This is my response to Logiker's Christmas Challenge for 2021. Interesting exercise.
Author: Jim Gerrie (Sydney, Nova Scotia, Canada) http://faculty.cbu.ca/jgerrie/Home/Type-in-Mania.html
System: TRS-80 Micro Color Computer (MC-10)
Language used: Micro Color BASIC 1.0
Length of source code: 74 bytes (or 70 bytes if I use ? instead of PRINT)
Length of "executable" file: XTREE.C10 (365) 4TREE.C10 (679)-- these are files loadable by emulator.
Instructions on how to run the code:
VMC10.exe is the Virtual MC-10 emulator. Unzip the emulator zip file into a directory of your choosing. Execute VMC10.exe. Ignore any warnings. You should be fine.
The Challenge (XTREE.C10)
Type CLOAD & hit ENTER in the main emulator window. Select XTREE.C10 in the "Cassette" directory. Type RUN...
The Challenge - Variation 2 (4TREE.C10)
Type CLOAD & hit ENTER. Select 4TREE.C10 in the Cassette directory. Type RUN...
The source code for both programs are in the "quicktype" directory as text files. These files can also be
loaded into the emulator via the "quicktype" feature in the Files menu. Screenshots of the games are in the "screenshots" directory.
The XTREE program basically encodes the tree line lengths as a series of ASCII characters. The ASCII value
encodes the length of each line, which the program then decodes and prints the number of asterisks centred.
4TREE just uses a faster version of XTREE multiple times through GOSUBs but creates different type of characters strings in A$ such as the solid color graphic strings stored above ASCII 128.
It also puts the MC-10 into some of its stranger graphics modes to create some interesting special effects. The POKES put the machine into these different modes.