English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. AMOS

 
 
Thread Tools
Old 04 December 2023, 17:20   #1
axel_as
Registered User
 
axel_as's Avatar
 
Join Date: Jun 2022
Location: Italy
Posts: 10
Hooooo AMOS Compiler issue

Hi pals!
I have another problem with the AMOS Compiler.
I've made a program up to 230k long, and when I start to compile, the red progress bar freeze, and nothing more happen. Sometimes really the Amiga crashes (emulated), sometimes the emulator crashes (WinUAE).
During last days, I start to investigate for the possible cause: it was of no use to increase variable memory with 'Set Buffer' command, or to eliminate some matrix there are unused... Maybe are the matrix with double column [i.e. Dim FLP(31,3) or FK#(10,3)]? But some of these I need to use, otherwise I would be forced to do it all over again, and I don't want to do that... Because I'm working for this project 1 year, more or less.
Someone help me . Thanks .
axel_as is offline  
Old 04 December 2023, 18:26   #2
Dan
Registered User
 
Dan's Avatar
 
Join Date: Nov 2004
Location: Germany
Posts: 629
Hi.

If you have the banks saved with the program, try compiling it without them.
(erase all banks, save as new prog and then compile it)
Dan is offline  
Old 04 December 2023, 19:04   #3
axel_as
Registered User
 
axel_as's Avatar
 
Join Date: Jun 2022
Location: Italy
Posts: 10
Unfortunately I try this yet, and the result is the same...
Another attempt was to change the WinUAE configuration by increase the Chip RAM amount to 8MB, with or without Fast RAM, but nothing more better.
But I don't give up!
axel_as is offline  
Old 04 December 2023, 19:05   #4
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,200
I think that the compiler uses relative offsets everywhere. That limits the size of the code to not more than 64k.
Samurai_Crow is offline  
Old 04 December 2023, 19:16   #5
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,812
What's the Size of backbone - its huge.

Go into direct mode and type erase all then save your program. Don't run it again. Then start the compiler for from Amos not separatly etc.
Retro1234 is offline  
Old 04 December 2023, 19:18   #6
axel_as
Registered User
 
axel_as's Avatar
 
Join Date: Jun 2022
Location: Italy
Posts: 10
But with past projects, larger than 300KB, there wasn't problems. Maybe I use too much variables or matrix, nonetheless the 'Set Buffer' command? I don't know because there's no given error messages.
axel_as is offline  
Old 04 December 2023, 19:23   #7
axel_as
Registered User
 
axel_as's Avatar
 
Join Date: Jun 2022
Location: Italy
Posts: 10
Quote:
Originally Posted by Retro1234 View Post
What's the Size of backbone - its huge.

Go into direct mode and type erase all then save your program. Don't run it again. Then start the compiler for from Amos not separatly etc.

Sorry, I try this one from you but the result is the same.
axel_as is offline  
Old 04 December 2023, 19:29   #8
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,200
At one point somebody went through the limitations of the AmosPro compiler in Assembly and documented the limitations. I can't find the post but I think it was on ultimateAmiga.com somewhere.
Samurai_Crow is offline  
Old 05 December 2023, 19:55   #9
adrazar
Registered User
 
Join Date: Feb 2017
Location: Oslo
Posts: 90
I had a problem with compiling too, once. In my case the problem was the following: I had a procedure which would return either True or False, and it ended like this:
Code:
   ...
   Proc LOSETURN
End Proc[True]
For some reason the compiler can't handle a procedure call with no arguments right before ending the procedure with True as return value! It doesn't take more than a couple of minutes to write a program to verify this. (I solved it by returning -1 instead of true )

The symptoms in my case were not exactly the same as those you're experiencing (I got a "Software Failure" dialog in AMOS), so it's probably not the exact same issue. But there's hope you can get to the bottom of it using the same approach as I did, which was (drumroll): to copy parts of the program into a new file until compiling failed. It was a program of substantial size in my case too, if that's any consolation

Just want to mention another compiler-related problem I had in the same project which might be relevant to you as well: The compiled program occasionally displayed some strange behaviour which I could never reproduce in the tokienised version. After battling with that for some days I found eventually that it helped to switch on the compiler flag "long forward jumps (for very large programs)". The program is currently 400k without banks, at that time it was probably somewhere around 300k. So this means you will probably not be warned by the compiler if your program starts to qualify as "very long".
adrazar is offline  
Old 05 December 2023, 21:53   #10
Muzza
Registered User
 
Muzza's Avatar
 
Join Date: Sep 2019
Location: Sydney
Posts: 357
Quote:
Originally Posted by Retro1234 View Post
What's the Size of backbone - its huge.
And I do remember it hit the limits of the Amos compiler. Things just started randomly breaking.
Muzza is offline  
Old 05 December 2023, 22:59   #11
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,812
What do you mean? There is never a complier error with backbone?

Are you Alastair Murray? In which case just ignore the above . But I'd love to hear some stories about when you created Backbone

@OP the only other suggestion is you upload the code - of course this might not be a viable solution for you?

Last edited by Retro1234; 05 December 2023 at 23:43.
Retro1234 is offline  
Old 06 December 2023, 01:29   #12
Muzza
Registered User
 
Muzza's Avatar
 
Join Date: Sep 2019
Location: Sydney
Posts: 357
Quote:
Originally Posted by Retro1234 View Post
What do you mean? There is never a complier error with backbone?

Are you Alastair Murray? In which case just ignore the above . But I'd love to hear some stories about when you created Backbone

Yes, and what I meant is that although I don't recall compiler errors as such, I do remember that the program reached a point where I couldn't make any additions without seemingly random bugs popping up all over the place.
I didn't know why at the time, but some kind of relative offset issue with the Amos compiler would make sense.
Muzza is offline  
Old 06 December 2023, 10:12   #13
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,812
Quote:
Originally Posted by Muzza View Post
Yes,

Shows what i know. Nice to meet you Sir.
Retro1234 is offline  
Old 06 December 2023, 10:17   #14
Etze
A3000-Fan
 
Etze's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 321
Isn’t the source of the compiler available? I’m in no position to do anything with it, but isn’t there anyone with enough knowledge to fix some of the problems?
Etze is offline  
Old 06 December 2023, 10:30   #15
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,941
Quote:
Originally Posted by Etze View Post
Isn’t the source of the compiler available?
Seems like it is: https://github.com/AOZ-Studio/AMOS-P...ional-Official
TCD is offline  
Old 07 December 2023, 17:21   #16
axel_as
Registered User
 
axel_as's Avatar
 
Join Date: Jun 2022
Location: Italy
Posts: 10
Thumbs up Finally I see the light!

Hi everyone !


I finally solved the age-old compilation problem thanks to intuition, remembering a similar situation that happened in the past.


The bug during the compilation of the listing was given by the listing itself: perhaps it has already happened to some of you, who, when typing commands, perhaps in a hurry, press some out of place key or a combination of keys, which remains then trace in the listing.


The AMOS Compiler unfortunately detects these extraneous characters but does not provide a specific error message, so it freezes or crashes.


I discovered this problem by saving the listing in ASCII format and examining it line by line, character by character. During this scan, at a certain point, among all the regular characters, I came across an invisible character bearing the code CHR$(0): it was enough to go back to the original listing, delete this character at the point where I had identified it and proceed with the normal compilation, which obviously was successful, finally, to my great satisfaction and relief.


It was therefore not a problem related to size, because I had already set the "long forward jumps (for very large programs)" flag in AMOS Compiler.


I hope that this experience will help other programmer friends like me and you.


I thank everyone who lent me a hand on the forum to find a solution, and obviously English Amiga Board!


axel_as is offline  
Old 07 December 2023, 17:40   #17
adrazar
Registered User
 
Join Date: Feb 2017
Location: Oslo
Posts: 90
Hard debugging badge earned

Wonder if the retokeniser-option in the user menu could have been used
adrazar is offline  
Old 07 December 2023, 18:24   #18
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,812
Doesn't Test detect it?
Retro1234 is offline  
Old 07 December 2023, 19:25   #19
axel_as
Registered User
 
axel_as's Avatar
 
Join Date: Jun 2022
Location: Italy
Posts: 10
Unfortunately, the test did not show any error: the program runs brilliantly under AMOS Pro... By the way, I don't know, maybe I will use the re-tokeniser option, perhaps it'll resolve some of this issues..
axel_as is offline  
Old 15 December 2023, 09:34   #20
axel_as
Registered User
 
axel_as's Avatar
 
Join Date: Jun 2022
Location: Italy
Posts: 10
Angry Nightmare never ends...

Everything seemed solved, but after the ephemeral success, when I implemented the famous listing by adding other lines of code, there was no longer any way to compile it, AMOS Compiler continues to crash or not complete the compilation.
I have made hundreds of failed attempts, hundreds of different combinations to overcome the problem, but nothing seems to work anymore... I'm desperate, if anyone has a solution let me know.

Maybe it's one of the attempts I've already made, or maybe the final solution.
Bye..
axel_as is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
AMOS Compiler problem Louk Coders. General 4 19 September 2020 21:30
opt. AMOS Pro Compiler Settings? Cylon Coders. AMOS 11 04 April 2016 22:47
Amos Compiler Difficulties amigapd support.Apps 7 07 April 2012 15:52
Request AMOS Compiler manual (Scans) MadAngus request.Other 4 12 December 2011 11:15
Amos compiler nnever2000 request.Apps 3 06 September 2006 19:13

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:17.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12593 seconds with 13 queries