0% found this document useful (0 votes)
9 views

prog2

AMOS Professional, launched in 1992, is an Extended BASIC programming language that is gradually improving despite initial bugs. It optimizes performance by storing sounds and graphics in memory, allowing for faster execution, and includes a multitasking feature through AMAL for animation. The AMOS editor provides a user-friendly interface for coding, with various commands for program management and error checking.

Uploaded by

vasquez vas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

prog2

AMOS Professional, launched in 1992, is an Extended BASIC programming language that is gradually improving despite initial bugs. It optimizes performance by storing sounds and graphics in memory, allowing for faster execution, and includes a multitasking feature through AMAL for animation. The AMOS editor provides a user-friendly interface for coding, with various commands for program management and error checking.

Uploaded by

vasquez vas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

The Future

AMOS Professional, has been out since late 1992 and is gradually
gaining ground, although initial bug lists ran to several pages of A4.
The AMOS Pro Compiler arrived just after the completion of this
second edition, and so no details are extant of how effective this is.
The original AMOS compiler was not optimising so all the libraries
needed for all aspects of AMOS were included in every compiled
program, making the code bigger than it needed to be. A multiple
pass compiler by a third party has been rumoured for some time,
although at the time of going to press this still hadn't emerged.
Whatever the immediate future of AMOS, you can bet that it's not
going away.
er||
2:
Basic
Principles
AMOS is a programming
language, but like most
languages it takes a little time
to learn it. You have to get to
know a little bit of the lingo at
a time, a bit like learning a
foreign language in the real
world. If you want to learn
French really well, go and
plonk yourself with a guide
book in the middle of Paris for
a month or three. You'll be
using the language all the
time, so you'll get really good
at it in a really short time.
You'll start by learning a few
phrases that you need all the
time, and add new words as
you go along as you need
them. Some of these will only
crop up from time to time, but
other words you'll need every
day, every time you need to
speak to anyone.
The same is true of learning a
computer language like AMOS.
Once you have a few phrases
(what we call keywords) down
pat, you'll be able to venture
forth on your own. After that
you need to know the syntax.
In a spoken language the
syntax is the grammar, or how
the words are put together to
get the right effect. In
computer languages like
AMOS, the commands or
keywords must be used in the
right order and context to
work properly, or to have the
right effect. Once you have a
vocabulary of AMOS keywords
and a knowledge of the right
syntax in which to use those
words, you can build on the
keywords you know and use
them with confidence,
learning by experience.
Mastering Amiga AMOS
But the most important thing to know about is that learning AMOS
should be fun. Enjoy yourself, because this isn't a test that you're
going to pass or fail. You're learning because you want to.
How AMOS Works
The whole point about AMOS is that it is an Extended BASIC. That is
to say if a normal BASIC was a 1964 Ford Cortina, a 1992 Porsche
would be an Extended BASIC. AMOS is just like a normal BASIC
except that it's been optimised in certain ways, tuned up to work
faster and do far more than any normal BASIC.
AMOS uses a few tricks to get the most power out of your Amiga.
Firstly sounds and graphics are stored in memory banks inside
your Amiga’s memory. These are special areas of memory which
AMOS allocates to store these things, and calls them up from
memory when needed. This is a lot faster than loading graphics or
sounds from disk, as you can imagine. The main reason for doing
this is speed. Once you've loaded a screen into memory, for
example, you can flip it up onto the screen in less than a second,
rather than about four seconds from disk. Sounds too are stored in
memory, like music and sound effects. They can be used on
demand without loading from disk. And the beauty of this system
is that the sounds and graphics you load into the memory banks
are saved invisibly to disk with your program code, so when you
load and run a program you're getting a darn sight more than just
the raw text that makes up the program. All the saved memory
banks load into memory as well, so the program has a lot of hidden
allies waiting in the wings, supplying more power.
Another trick that AMOS uses, is the very fast optimised commands.
Optimised means that the command has been written so as to be as
fast as it can be. No AMOS command is running at less than peak
efficiency. This means that even a simple program runs much faster
than a program in a normal BASIC. Secondly AMOS has another
simpler computer language which can be used inside AMOS
programs, and this is AMAL. AMAL stands for AMOS Animation
Language which is a special set of animation and movement
routines which are not only automatically compiled before running,
they also operate simultaneously on a number of AMAL channels.
This is multitasking at its best, and AMOS is the first true
multitasking BASIC for the Amiga. (Note for tech heads: it
multitasks AMAL, but you can't run AMOS as well as another
program in memory.)
Because AMAL can take over the animation and movement of items
on the screen, as in a game for example where the sprites must all
move at once, the rest of the AMOS commands can be saved for
slower processes in the program, like loading screens or files,
turning sounds on and off, that kind of thing.
Basic Principles
So there are memory banks, optimised commands and AMAL, but at
the centre of AMOS there's the editor and Direct Mode and these
two windows are where everything happens.
The Editor
When you first start the program you get presented with the editor
screen. Figure 2.1 shows you the initial state of the editor, with the
rows of buttons along the top of the screen. (The credits as
pictured here vanish when you press the mouse button.) The
program has disabled the Amiga’s normal windowing system,
Intuition, or at least the Workbench side of it, and so there are no
Amiga back and front gadgets on the window, neither are there any
menus along the title bar. (There's no title bar in fact!) What you
have instead is a pair of rows of buttons along the top of the
screen.
iill-I|_I
--'- 1-- :-'-;-:-.-.'-:-r-r-'-'-'-;-;_- - -'- -:-:- -_.-'.-
-.-'-;-.-.-:---.-:1.;'-'.-_.-:-;-:-.-.-:1:;.1.-.-:-;-.-.-u-':-;-;;.- ;.-.-
"I'iEII-ll-:IT:.':'i'I'i:II'III'I'IPTP':TI'II"' .'I ' ' ' IT1."I*"'-'III'I-‘IF
'I'III'I PIP.'.' '1I'I"""PIP-I '=.I'.PI"I""' -'-'LI" I": '5'" ' I] H
Figure 2.1. AMOS Editor startup screen.
Press the right button and the titles of these buttons change, to the
rows in Figure 2.2. These are your basic AMOS editor commands.
[ill fllllllll I[Ill46 C111?-799856 Fist-1668752 E
Figure 2. 2. Alternate editor menu.
Mastering Amiga AMOS
AMOS Editor Commands
The commands are activated by a clever bit of button twiddling.
Click on one of the buttons and the command is activated. Press
and hold the right button, and click on a button, and the new
command (revealed by pressing the right button) will be activated.
For example, clicking on the button on the top left will run a
program, but holding down the right button and clicking on the
same button will load a program. You can also use the Shift key on
your keyboard to get the other menu up instead of using the right
button. Here's what all the commands do, starting from top left and
ending at bottom right:
Obviously this runs the current program. You can also press F1 to
achieve the same result. The program is first tested for any syntax
errors and then it is run, until an error occurs that is. If you get an
error of any kind (see Appendix B for more details) then the
program will stop with an error message at the bottom of the
screen, giving you a fair idea of what went wrong and where.
Test
This command tests the program without running it. If you have
written any obvious syntax errors into your program, these can be
weeded out here. These will generally include any unintentional
mistakes like using an AMOS keyword as a variable name, like
A$=Load. If your variable is correctly named, it will always appear
in capitals, but if you've used a keyword by mistake, it will start
with a capital letter and the rest of the word will be lower case.
lndent
Indents all the lines (like the lines within a loop) which are better
off indented in the program to show the program structure. This
just neatens up your program and makes it easier to read, rather
than affecting its function.
Blocks Menu
This takes you into the Blocks menu, replacing all the main menu
command buttons with new commands for marking, cutting and
pasting sections of your programs.
Search Menu
This takes you to the Search menu, where you can apply
search/replace type commands to your program.

You might also like