Amos Professional Manual  Contents  Index

AMAL


To animate computed Sprite numbers 16 to 63, they must be directly allocated to an animation channel with the CHANNEL command, like this:

X> Load "AMOSPro_Tutorial:Tutorials/AMAL/Channel 20 To Sprite 18"

The X,Y registers in your AMAL program now refer to the hardware coordinates of the selected Sprite, and the current image of that Sprite is held in register A.

Animating Bobs
A Bob is assigned to an animation channel in the same way, and will be treated in an identical manner to the equivalent hardware Sprite. The only difference will be that registers X and Y will hold the current Bob position in screen coordinates.

Please loads the following program for a demonstration of assigning channels:

LD> Load "AMOSPro_Tutorial:Tutorials/AMAL/AMAL_4.AMOS"

Animating more than 16 Objects
As has been explained, up to 16 different AMAL programs can normally be executed at one time. This limitation is imposed by the Amiga's interrupt capabilities being unable to cope with more. Fortunately, the AMOS Professional programmer is provided with the means to beat this limitation, by executing AMAL programs directly, and bypassing the interrupt system altogether.

SYNCHRO
SYNCHRO ON
SYNCHRO OFF
instructions: execute AMAL programs directly
Synchro
Synchro On
Synchro Off

All AMAL programs can be run by a single call to the SYNCHRO command. Prior to calling SYNCHRO, the interrupts must be turned off with a SYNCHRO OFF instruction. It is important that this is done before defining your AMAL programs, otherwise you will still be restricted to using channels 0 to 15.

Because AMAL programs are so much faster than their Basic equivalents, animations will be incredibly smooth, even when the limit of 16 Objects is broken. For a ready-made example please load the following program:

LD> Load "AMOSPro_Tutorial:Tutorials/AMAL/AMAL_6.AMOS"

Manipulating screens
The CHANNEL command is not restricted to assigning Objects. It can also be used to affect entire screens in four different ways: positioning screens, scrolling screens, changing the screen size and generating rainbow effects.

Back    Next
07.06.13