Ultimate Amiga

Network Boards => AMOS Language Discussion => AMOS Factory => AMOS Forum => Topic started by: gibs on April 14, 2014, 08:49:19 PM

Title: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: gibs on April 14, 2014, 08:49:19 PM
Hello,
Is it possible to compile with Turbo Plus Extesion ? each time I try to compile, I get an error message:

Compilation Cancelled
Disk Error : Object Not Found

Thx
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: bruceuncle on April 15, 2014, 05:41:18 AM
I haven't looked at the compiler yet as I want to get AMOS Pro and its documentation bug-free first.  And I don't want to get too distracted or I won't know where to stop  ;D .

However, a few quick searches through the compiler source shows that the error you quote means that it can't find a file.  The reality is that the eror message itself may not be correct.  If you're getting the "Compilation Cancelled" message (the original compiler config uses "Compilation aborted", are you sure that's the exact wording?) you should also, usually, be getting a line number for where the error is.  As you don't show a line number, I would suspect that maybe something's going wrong in initialisation or some section of the compiler's code is running wild.  Do you get any other messages at all when this happens?

A few other questions for future reference:

I know that's not much help, but if it's any consolation I get compiler errors completely unrelated to what the actual error might be.  If your code is working okay in the interpreter, it should, in theory, compile.  However, it often doesn't!  The fact that incorrect error messages sometimes pop up would seem to indicate that there's something "running amok" in the compiler code.  So I can't be much more help until I get around to finding the compiler's problems and fixing them.  Which is some way off yet...
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: gibs on April 15, 2014, 07:29:09 AM
Hello,
Thanks for the quick answer :)
-Yes once the Extension is installed I get the error message
-I don't know if it's registered, this is the one I get here (2.15). How to check ? Is it still possible to register ? (even compiling a single "cls" instruction).
-No I get the error once I install the Turbo Plus Extension (even 1.0 did the same).
-Yes AmosPro 2.0 (Extension 2.15 and also 1.0).

Thanks again.
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: gibs on April 15, 2014, 06:57:33 PM
The full message is :
Compilation progress panel

Compilation Cancelled !
Unnamed.AMOS
Disk Error : Object Not Found

But it also doesn't want to let me compile a .AMOS from the compiler (without using the editor).
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: bruceuncle on April 16, 2014, 09:09:20 AM
Thanks for the feedback.  That nails it as the extension being at fault. 

To save confusion, I'll use the term "library" instead of "extension", as all the AMOS instructions reside in libraries.  The core ones come supplied, the extension libraries just add on to that.  AMOS makes no distinction when it loads them.  (Not quite true as the main AMOSPro.Lib does get some special attention, but it doesn't affect what happens with the rest.)

Many libraries make use of the "initialisation code" feature for libraries.  Each library's "initialisation code" is run after the interpreter has loaded all registered libraries.  ("Registered" just means that you've told the interpreter's config file what libraries to expect and what their library slot number is.  Turbo is in slot 12.  It's what you do in the editor when you add an extension library.)  The code usually does things like allocating storage and initialising data.

That seems to be where it's failing.  I don't know why the compiler should complain at that point unless it runs any initialisation code (which to me wouldn't make sense, but I haven't pulled the compiler apart yet so I may well be talking rubbish :) ).  Another possibility is that the structure of the library is not quite correct and that's upsetting the compiler.  It's interesting that it's only happening with this extension library loaded - it gives a nice clear-cut case of "It don't work - ever!" to look at.

With the Turbo extension library, from just a quick read through the docs, it also looks likely that it may be stepping outside the amos.library functions and data structures to do what it advertises.  That may also cause a bit of strife with the compiler.

