68 byte christmas star in BASIC
Author: serato / finnish gold
Category: Christmas Challenge
System: C64
Language: BASIC V2
Len source code: 77
Len exe file: 70
Len code only: 68
Instructions: run PRG
Description:
Takes the functional approach. Iterates over Y = -8 to 8, X = -8 to 31, prints '*' unless abs(abs(y)-abs(x))>4 OR (abs(x)>4 AND abs(y)>4)
Comments:
The difference in ASCII codes between '*' and ' ' is 10. This implementation saves one byte by using logical OR with 9 which evaluates to -1 or 9, the required difference of 10. Another byte is saved by printing the full 40 columns instead of printing a new line between the inner and outer loops.
0fOy=-8to8:fOx=-8to31:?cH(33+(9oraB(aB(y)-aB(x))>4oraB(x)>4aNaB(y)>4));:nE:nE