Atari ST

Pascal on the ST

A structured language finds more memory and a graphical desktop.

← All programming languages

Pascal grows into the desktop

Pascal’s typed variables and procedures help organize larger programs. On the Atari ST, OSS Personal Pascal provides a compiler and libraries for both ordinary input/output and GEM development. Its development environment and libraries are separate from APX Atari Pascal on the eight-bit machines.

Example: a console greeting

Atari ST Personal Pascal — console example
program AtariHello;
var
  reply: char;
begin
  writeln('HELLO FROM PASCAL ON THE ST');
  writeln('TYPE A LETTER, THEN PRESS RETURN');
  readln(reply)
end.
Expected result: a greeting and an input promptIllustrative preview
HELLO FROM PASCAL ON THE ST
TYPE A LETTER, THEN PRESS RETURN

Shown before you type a character. Enter a letter followed by Return to let readln finish; the program then exits. Console colors depend on the ST display setup.

Compile and link with Personal Pascal’s normal console runtime, then run the executable from the ST desktop. Enter a character followed by Return to finish. The pause keeps the output visible before TOS returns to the desktop.

Reference: OSS Personal Pascal manual.

From text to GEM

A desktop Pascal application uses the compiler’s GEM bindings to create windows and process events. Text output is a first step; menus and redraw handling require additional library calls. ST Pascal implementations have different extensions, so use the documentation for the compiler you have.