Hi
skr, and welcome!
First of all,
thank you very much for your message, and for your intention to deepen
ugBASIC, and its IDE!
skr wrote: ↑Fri Dec 27, 2024 9:32 am
It compiles, opens Altirra (Atari-Emulator) and shows the Atari Graphics 0 (Text) Screen for a moment and then switches to a black screen saying "ugBasic runtime version 1.16.5" and prompts me with a flashing cursor.
From the symptoms your program exhibits, it would appear that the runtime module required to participate in the
10 liner contest is active, but normally it should not be active. This mode is activated using the
-1 option on the command line, which among other things activates a series of alternative features and deactivates some features, which cannot be used in that contest.
If you use the command line to compile, you should make sure that the
-1 option is not present on the command line. If, as you suggest, you are using the IDE, you should make sure that the
Build > "10 Liner" Contest option is unchecked, or that the
Build > Include source code into executable option is unchecked, too.
skr wrote: ↑Fri Dec 27, 2024 9:32 am
Question: How do I run that simple program, so that it opens the text screen (Graphics 0, SCREEN #2) in Altirra and outputs the text there, instead of showing the ugBasic runtime?
The way you were doing it seems correct to me, and that's what I get on my IDE. As an additional thing, I would insert a
CLS command to ensure that the screen is cleared, once the mode is changed. This is not done automatically, because it involves inserting additional code that may not be used. However, if you want to change this behavior, you can use the
DEFINE CLS IMPLICIT directive (which, however, involves potentially more code).
This is my suggestion:
Code: Select all
SCREEN #2
CLS
PRINT "Hello ugBASIC"
Or:
Code: Select all
DEFINE CLS IMPLICIT
SCREEN #2
PRINT "Hello ugBASIC"
Let me know if this solves the problem.