View Single Post
Old 23 June 2011, 03:48   #10
andreas
Zone Friend
 
Join Date: Jun 2001
Location: Germany
Age: 50
Posts: 5,857
Send a message via ICQ to andreas Send a message via AIM to andreas
Nice stuff.
Got some nice C=64 (or Speccy) flavor in there, hehe

Quote:
IIRC you can use the CLEAR command to increase the maximum size of programs. Eg. CLEAR ,50000. The comma is needed. The default is 25000 which isn't much.
Yes, BUT...for one of my programs back then, even a
Code:
CLEAR 100000&,16384&
gave me an "Out Of Memory".
But according to the CLI, there was still LOTS of memory available! (both chip + bogo)
The solution?
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.

Last edited by andreas; 23 June 2011 at 04:09.
andreas is offline  
 
Page generated in 0.04841 seconds with 10 queries