Getting Started

AMOS Professional is a truly comprehensive programming package, allowing experts to release their full potential. It has also been designed to provide beginners with rapid access to expert techniques. However, this section is for absolute beginners only!

If you have upgraded from Easy AMOS or its big brother AMOS, don't be too proud to skip through this Chapter before moving on to Chapter 4.1, where the AMOS Professional Editor is explained.

Warning: if you have not yet installed your AMOS Professional System disc, please do so now by referring to Chapter 2.1.

Absolute Beginners

A computer program is simply a collection of instructions telling a computer to perform a list of tasks. Amiga programs are stored on magnetic discs, and because disc programs are stored magnetically, you must keep them clear of all magnetic objects. Placing a telephone on top of a hard disc drive can be a risk, and leaving floppy discs on top of your television set or loudspeaker system is asking for trouble. Always make back-up discs of your programs, and store them in a safe place out of direct sunlight.

Computer programs that are stored on magnetic discs have to be "loaded" into your computer's memory. If you are using floppy discs, here is the procedure for loading AMOS Professional:

Hard disc users who want to load AMOS Professional from the Workbench once it has been installed should double-click on the AMOS Professional System disc icon, and then click on the relevant icon to run the program. If you are running the system from CLI, simply type in:

AMOSPro

AMOS Professional has been designed to be the friendliest system available to the Amiga programmer. As soon as it has loaded into your computer, you will be greeted by name before getting down to business! This welcome panel will disappear automatically after a few seconds, or it can be cleared by pressing any key on your keyboard, or by clicking a mouse button.

The Edit Screen

To create and edit computer programs with AMOS Professional, you are given a working area called the Edit Screen. If AMOS Professional has been loaded successfully, the Edit Screen will be displayed now.

There is a complete guided tour of the AMOS Professional Editor in the next Chapter, but you will want to see some immediate action. So instead of explaining what everything does, here is a rapid introduction to getting started.

Move the mouse around now, and observe how the mouse pointer follows your movements around the Edit Screen. At the top of the Edit Screen there is a row of control "buttons" that are used to call up various features of the AMOS Professional system. These little panels are triggered by dragging the mouse pointer over one of them, and clicking with the left mouse button. You can do no harm by experimenting with any of the Edit Screen features, but please resist the temptation to do this, and follow this brief introduction.

Identify the control button at the top-centre of the screen, displaying the letter [H]. Move the mouse pointer over it and click the left mouse button. This is the Help icon, and it calls up the AMOS Professional instant Help service. Now look at the new display on the screen, and identify the small button to the immediate left of the title "AMOS Professional Help Window", and click on it to return to the original Edit Screen display.

Now press the right mouse button and keep it held down.

When editing, the right mouse button calls up a line of "menu" titles at the top of the Edit Screen. Run the mouse pointer along this line of titles now, and notice how as soon as the pointer touches one of them, a selection of further titles is revealed. Each of these items refers to a different feature of the AMOS Professional system.

With the right mouse button still held down, move the mouse pointer to the right-hand side of the line of main menu headings, and touch the Help title. Keeping the right mouse button held down, move the mouse pointer to the [Help Menu] option, so that it is highlighted in reverse video. As soon as you release the right mouse button, this feature is called up on screen.

Please clear the Help Main Menu from the screen by pressing the small button as before.

Now look at your keyboard, and identify the large Help key. Press this key now, and the AMOS Professional Help Main Menu is called up once more. Before proceeding, please clear it away again, as described above.

You are already using AMOS Professional like an expert, and have just used the three alternative methods of calling up one of the most useful AMOS Professional features, as follows:

Typing in the Edit Window

If you have been experimenting, and cannot clear the Edit Screen to its original empty state, leave your machine switched on, with the AMOSPro_System disc in the internal floppy disc drive, and press the Ctrl+Amiga+Amiga keys together. This will re-boot AMOS Professional, allowing you to clear your electronic slate.

Look at the empty Edit Screen, and identify the small flashing block in the top left-hand corner of the large area below the row of control buttons. This is the "program cursor" and it marks the current position where anything you type in will appear on screen. This top left-hand position marks the "home" starting point of the Edit Window, which is where the list of instructions that make up your computer programs begin to appear.

Press the A key on your keyboard, and a lower-case "a" will appear in the Edit Window, shunting the program cursor one character to the right. Now hold down one of the Shift keys and press [A] again. There should now be a capital "A" next to the little "a" on screen. The Shift key is used to type in upper-case letters as well as any of the symbols that are marked above the numbers and punctuation marks on your keyboard keys. So to type in a "$" symbol, you would press Shift+4 together. Type in a "$" now.

Now locate the extra-large key with a turn-left arrow on it, to the right-hand side of the main block of keys. This is the Return key, and it is used to start a new line when writing programs. Please press this key once, so that the program cursor is waiting at the beginning of a new line.