Oh well, that's probably not all that much use to you.  It just reminds me how much work there is ahead when we finally get into cleaning up extensions!  (After the bug-free and documented AMOS Pro V2.xx and the AGA AMOS Pro V3.xx projects are completed.  So not next week then...   ;) ).
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: gibs on April 16, 2014, 11:56:35 AM
Thanks for the detailed information :)
It's not the only library extension that fail with the compiler. Maybe we need to list them somewhere ?
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: BooBoo on April 16, 2014, 04:27:40 PM
You can definitely compile with this extension - But i know Ive had this problem - I think I could only compile to Volume DH0: ?
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: gibs on April 16, 2014, 08:28:44 PM
Hello Boubou, it's encouraging !

I tried to:
-Copy program.AMOS to DH0:
-Load it from DH0:
-Compile From the Editor >> Fail

Then, from the Workbench, I launched the compiler and tried to compile a program with a command from TurboPlus.

Now I have another error message :

Compilation Error Report
Program.exe
Extension Not Loaded At Line 34: >>>

Note: From the Editor, the Extension is loaded, and the program is running fine.
I'm confused :-/
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: Lonewolf10 on April 17, 2014, 04:52:41 PM
Then, from the Workbench, I launched the compiler and tried to compile a program with a command from TurboPlus.

Now I have another error message :

Compilation Error Report
Program.exe
Extension Not Loaded At Line 34: >>>

Note: From the Editor, the Extension is loaded, and the program is running fine.
I'm confused :-/

Both the AMOS Pro Editor and the Compiler have separate configuration files that tell them which libraries (to use bruceuncles terminology) need to be loaded in. I can't recall how to set the ones that the compiler uses, if I ever did. I have always compiled my programs by loading the editor first and then loading the compiler via the drop-down menu (the configurable one, I forget it's name).
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: gibs on April 17, 2014, 05:09:50 PM
Hello,
You are talking about the "AMOSPro_Interpreter_Config" file which is located is S:

I don't have any other copy of this file in my system (I read the compiler documentation) and this "AMOSPro_Interpreter_Config" file is set at the first line of my "Compiler system file", I can read:
1 - S:AMOSPro_Interpreter_Config

So when I check for error my AMOS Program using a command from the Turbo Extension Plus, I don't have any error and the program is running fine, then If I start the compiler from the Editor, I get the error message described in my 1st message on this thread.

Snoopdos, didn't help... so I don't know...any idea is welcome :)
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: Lonewolf10 on April 17, 2014, 05:27:37 PM
Hello,
You are talking about the "AMOSPro_Interpreter_Config" file which is located is S:

Yes. Make sure that the above named file is the same for both the editor and the compiler. The easiest way is to carefully copy it from "AMOSPro/S/" to "Compiler/s/". If you want to be safe rename "Compiler/s/AMOSPro_Interpreter_Config" to something else (e.g. "old_Interpreter_Config"), just incase something goes wrong.

I hope this helps. It is frustrating spending ages coding something and then finding that it won't compile.
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: gibs on April 17, 2014, 05:35:58 PM
No.

S:AMOSPro_Interpreter_Config is different than S:AMOSPro_Compiler_Config : there are 2 different files.

But  S:AMOSPro_Interpreter_Config is linked in S:AMOSPro_Compiler_Config
You can see that in the Compiler options, in the box "Compiler System files".
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: Lonewolf10 on April 17, 2014, 05:47:12 PM
S:AMOSPro_Interpreter_Config is different than S:AMOSPro_Compiler_Config : there are 2 different files.

But  S:AMOSPro_Interpreter_Config is linked in S:AMOSPro_Compiler_Config
You can see that in the Compiler options, in the box "Compiler System files".

Yes, I believe they both need to be in the "S" folder. My "Compiler/S" folder contains:

AMOSPro_Compiler_Config
AMOSPro_Interpreter_Config
AP_Interpreter_Config-ori   (an old version of the AMOSPro_Interpreter_Config)
startup-sequence
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: gibs on April 17, 2014, 05:48:31 PM
Can you try to insert the extension and compile ?
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: Lonewolf10 on April 17, 2014, 06:00:04 PM

