                           ---------------------
                            AMOS Hints and Tips
                           ---------------------

The following hints and tips have been taken from various sources and as
such we are unable to credit all of you.  Thanks to everyone.  If you have
any AMOS hints/tips then send them to the usual address, marked `AMOS
TIPS'.


DOS Calls
---------

For the more advanced among you, the following two lines of code open and
close workbench from AMOS (the AMOS command Close Workbench does not work
properly!)

A=Intcall(-210) : Rem Open Workbench using _LVOFreeMem

A=Intcall(-78) : Rem Close Workbench


Toggle!
-------

To toggle the value of a variable between 0 and 1 automatically, use this
very handy little line:-

T=1-T


Centre Text
-----------

AMOS uses the centre command to centre PRINTed text, but what about TEXTed
text? (if you understand).  This routine centres text on the horizontal
axis:-

_CEN_TEXT["HI NBA READERS!",100]
'
Procedure _CEN_TEXT[TXT$,Y]
NBA=Len(TXT$)
Text Screen Width-(NBA/2),Y,TXT$
End Proc


Debug
-----

Here's a useful AMAL debugging routine.  It single-steps through any AMAL
string (i.e. one command at a time):-

Procedure _SINGLE_STEP
    Synchro Off
        While Key State(95)=0
        Wait Key
    Synchro : Wait Vbl
   Wend
  Synchro On
End Proc


THAT'S ALL FOLKS!!!!!!!!!!!!!!!!!!!!















