XMASV2_SKR
Author: skr
Category: Christmas Challenge
System: Atari 8Bit
Language: ATARI BASIC
<--- I don´t do that stuff
Len source code: <# bytes>
Len exe file: <# bytes>
Len code only: <# bytes> (valid for assembler only; length of executable without BASIC stub)
--->
Don´t know to count what you´re asking for, but "PRINT FRE(0)" gives me a length of 990 Bytes before execution. After execution free memory decreases by 22 Bytes.
The listing is 313 characters long, including spaces (251 without spaces).
Instructions:
Copy and Paste code into Emulator:
The file "XMASV2_SKR.BAS.txt" is a text file, which you open, select all the content and then use "paste" (mostly ctrl+V) in your emulator to simulate typing it in. Atari800MacX and Altirra pretend to actually type it in, so wait until it all is typed. The cursor stops after the last character of line 9, so you have hit "Return" once and then, in the new line, type "RUN".
Using the digital disk image with an Emulator:
The file "xmasv2_skr.atr" is a digital disk image that can be booted with every Atari Emulator.
The Atari is an "Autoboot" system, so if the (virtual) disk-drive ("D1:") is present, the disk will be loaded automatically, when the computer (or Emulator) is switched on (or coldstarted).
If BASIC is enabled (that is the default state of the Atari) you will be prompted with the word "READY" and the (not blinking) cursor.
If BASIC is disabled, it will automatically boot XDOS and the prompt says "D1:". The first four lines give information about XDOS by S. Dorndorf.
In XDOS you can enable BASIC by just typing "BON" (which is short for "BASIC ON" at the prompt. The screen will clear and just show the "D1:" prompt. Now you can type "CAR" (which is short for "CARTRIDGE" as Atari Basic on the genuine Atari 400 and 800 (not XL!) was not built in but had to be plugged into the cartridge port).
Now, like if you booted with BASIC enabled, you will be prompted with the word "READY" and the non-blinking cursor.
To instantly run the program, type:
RUN"D1:XMASV2.BAS"
This will load the program and immediately execute it. It stops with an infinite loop. To get back to BASIC, press the "BREAK" key.
To see the listing, just type:
LIST
To load the program but not start immediately, type:
LOAD"D1:XMASV2.BAS"
You can manipulate the listing and save it again. Therefore make sure, that the emulator has read/write enabled for the disk (Altirra used to mount disks as read-only, not sure if it still does, for coding I mostly use the Atari800MacX Emulator).
If you want to save the program (with or without changes) type:
SAVE"D1:<name>.<ext>"
The format is 8.3, so <name> can´t be longer than eight characters. The extension <ext> should be "BAS" for standard Atari Basic programs.
To mount the disk in an Emulator, at least on a Mac using Atari800MacX, you can simply drag the ATR-file on the Emulator-Application-Icon.
EMULATORS:
All platforms:
Atari 800: https://atari800.github.io
Mac OS X:
Atari800MacX: https://www.atarimac.com/atari800macx.php
on Github: https://github.com/atarimacosx/Atari800MacX
Windows:
Altirra: https://www.virtualdub.org/altirra.html
Description: Please see the README.txt, as I spend a bit too much work into the description, I guess. ;)
Comments: This is my second entry here, trying to keep it as small as possible. Any suggestion on how to shorten exactly this even more are appreciated. I´m sure, in the competition I´ll see even shorter approaches, but I´m mostly insterested in how I could optimize my very own code even more.