💾 Archived View for sdf.org › inermis › gemlog › 20231126.gmi captured on 2024-05-10 at 11:12:49. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
The mission of last year's "Vintage Computing Christmas Challenge" was to write a program that prints a star on the screen that is made up of individual *-characters. Here is a possible solution in Commodore C64 Basic, neither optimized for size nor speed, but rather for readability.
10 PRINT "{clear}" 20 FOR Y=-8 TO 9 30 FOR X=-8 TO 9 40 IF ABS(X)>4 AND ABS(Y)>4 THEN PRINT " "; : GOTO 80 50 IF ABS(Y)-ABS(X)>4 OR ABS(X)-ABS(Y)>4 THEN PRINT " "; : GOTO 80 60 PRINT"*"; 80 NEXT X 90 PRINT 100 NEXT Y
On my GitHub page you can find more solutions, e.g. as assembler or as a C implementation.
My GitHub repository for the Star Challenge
As we all know, Christmas is coming soon, so it will be interesting to see what the challenge will be this year.