scene.org File Archive

File download

<root>­/­parties­/­2021­/­vintagecomputingchristmaschallenge21­/­challenge/vc3_2021_paul.zip

File size:
33 426 bytes (32.64K)
File date:
2021-12-25 12:55:53
Download count:
all-time: 15

Preview

  • entry.txt 1.19K
  • screenshot_633.png 31.20K
  • xmastree 180B

file_id.diz

Just for fun, this is my entry in SpecBAS - an updated Sinclair BASIC clone language. Feel free to ignore, it was just a bit of fun and isn't very "vintage" aside from the heritage of the language.

The other files in the archive are an image of the result, and the actual program itself. The file is human-readable text (4 lines of header info do not constitute the code) in one line of BASIC (multiple statements though).

Author: Paul Dunn
System: Windows PC
Language: SpecBAS v0.1185 ( https://github.com/ZXDunny/SpecBAS )
Length: 129 chars (saved file is 180 bytes)
To run it: Install SpecBAS and copy the file to c:\users\<username>\specbas\, LOAD "xmastree", RUN.

Description:

It's pretty simple:

10 n=-1: ' the current row to PRINT to 
   FOR i=1 TO 3: ' three tree segments 
      l=2*i-1:  ' initial length of the line for each segment
      FOR j=1 TO 4: ' four rows per segment
         PRINT CENTRE n+=1;"*"*l: ' n+=1 is increment-and-store, "*"*l will create a string of stars length l
         l+=i*2: ' increment l per row by two per segment
      NEXT j: 
   NEXT i:
   DO 2: ' do this twice
      PRINT CENTRE n+=1;"*"*3': ' same as above, PRINT two rows of 3 stars
   LOOP