View Single Post
Old 24 June 2011, 02:53   #11
Ze Emulatron
Registered User

Join Date: Nov 2010
Location: Invercargill, New Zealand
Posts: 176
Originally Posted by andreas View Post
You need a CLEAR *before* loading the big'un.
Once the memory reserved by AmigaBASIC itself to LOAD the program is insufficient, you can CLEAR as much as you want in your code, it won't work.

What DOES work is to use a loader-mainmodule mechanism.
So use myprogram-loader.bas to do your CLEAR stuff and then, in there, use another line to CHAIN into the main program, "myprogram.bas".
This worked for me, and I could make the main program really big without ever running into problems. Of course you should not attempt to run "main" directly, this won't work - using the loader is a must.
Thanks for the suggestion but I don't think I need to use myprogram-loader.bas and CHAIN into the main program, I was only having the problem in AmigaBASIC and it is working now I use CLEAR ,100000 before I load my program, AmigaBASIC wouldn't run it before but it compiled with AC-Basic Compiler v1.2 (1987)(AbSoft) and worked perfectly fine as an executable.
Ze Emulatron is offline  
Page generated in 0.03945 seconds with 10 queries