home *** CD-ROM | disk | FTP | other *** search
- fff00000ff00fe0080001a7f
- ^4*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF
-
- ^2 T O T A L L Y A M A L
-
- ^1 By Paul Townsend
-
- ^5 Of Technical Fred Software
-
- ^4*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF
-
- ^2 So you want to learn Amal ?
-
- ^3 Sure ?
-
- ^7 In that case read on !
-
- ^4*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF
-
- ^1 The Very Beginings
-
- ^6 It seems that there are a lot of people out there who seem to be
- ^6getting the hang of Amos Basic, but seem to be having difficulty in
- ^6using Amal, this short tuturial aims to get those people started at
- ^6writing simple programs in Amal.
-
- ^6 This tutorial has no intentions of teaching you to program in BASIC,
- ^6there are enougth books on that already.
-
- ^6 I do not think that I am any expert with Amal ( At least not yet !),
- ^6I am still getting to grips with some of it's finer details, but I
- ^6will try to tell you what little I know in a bit more detail and in a
- ^6more understandable way than the Amos manual.
-
- ^6 Right that's enough waffle, let's get down to business.
-
- ^6 First I will out line a couple of rules that you must always follow
- ^6when using Amal.
-
- ^1 Rule 1
-
- ^4This is the one mistake that many new users seem to make,
-
- ^2 A M A L I S C A S E S E N S I T I V E
-
- ^4 That means that it is VERY fussy when it comes down to giving it
- ^4commands, you may have noticed that whenever you type in a command in
- ^4normal Amos, it noes not matter whether you use UPPER case (Capital
- ^4letters eg.'ABCD') or lower case letters (small letters eg. 'abcd'),
- ^4for example take the "Print" command, Amos does not care if you
- ^4type:-
-
- ^2PRINT
-
- ^2print
-
- ^2Print
-
- ^4or even :-
-
- ^2PrInT
-
- ^4It always seems to understand and convert it to :-
-
- ^2Print (i.e. the first letter is Captal, the rest are not !)
-
- ^4 You may be forgiven for thinking that Amal would be just as
- ^4carefree, well sorry to disappoint you, but Amal is nowhere near
- ^4being that helpful
-
- ^4If you mean,
-
- ^2For X=1 To 100 ; Pause ; Next X
-
- ^4then that is what you must type in to Amal, it's no good saying,
-
- ^2For X=1 to 100 ; Pause ; Next X
-
- ^4because it just will not work
-
- ^6Spot the difference?
-
- ^1 Yes there is one, look carefully, the word 'to' in the second
- ^1example should be 'To' not 'to', you see what a headache Amal can be
- ^1to it's newcommers.
-
- ^1 Don't worry if you don't understand what the last line of Amal
- ^1commands meant, all will be revealed later, as long as you can see
- ^1the difference between them, then you are over one of the first Amal
- ^1hurdles.
-
- ^7 Rule 2
-
- ^2Colons (:) in Amal
-
- ^6 When programming in BASIC you may be used to using the colon to
- ^6seperate commands that you want to stay on the same line for
- ^6example:-
-
- ^2For F=1 To 100 : Print "Hello" : Next F
-
- ^6The use of the colon changes once in Amal. (More on this later)
-
- ^6 To keep things simple, to separate commands in Amal, just use a
- ^6semi-colon (;) like I have done in the above examples
-
- ^6 To get commands into Amal you first need to get them into an Amos
- ^6String, the simplest way I have found is to say somthing like :-
-
- ^2AM$="For R0=1 To 100 ; Pause ; Next R0"
-
- ^6And then to run it use the following:
-
- ^2Amal 1,Am$
- ^2Amal On
-
- ^6 This will get your Amal program running, (Hopefully!). If you run
- ^6that last program, what do you see? If you ran it and got absolutely
- ^6nothing at all, then it probably worked OK. If you got one of those
- ^6ever so helpful "Syntex Error in Animation String" messages then look
- ^6carefully at the program and make sure that everything is typed in
- ^6correctly.
-
- ^6 OK. so you want me to tell you why you should have got nothing on
- ^6the screen? Well if you look at the above AM$, you may recognise
- ^6that it looks a little like an Amos Basic Program i.e.
-
- ^2For R0=1 To 200
- ^2Pause
- ^2Next R0
-
- ^6 The Pause statement in Amal is rather like the Wait Vbl statement in
- ^6Amos Basic ie does nothing but waits for a while (about the same as
- ^61/50th of a second). This is why nothing appears on the screen,
- ^6because like all computer languages, they only do what is asked of
- ^6them no more and no less. (That's the theory anyway, I've never yet
- ^6ASKED foe a Guru meditation message in any of my programs, they just
- ^6happen whenever the computer seems to feel like it, but you know how
- ^6theories go don't you?)
-
- ^7 If you want something more interesting to happen then we are going
- ^7to have to tell Amal to move something around for us. To do this we
- ^7need to tell a Bob or Sprite to ATTACH itself to your Amal program,
- ^7to do that we need a Channel Command ie:
-
- ^2Channel (Amal program number) to Bob (Bob number)
-
- ^7We will now include that in the above example:
-
- ^2Load "Sprites.ABK" REM: LOAD IN A SPRITE BANK HERE
- ^2AM$="For R01 To 200 : Let X=R0 : Let Y=R0 : Next R0"
- ^2Bob 1,0,0,1
- ^2Channel 1 To Bob 1
- ^2Amal 1, AM$
- ^2Amal On 1
- ^2Direct
-
- ^7 Type this in and run it. Remember that you will need to load in a
- ^7sprite bank!
-
- ^7 Hopefully this should move your Bob diagonally on the screen.
-
- ^7 How do we get it to move back the other way?
-
- ^6 Well I will leave you with that teaser and next issue I will tell
- ^6you the answer, so why not have a go yourself? Don't be afraid to
- ^6experiment, you cannot do any harm to your computer if you get it
- ^6wrong! (It may sulk and Guru, but just show it who's boss and hit
- ^6that left mouse button and try again!)
-
- ^2 Finally, is there anything you want to know how to do in AMOS or
- ^2AMAL? If so why not drop a line to Totally Amos at the usual
- ^2address?
-
- ^3 See you next Issue.
-
- ^3 Paul Townsend.
-
- ^4*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF*TF
- \