code][ > GS/OS Pascal > Getting Started
Installation

Before doing any Pascal programming in GS/OS, you'll need to make sure you have a few things first.

* A IIgs to program on. This can be a real IIgs or a virtual one. My IIgs has 1.25 MB of RAM, and that is usually enough, but there are times when I find myself wanting more. Especially when working on large projects, the more memory, the better!

* Pascal software. My preferred software is Complete Pascal, because it is freely available. You can download it from the Asimov software archive. Another good choice is ORCA/Pascal, which can be bought from the Syndicomm store. I don't have a copy of ORCA/Pascal, so I will be using Complete Pascal code in my examples. It should be mostly the same, however.

After installing Complete Pascal, extract the .SHK someplace convenient and launch the executable.

Select File -> New and create a file somewhere convenient. I named mine HelloWorld.pas.

Now enter the following code into your new file:

PROGRAM HelloWorld;

VAR
  name : String;

BEGIN
    Graphics(640);
    WriteLn('What is your name?');
    ReadLn(Input, name);
    WriteLn('Hello,', name, '!');
    ReadLn;
END.
    
Select Compile -> To Memory to run your program. You could also choose Compile -> To Disk to create a application file that can be run on any IIgs. The program should ask you to type your name, then repeat it back to you after you press enter. Pressing enter again will return you to Complete Pascal.

This program takes advantage of a Complete Pascal feature called 'textbook' programs. When you call the procedure Graphics(640) it automatically sets up a screen environment that you can print to and get input from like a standard console. This allows you to run examples from most Pascal textbooks. We won't be using the textbook environment much, but it's great for testing out small algorithms or prototyping ideas.

If you made it this far, you're ready to get started on programming for GS/OS. The rest of the tutorials in this series assume that you are already somewhat familiar with Pascal. If you're not, there are lots of great tutorials available online. A good place to start is Tao Yue's Pascal tutorials. Complete Pascal supports most common Pascal standards. I'll explicitly point out any code segments that are non-standard.