As far as I can tell the only way to "insert" extensions is to copy across the "AMOSPro_Interpreter_Config" file into the "Compiler/s/" folder as mentioned above.
I'll give it a try later today, as I don't have the time right now.
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: Lonewolf10 on April 18, 2014, 11:38:09 AM
I have installed AMOSPro TURBO Plus Extension V 2.15 and successfully compiled the "F_Plot_Starfield.AMOS" file from the editor.

However, after copying across the "AMOSPro_Interpreter_Config" file in to the "Compiler/s/" folder and adding the "AMOSPro_TURBO_Plus.Lib" file into "Compiler/APSystem/" folder I get the same error you get ("Extension not loaded at line: xx").
This is probably why I always compiled from the editor, as I never got the standalone compiler to work with 3rd-party libraries (extensions).
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: gibs on April 18, 2014, 02:23:37 PM
Thanks Lonewolf.
Since the beginning I don't understand what you mean when you say : "Compiler/s/" because I only have a directory named "Compiler" which is inside "AmosPro" directory.
So I thought you were talking about the Floppy "Compiler" directory "S" in the Amiga world I thought you were talking about : "Compiler:S".

I did the HD installation. So I have the "AmosPro" directory in DH0:

What are thou talking about when you say "Compiler/s/"

Thanks again.
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: gibs on April 18, 2014, 07:23:14 PM
I have re-installed the Compiler, and now I can compile with the Turbo Extension.

Unfortunately I didn't found the reason of the issue, but at least it's working.

Note that I had the same problem on 3 different Amiga hard drive. I would have give up if you were not here. Thank you all.

Note: If you have "PowerBobs Registered" it's welcome :) I tried to contact the author on Linkdin but I wasn't able to send him a message. I failed (seems that you can't send a message if you don't know the person, if you don't have its email).
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: Lonewolf10 on April 18, 2014, 08:22:16 PM
Thanks Lonewolf.
Since the beginning I don't understand what you mean when you say : "Compiler/s/" because I only have a directory named "Compiler" which is inside "AmosPro" directory.
So I thought you were talking about the Floppy "Compiler" directory "S" in the Amiga world I thought you were talking about : "Compiler:S".

I did the HD installation. So I have the "AmosPro" directory in DH0:

What are thou talking about when you say "Compiler/s/"

Thanks again.

It seems we have 2 different setups. As I use an emulated Amiga (WinUAE on my laptop) I guess I must have created an alternate setup for AMOS Pro. I have a version of the Compiler separate to the editor (along with the program source - Compiler_Shell.AMOS), though looking at the editor, I see that some of the compiler files are part of the editors setup.

I have used multiple versions of AMOS over the years, starting with AMOS BASIC, AMOS Pro 1 and now AMOS Pro 2. Somewhere along the line the mix-up must have occured.
Either way your issue is now fixed :)

I have PowerBobs V1.0, but that should be the same one that is available to download from the downloads section on here (link at the top of the page if you are signed in).
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: bruceuncle on April 20, 2014, 05:14:30 AM
Hmmm.  I'm still not convinced that there's nothing wrong with the extension. 
Why is gibs able to compile without it but it fails when the extension is loaded?

Then again, the following descriptions may throw some light on it...

Hello,
You are talking about the "AMOSPro_Interpreter_Config" file which is located is S:

Yes. Make sure that the above named file is the same for both the editor and the compiler. The easiest way is to carefully copy it from "AMOSPro/S/" to "Compiler/s/". If you want to be safe rename "Compiler/s/AMOSPro_Interpreter_Config" to something else (e.g. "old_Interpreter_Config"), just incase something goes wrong.

I hope this helps. It is frustrating spending ages coding something and then finding that it won't compile.

The *_Config files work like this:

AMOSPro_Interpreter_Config   This is the key config file for AMOS Pro.  It's used by the Loader, Interpreter, Editor, Monitor and Compiler.  You should only have one copy of this file and keep it in one of the following places:
  • S:
  • S/
  • <Current Directory>
