AMOS:More about Extensions

From Amiga Coding
Revision as of 22:25, 11 March 2008 by Spellcoder (talk | contribs) (Article by Kyzer)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

When you use extension instructions in your AMOS programs, AMOS only stores two things about them in your source code: the extension slot number, and the extension token number. As stated before, most tokens in AMOS are simply an index into AMOS's central symbol table, which includes the name of the instruction in ASCII, the number and type of parameters the instruction takes, and the actual code for carrying out the instruction.


Extensions are just the same as AMOS's main symbol table. So, armed with an extension slot and index into its token table, you can call any extension instruction. However, there are two big problems with this approach.


Firstly, there are many extensions which use the same slot number as other extensions. Technically you can use any slot number for an extension, although all extensions have a recommended slot number and source code using this extension will most likely have been created with the extension loaded in the recommended slot.


Secondly, some extension authors do not retain backwards compatibility with older versions of their extensions. For example, the author of the TURBO Plus extension changed the two "Reserve Object Chip" and "Reserve Object Fast" instructions into a single "Reserve Object" instruction. He did this by physically removing the first two instructions from the extension's instruction list, and then inserting the new instruction. This is the only bad change he ever made, but it causes a disaster, because it means that all instructions in the list after that instruction have now changed their instruction number. If you try to load your old AMOS programs that used TURBO Plus version 1.0 with the latest TURBO Plus extension, they will fail to load correctly.


This didn't have to happen! He could simply have left the old instructions alone, and added the new instruction at the end of the list! The same problem exists with the GUI extension, all it did was insert a new form of the "Gui Wait" instruction into the list, and completely ruined backwards compatibility in doing so.


Here is a list of the modules I have found for AMOS and have extracted the symbol tables from. The slot number listed is the recommended slot number for the extension. The Filename is the on-disk filename of the extension. The "Symbols" column is the name I have given to the extracted symbol tables. Where two different extensions share the same symbol name, it is because I have verified that they are compatible with each other, i.e. one has either all of the other's instructions, or a subset of them, and the token number for each instruction does not change between the two modules.


Also noted are the versions of the extension I used. These are the latest ones I can find, and generally all earlier releases have been looked at and found to be backwards compatible. If you have a newer version, I want to know about it!


Slot Filename Symbols AMOS 1.x version AMOS Pro version
1 Music.Lib / AMOSPro_Music.lib music 1.62 2.00
2 Compact.Lib / AMOSPro_Compact.Lib compact 1.2 2.00
3 Request.Lib / AMOSPro_Request.Lib request 1.41 2.00
4 3d.lib 3d 1.00
5 Compiler.Lib / AMOSPro_Compiler.Lib compiler 1.35 2.00
6 Serial.Lib / AMOSPro_IOPorts.Lib ioports 1.2 2.00
6 AMOSPro_IOPortsJ.Lib ioports 2.1J
8 AMOSPro_AMCAF.Lib amcaf 1.50beta4
10 dump.lib dump 1.0
10 Ercole.Lib / AMOSPro_Ercole.Lib ercole 1.6 1.6
10 LDos.Lib ldos 2.5unreg
11 LSerial.Lib lserial 2.1unreg
12 TURBO1_9.Lib / AMOSPro_Turbo1_9.Lib turbo1 1.9 1.9
12 Amos_TURBO_Plus.Lib turbo1 1.0
12 AMOSPro_TURBO_Plus.Lib turbo2 2.15
12 BUtility.Lib butility 1.21
13 Amos_PowerBobs.Lib / AMOSPro_PowerBobs.Lib powerbobs 1.0 1.0
13 Personnal.Lib / AmosPro_Personnal.Lib personnal 1.0 1.0
14 AMOSPro_Game.Lib game 0.9
15 amospro_delta.lib delta 1.6
15 AMOSPro_DOOM_Music.Lib doom 2.0
16 AMOSPro_EasyLife.Lib easylife 1.09
17 AMOSPro_locale.Lib locale 0.26
17 AMOSPro_Make.lib make 1.2
18 CRAFT.Lib craft 1.00
18 AMOSPro_JDInt.Lib jdint 1.3
19 MusiCRAFT.Lib musicraft 1.00
19 AMOSPro_JDK3.Lib jdk3 1.1
19 MED.Lib med 7.1
20 AMOSPro_JDColour.Lib jdcolour 2.0
20 stars.lib / starspro.lib stars 2.33 2.33
20 AMOSPro_OS_DevKit_20.Lib osdevkit 1.61
21 AMOSPro_DBench.Lib dbench 0.42
21 AMOSPro_Prt.Lib prt 1.4
21 Opal opal 1.1
22 AMOSPro_JD.Lib jd 5.9
22 AmosPro_First.Lib first 0.10.1
22 AMOSPro_Jotre.Lib jotre 1.0
23 AMOSPro_Colours.Lib colours 1.0
23 AMOSPro_Misc.Lib misc 1.0
23 AMOSPro_Tools.Lib tools 1.01
24 AMOSPro_GUI.Lib gui 1.62
24 AMOSPro_GUI_2.Lib gui2 2.1
24 AMOSPro_sln.Lib sln 2.0
25 Int.Lib / AMOSPRO_Int.Lib int 1.0 1.0
25 AMOSPro_P61.Lib p61 1.2
25 AMOSPro_JVP.Lib jvp 1.0
25 AMOSPro_TFT.Lib tft 0.7


Wanted extensions

These are extensions that may exist, but I (Kyzer) don't have. Can you help?

Slot Name AMOS 1.x version AMOS Pro version Notes
1 Enhanced Music 3.00 3.00 Demo version can be found on AMOS PD #600. May go up to v4.64.
4 Voodoo 3D 1.02AP I have 1.0 for AMOS 1.x, but no Pro version.
5 Compiler 1.36 I have 1.35.
7 TOME 4.24 4.24+
8 CTEXT 1.32 Obsolete with Kickstart 2.04+
9 Range / Shuffle 2.8 2.9plus Range is an AMOS Club extension
10 Dump 1.0 I have the AMOS 1.x version, but no Pro version.
10 Ercole 1.7 1.7 I have 1.6.
10 LDOS 2.6 1.1 I have 2.5unreg for AMOS Pro, but no other versions.
11 Lserial 1.00 I have 2.1unreg for AMOS Pro, but no other versions.
12 Turbo Plus 2.00 I have 1.0.
15 D-SAM 1.01
16 EasyLife 1.44 1.10
17 Sticks 1.00
17 Falcon - Any
20 THX 0.6
20 AGA 1.00 1.00
22 Second-Hand Extension 0.01d6
23 JADE Any
24 Diagnostics Any
24 GUI 1.70 (I have 1.62)