As STOS and Amos are similar languages it was easier to port the STOS code of some of my games to Amos rather than rewrite it. In this article I will show you how to port your code over to Amos.
Converting STOS source code to Amos is easy. Simply save it as an ASCII file with the command save”game.asc”. Then port it over to your Amiga by formatting a MSDOS disk with Fastcopy 3, making sure you turn the fast format option off. Then it’s a simple case of reading the disk in your Amiga’s drive using the Crossdos driver which you’ll find in the Devs drawer on your workbench disk. Simply double click on the icon to activate it. Once it’s on disk then you can simply load the ascii file into Amos with the Load Ascii option.
Now a thing to remember is although Amos has most normal STOS commands, there are still some differences. Let’s take this line.
10 key off : mode 0
In Amos there are no such commands. You should change this to…
10 Screen Open 1,320,200,16,Lowres
This does the same job as the command ‘mode 0’.
When you list your source code you will notice that Amos will show commands it doesn’t understand in capital letters. You just need to find the Amos versions of those commands and change them around.
Sometimes there are problems with loading in certain files with long lines and you will get a “Line too Long” message. All you have to do is load the ASCII file into a word processor and make the lines shorter. For example:
10 for X=1 to 20 : XB(1,X)=FRNE+39*20/200 : next X
This can be set out as…
10 for X=1 to 20
30 next X
If you have a lot of conditions in an If Then statement then you can use an Amos feature which allows you to have as many conditions as you want. This following routine will show you what I mean.
10 If CHOICE=1
20 Screen Copy 5 To 3
30 Music 1
Once the source is converted then it’s time to port over and convert your program’s data. Random Access files and Seq files can still be read within Amos but the commands are slightly different. Chip music will not play on the Amiga but you can play mods in your game instead. Sample banks I have not found a way to convert but you can simply load single samples into Protracker then save the lot as a mod, then save them out when you port the mod over.
Pictures can be loaded into STpaint and saved as IFF files for the Amiga. Sprite banks can be converted to pictures using the Put Sprite command to fill a picture screen with sprites.
Final note: Amos uses both line numbers and labels so there is no need to change that unless you want to.