Just above the large Return key, there is a small key marked by a left-arrow. This is the Delete key, and it is used to rub out characters already typed in the Edit Window. Please press it as many times as necessary to get rid of any characters that you have typed, until the cursor is back "home" in the top-left corner of the Edit Window.

The mouse pointer can also be used to position the program cursor in program lists, as well as to mark out special blocks of the program, and this will become obvious in the next Chapter.

Your first programs

Type in the following program so that it appears in the Edit Window, and then press the Return key:

Print 2+2

That juvenile program will wait in the Edit Window, until you tell AMOS Professional to "run" it. To run a program, call up the list of Menu headings by holding down the right mouse button, move the mouse pointer to the [Project] title, highlight the [Run] option and release the right mouse button.

Alternatively, use a simple keyboard short-cut for running a program, which is to press the F1 key. Either way, the Edit Screen will be flicked out of view, and the result of the program will be displayed on screen. In this case, the result of two plus two will be printed on screen as "4".

There are several ways to return to the Edit Screen when a program is running. There are special commands that can be included in the program for an automatic return, which will be explained in future Chapters, or you can break into a program by pressing the Ctrl+C keys together, and then press the Return key.

If an audio system is connected to your Amiga, add the following lines to your program, so that it now looks like this:

Print 2+2 Wait 100 Boom Wait 200 Print "Good-bye" Wait 50 Edit

Now press F1 to run that program. You should already be aware that using AMOS Professional is a very friendly method of communicating with your Amiga.

Direct Mode

So far, you have been programming your Amiga in the AMOS Professional Edit Mode, but when you are working on a program professionally you will often want to conduct an instant experiment, or call up an AMOS Professional feature without interfering with your current task. There is a very powerful Direct Mode provided for this purpose, which works completely independently from the Edit Mode. To jump to Direct Mode now, use the mouse to click on the [Arrow] button in the top left-hand corner of the Edit Screen, or alternatively press the Esc key at the top left-hand corner of your keyboard.

The Direct Mode screen is flicked into view over the Default Screen, and it can be repositioned to reveal the contents of the Default Screen behind it, by clicking on the [DIRECT] panel in the line of control buttons with the left mouse button, and dragging the Direct Mode screen up and down. To get back to the Edit Screen, press the Esc key again, or click on the [Arrow] button at the top left of the Direct mode "window".

There is a highlighted prompt in the Direct Mode window, waiting for your instructions to be typed in and displayed next to it. After they have been typed in, these instructions will be obeyed as soon as the Return key is pressed, without interfering with the program that is currently being worked on in the Editor. Type the following line in Direct Mode now, and then press the Return key.

Print "This is Direct Mode"

Direct Mode offers a simple way of gaining access to a disc, to examine its contents, or load some images. It also allows you to check the results of instant tests of text, graphics and sound commands, before including them in your programs. Try out the following lines from Direct Mode now, and remember to press Return after typing in each line. The first line instructs AMOS Professional to report how many little dots known as "pixels" make up the height of the current screen. The middle line calls for a report of how much free chip memory is available. The third line triggers a print-out of the contents of the current disc, known as a "directory".

Print Screen Height
Print Chip Free
Dir

There is a full guided tour around all of the Direct Mode operations in the next Chapter.

To end this beginner's introduction, take a look at some ready-made programs that have been created by other programmers using AMOS Professional. If you have been experimenting, and are not quite sure of everything that is displayed on screen at the moment, leave your AMOSPro_System disc in place, and press Ctrl + Amiga + Amiga to make sure that you start from scratch again.

After being greeted by your name, and revealing the Edit Screen, remove your AMOSPro_System disc and insert the disc labelled AMOSPro_Productivity1.

Loading a program

As usual with AMOS Professional, you have a choice of how to select the loading operation. You can call up the Main Menu titles with the right mouse button, and select the [Load] option from the [Project] menu in the usual way. Alternatively, there is a keyboard short-cut by pressing Amiga + L. Either operation will call up a special interactive panel called a "File Selector". A file is simply a self-contained chunk of computer data, with its own name, held on a magnetic disc.

With the File Selector in the middle of your screen, use the mouse pointer to highlight one of the programs on offer, and click on the Return icon. If you are interested in an arcade game, you can select and highlight the line that reads Zybex/Zybex.AMOS, or if you prefer a practical program then Fileo'fax.AMOS is worth examining.

Certain programs need more memory than others, and if there is not enough memory available when you want to load a particular program, you will be presented with a "dialogue box" on the screen, asking if you want to expand the size of the relevant memory. When dialogue boxes are presented by AMOS Professional, you normally select your response using the mouse pointer and clicking on the left mouse button.