The Loader looks for it in each of those places in turn.  The <Current Directory> is only really useful if you're playing around with different configs for different programs.  But note that it looks in S: and S/ first, so you'd need to do some renaming to force that option.
The best place IMHO is S:.
AMOSPro_Editor_Config   Contains all the additional stuff the Editor and Monitor use.  Mostly the Editor Commands, Editor Shortcut Keys, Accessory Program locations, User Menu, and all the text strings used in the editor.
AMOSPro_Compiler_Config   Contains all the texts strings used in the compiler (including the one that contains the flag characters for the compiler setup).

The compiler first checks to see if the AMOSPro_Interpreter_Config file is already loaded.  If it's been called from the editor, it doesn't need to load the file.  If not, it looks for its own config file in these locations and in this sequence:
which is the reverse of the sequence the Loader/Interpreter uses.  That's why I think it's a bad idea to have the config files in more than one location  ;) .

I haven't checked any further yet, but the strings it uses in the code to check the above locations are a bit strange:


I haven't fully pulled the compiler apart yet so I've no idea how it uses AMOSPro_Interpreter_Config.  But the AMOSPro_Compiler_Config file references it as "S:AMOSPro_Interpreter_Config" which is, presumably, where it expects to find it after it's loaded its own config file.


As to gibs problem:
If the compiler is picking up a different AMOSPro_Interpreter_Config to the one used by the editor, and that file hasn't got the extension included, maybe that's the cause.  The editor will run it okay, but the compiler won't know the extension exists and will throw up those errors.

Sorry to still be a bit vague on the compiler.  I'll be up to my neck in the Loader/Interpreter/Editor bug fixes, docs and help files for a long while yet and can't afford to get too distracted...  ;)
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: gibs on April 20, 2014, 12:54:53 PM
Hi Bruce.
Thanks for the information.

As you said I wasn't able to compile with the Turbo Extension (1.0/1.9/Plus) SET in the editor.
I could not compile even commands if the code were not using commands from the Turbo Extension. Example a single "Cls" failed.

Then Booboo send a tip about compiling from DH0: ,so I put the code (containing Turbo Extension commands) in DH0, and I tried to compile it but it also failed. Therefore from DH0: I could compile code that excluded the Turbo Extension. Ex: I could compile a "Cls" with the Turbo Extension SET in the editor.

I spent almost 10 days on that.
I didn't had a copy AMOSPro_Interpreter_Config elsewhere in the FileSystem that in S: (or DH0:S/).
I was aware of this issue because it's written in the Troubleshooting documentation of the Compiler Documentation.

Then, I have re-installed the Compiler (from the Floppy and while while the Turbo Extension was SET in the Edifor) and the problem has gone.

Note that I still have some Amiga with the same problem that I haven't fixed yet, so I you wish me to make some tests in the "issue environment", I can.
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: bruceuncle on April 23, 2014, 09:58:17 AM
Thanks for the feedback gibs.  I'm going to register this as a bug as it shouldn't be this difficult and confusing to simply add an extension library and compile with it. 

My preference is for all config files to reside in the S: assigned directory and for there to only be one set named with the 'official' names.  Any that are backups or defaults for restoring when things get messy should be named differently and appropriately.

Quote from: gibs
Note that I still have some Amiga with the same problem that I haven't fixed yet, so I you wish me to make some tests in the "issue environment", I can.
Many thanks for the kind offer but I think that might be overkill as we'd need a full dump of each installation to be really useful.  If you've got the time, the location of any config files in each system, plus the files themselves would be a big help anyway.  But don't sweat on it.  I've got enough to be going on with for a bug description.  Don't get too excited (sic) as it will be a while before I pull the compiler apart properly and get into fixing its bugs.
Title: Re: AmosPro Turbo Plus Extension V 2.15 and Compilation
Post by: Lonewolf10 on April 23, 2014, 08:47:54 PM
My preference is for all config files to reside in the S: assigned directory and for there to only be one set named with the 'official' names.  Any that are backups or defaults for restoring when things get messy should be named differently and appropriately.


Sounds like a great idea :)