scene.org File Archive

File download

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

File size:
51 246 bytes (50.04K)
File date:
2021-12-25 12:55:53
Download count:
all-time: 16

Preview

  • file_id.diz 983B
  • mms_plus4_basic_vc3-2021_image.gif 4.15K
  • mms_plus4_basic_vc3-2021_image_of_code.jpg 46.32K
  • mms_plus4_basic_vc3-2021_sourcecode.prg 179B
  • mms_plus4_basic_vc3-2021_sourcecode_text.txt 226B

file_id.diz

Author:	       MMS
System:	       Commodore 264 series (16, 116, Plus/4)
Language:         CBM BASIC v3.5, but OK on V2.0 and v7.0 (maybe v4.0?)
Lenght of code:   226 characters (BASIC code)
Lenght of ex.code 179 byte
How to run the code:  LOAD+RUN

Description:
1. Define the array C with 14 elements
2. I read the width of the christmas tree's 14 layers into a C array, width of the layer defined in the DATA lines (counted from the Challange's picture)
3. Before drawing the tree's coming layer, I center it by deducting tree's layer width from the 40 (width of +4 screen) and divided by two, and I used INT function to truncate it
4. I print as many * characters with a FOR cycle as defined in the layer's DIM
5. Repeat it as long as all layers are not drawn
6. end

Instead of TAB function I could use +4's CHAR function for positioning, but then it would be only compatible with +4 (or maybe C128). 
This version probaly runs on C64 and VIC-20 (maybe PETs too).