scene.org File Archive

File download

<root>­/­parties­/­2022­/­vccc22­/­christmas_star_challenge/serato_c64_basic_vc3-2022-68.zip

File size:
7 474 bytes (7.30K)
File date:
2022-12-30 11:32:13
Download count:
all-time: 18

Preview

  • serato_C64_BASIC_vc3-2022-68/file_id.diz.txt 679B
  • serato_C64_BASIC_vc3-2022-68/serato_C64_BASIC_vc3-2022-68-output.png 2.38K
  • serato_C64_BASIC_vc3-2022-68/serato_C64_BASIC_vc3-2022-68-source.png 2.02K
  • serato_C64_BASIC_vc3-2022-68/star-68.prg 70B
  • serato_C64_BASIC_vc3-2022-68/star-68.txt 77B

file_id.diz

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