If an optional number is given, then only that AMAL routine will be activated. Similarly, AMAL OFF stops all AMAL programs from executing, by erasing them from memory. They can only be re-activated by using the AMAL command again. By specifying an individual AMAL program number, only that program is stopped.
AMAL FREEZE
instruction: suspend AMAL programs
Amal Freeze
Amal Freeze number
Use this command to temporarily freeze one or all AMAL programs from running. These programs may be started again at any time with an AMAL ON command. Please note that AMAL FREEZE should be used to suspend AMAL before a command such as DIR is executed, otherwise timing problems may happen.
AMREG
reserved variable: give value of AMAL register
register=Amreg(number)
register=Amreg(channel,number)
Amreg(number)=expression
Amreg(channel,number)=expression
The AMREG function allows you to gain access to the contents of internal and external AMAL registers, from inside your AMOS Professional program. An AMAL register number must be specified, ranging from 0 to 25, with zero representing external register RA, up to 25 representing register RZ. An optional channel parameter can be given, where a specified number from 0 to 9 is used to represent the AMAL internal registers from RU to R9.
The following example demonstrates how the position of an AMAL Sprite can be returned:
E> Load "AMOSPro_Tutorial:Objects/Sprites.abk" : Get Sprite Palette Channel 1 To Sprite 8 : Sprite 8,100,100,1 A$="Loop : Let RX=X+1 Let X=RX ; Pause ; Jump Loop" Amal 1,A$ : Amal On : Curs Off Do Locate 0,0 Z=Asc("X")-65 Print Amreg(Asc("X")-65) : Rem Use Asc to get register number Loop
AMPLAY
instruction: control animation produced by PLay
Amplay speed, direction
Amplay speed,direction start To end
Movement sequences that have been produced using the PLay command are controlled