View Single Post
Old 23 June 2011, 03:48   #10
Zone Friend
Join Date: Jun 2001
Location: Germany
Age: 42
Posts: 5,858
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

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
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.06064 seconds with 9 queries