<stars>
Author: <Tonino SCaffidi>
Category: <Christmas Challenge>
System: <C64>
Language: <BASIC V2>
Len source code: <366 bytes>
Len exe file: <359 bytes>
Len code only: <366 bytes>
Instructions:
<Install vice, drag and drop the prg file into it>
Description:
<An indexed vector is used, containing, in each of the 4 elements, the position of the cursor starting from the current one and towards the diagonal direction. There is a subroutine that prints the asterisk and, depending on the direction and reaching the edge of the rectangle containing the drawing, changes the direction of the next asterisk. The direction is represented by the variable d which is also the index of the vector. The variable d is also used as an index of an on-goto jump to proceed with printing the desired drawing. The drawing is made up of 3 rhomboidal rectangles, of which the highest point of each is selected and the algorithm automatically draws the rest of the shape.>
Comments:
<Star2.bas contains the source code with all the abbreviations and tricks to minimize the code. I used PRINT instead of POKE as it is much faster to execute>