Amos Professional Manual  Contents  Index

AMAL


All AMAL labels are defined using a single capital letter, followed by a colon. In the same way that commands are recognised, any lower-case letters that you may want to use to improve the understanding of your listings will be ignored. So the following labels are all acceptable:

T:
Target:
Zippadeedoodah:

Remember that each label is defined by one upper-case letter only, so in those examples, both T: and Target: refer to the same label! If you forget this, and try to define two different labels starting with the same letter, an error message will be generated.

Each AMAL program can have its own unique set of labels, so it is perfectly acceptable to use identical labels in several different programs.

AMAL registers

LET
AMAL instruction: assign a value to a register
Let register=expression

The Let instruction is used to assign a value to an AMAL register, and it is very similar to conventional Basic except for the fact that all expressions are evaluated strictly from left to right.

The registers are used to hold values in AMAL programs, and allowable numbers range from -32768 up to 32767.

There are three types of AMAL register, as follows.

Internal registers R0 to R9
Every AMAL program has its own set of ten internal registers. Their names start with the identification letter R, followed by one of the digits from 0 to 9 and internal registers are like the local variables defined inside a normal AMOS Professional procedure.

External registers RA to RI
External AMAL registers keep hold of their values between separate AMAL programs. This allows them to be used to pass information between several AMAL routines. There are 26 external registers provided, each having the identification letter R followed by one of the 26 letters of the alphabet from A to Z.

The contents of any internal or external register can be accessed directly from your main AMOS Professional program, using the AMREG function, which is explained later.

Special registers X,Y and A
There is a set of three values which control the status of an Object, and these are held in three special registers. X and Y contain the coordinates of the Object, and A stores the number of the image which is displayed by a Sprite or a Bob.

Back    Next
07.06.04