Atari ST

BASIC on the ST

ST BASIC, GFA BASIC, and Omikron BASIC each put their own tools around a familiar language.

← All programming languages

ST BASIC

Atari ST BASIC, supplied on language disks, introduces programming through a windowed editor and output environment. Numbered lines and familiar PRINT and FOR commands make an approachable first listing. It is a separate dialect from eight-bit Atari BASIC.

ST BASIC — enter the listing, then RUN
10 PRINT "HELLO FROM ST BASIC"
20 FOR N=1 TO 3
30 PRINT "ATARI ST",N
40 NEXT N
50 END
Expected result: the ST BASIC output windowIllustrative preview
ST BASIC — Output
HELLO FROM ST BASIC
ATARI ST       1
ATARI ST       2
ATARI ST       3

The comma separates the model name and number into print zones. Window decoration and spacing are illustrative; the displayed text and sequence come from the listing.

The output window displays a greeting followed by three numbered lines. ST-specific graphics and window commands differ from the GRAPHICS and SOUND commands of eight-bit Atari BASIC.

Reference: Atari ST BASIC Sourcebook and Tutorial (PDF).

GFA BASIC

GFA BASIC offers a structured editor and language without mandatory line numbers. Procedures, loops, and ST graphics support suit larger programs, and a separate compiler can produce executables.

GFA BASIC for Atari ST — editor listing
PRINT "HELLO FROM GFA BASIC"
FOR N%=1 TO 3
  PRINT "ATARI ST ";N%
NEXT N%
Expected result: three numbered GFA BASIC greetingsIllustrative preview
HELLO FROM GFA BASIC
ATARI ST 1
ATARI ST 2
ATARI ST 3

The loop prints the integer counter after each model name. Numeric padding may differ with the interpreter. View the output screen if GFA BASIC returns to the editor afterward.

Enter this in the Atari ST GFA BASIC editor and select Run. The percent suffix makes the counter an integer. View the output screen after the program finishes if the editor returns to the foreground.

Reference: GFA BASIC manuals and Atari ST tutorials.

Omikron BASIC

Omikron BASIC provides another ST development environment, with interpreter and compiler options and extensive numeric and graphics facilities. It was supplied with Atari systems in some European markets. Its commands and stored-program format differ from GFA BASIC.

Omikron BASIC — numbered editor listing
10 PRINT "HELLO FROM OMIKRON BASIC"
20 FOR N=1 TO 3
30 PRINT "ATARI ST ";N
40 NEXT N
50 END
Expected result: three numbered Omikron BASIC greetingsIllustrative preview
HELLO FROM OMIKRON BASIC
ATARI ST 1
ATARI ST 2
ATARI ST 3

The loop prints three lines after the greeting. Numeric padding and display colors depend on the interpreter settings; this preview shows the text in a monochrome ST console.

Enter this listing in Omikron BASIC and RUN it to print three numbered greetings. These short examples use each dialect’s simple text output; more elaborate GEM or graphics programs need the matching language manual.

Reference: Omikron BASIC manual, Dutch edition (PDF).