STAR.bas for ATARI 800XE Author: Alfonso Luis Suarez Diaz (Colombia) Category: Christmas Challenge System: ATARI 800XE Language: BASIC Len source code: 140 bytes Len exe file: 129 bytes Len code only: Not apply Instructions: how to run the code in an emulator 1. Download emulator from https://www.virtualdub.org/downloads/Altirra-4.01.zip 2. Unzip files in a single folder like "Altirra_4_1" 3. Run Altirra64.exe 4. In the menu. select: System/Internal Basic (Boot without Option key) 5. In the menu. select: System/Warm Reset 6. Open star_Source.txt and copy all code text from it. (Like Ctrl-A, Ctrl-C) 7. In the emulator screen do Right Click. then click on "Paste". Wait for all code to be writen. Hit Enter key 8. Write: RUN then hit Enter key Description: The folowing code in Basic has 2 lines: Line 1 contais all logic of the program. Line 2 prints enter for each line and closes both Next loops 1 DIM T$(1):FOR Y=-8 TO 8:FOR X=-8 TO 8:B=ABS(Y):A=ABS(X):T$=" ":IF ABS(B-A)<5 AND (A<5 OR B<5) THEN T$="*" 2 PRINT T$;:NEXT X:PRINT:NEXT Y Explanation: DIM T$(1) Declares a string variable for write either a star "*" or a space " " FOR Y=-8 TO 8:FOR X=-8 TO 8 Creates a 17x17 2 dimentional cartesian reference using both negative and positive numbers for each axis B=ABS(Y):A=ABS(X) Calcules positive coordenates for any of the 4 cuadrants ABS(B-A)<5 marks a diagonal of 5 pixels width (A<5 OR B<5) Exclude the 4 corners PRINT T$; Print either a star or a space NEXT X:PRINT:NEXT Y Close each for loop and print an enter between lines Comments: No exe file was provided since it would be hard to load in the emulator. Copying text seemed more efficient.