Skip to content

Type and Run

Everything starts here: type a program into the AMOS editor, press one key, and watch it run. Before you can make anything, you need the loop of writing, running, and seeing the result — so let's make the Amiga say hello.

  • Commodore Amiga
  • AMOS

Before you can make a game, you need the loop that everything else hangs off: type a program, run it, see what happened. In AMOS that loop is about as short as it gets — you type into the editor, press one key, and the Amiga does what you said. This whole course is just that loop, over and over, with something new each time. So let’s go round it once and make the machine say hello.

What you’ll see by the end

An orange AMOS screen with the white text 'Hello from AMOS!' near the top-left.
Your first program, running. The orange is AMOS's own screen; the words are yours.

The screen clears to AMOS’s orange, and your message appears: Hello from AMOS! That’s a program — one you wrote — running on the Amiga.

The whole program

hello.amos
Hide
Print "Hello from AMOS!"
Wait Key

Three lines, and only the middle one is the point:

  • Print "Hello from AMOS!" puts the text inside the quotes onto the screen. Print is the workhorse you’ll lean on constantly — give it something in quotes and it shows up.
  • Hide tucks the mouse pointer out of the way, so it isn’t sitting in the middle of your screen. A small courtesy you’ll want in almost every program.
  • Wait Key pauses the program until you press a key. Wait Key holds your result on screen until you’re ready to finish.

AMOS doesn’t mind whether you type Print or print or PRINT — it tidies keywords up for you as you go. The capital letters in the listing are just AMOS being neat.

Type it and run it

Follow Getting Started with AMOS to open AMOS Professional 2.00. Type the three lines, and press F1.

That’s the whole “build”. There’s no separate step that turns your text into something runnable — AMOS is the program that runs your program, so pressing F1 goes straight from what you typed to what you see. When you’re done looking, press a key. AMOS shows End of program at line 3. Press Return to choose Editor and continue editing.

Try this: say something else

Change the words inside the quotes — your name, a question, anything — and press F1 again. Whatever you put between the " marks is what appears. The quotes matter: they tell AMOS “this is text to show,” not a command to obey.

Try this: print twice

Add a second Print line above Wait Key:

Code
Print "Hello from AMOS!"
Print "Made on an Amiga."
Wait Key

Run it, and the second line appears below the first — Print always carries on from where the last one left off, working down the screen.

If it doesn’t work

  • An end-of-program message appears before you can inspect the result. Check that Wait Key is the last line. Press Return to return to the editor.
  • AMOS shows “Syntax error.” Compare the highlighted line with the listing. Keep the words inside quotes and remove any extra punctuation after the closing quote. AMOS Professional 2.00 can fill in a missing closing quote, so that omission may not produce an error.
  • The mouse pointer is sitting on your text. The Hide line isn’t there, or is spelt wrong. Add it at the top.

Try this: make and repair an error

Add a + immediately after the closing quote on your Print line. Press F1: AMOS shows Syntax error. It has no value to add after the +.

Remove that extra + and press F1 again. Your greeting should return. The error changed your source; it did not damage AMOS or the Amiga.

What you’ve learnt

The whole loop: type a program in the AMOS editor, press F1, watch it run. Print shows text inside quotes, Wait Key holds the result on screen so you can see it, and Hide clears the mouse pointer out of the way. There’s no separate build step — in AMOS, running is one keystroke.

What’s next

You’ve put words on the screen; now let’s get particular about where and how. Next — Print and the Screen — placing text exactly where you want it, and clearing the screen to start fresh.