Page 1 of 1

Program-memory overflow

Posted: Thu Jan 08, 2009 3:24 am
by abidingjungle
Hello,

I got this "Program-memory overflow" error as shown below.

From Microsoft's website (http://support.microsoft.com/kb/37770) it seems like I have use subroutines and functions to solve the problem.

But most of the program is written by someone else, so I don't want to change it too much.

Is there a way to change the limit of the memory? Maybe I can somehow change a parameter in the compiler?

Code: Select all

C:\Users\jonny\>BC TR095-01/E/O/T/C:512;
Microsoft (R) QuickBASIC Compiler Version 4.50
(C) Copyright Microsoft Corporation 1982-1988.
All rights reserved.
Simultaneously published in the U.S. and Canada.
 00F5   056A
                 ^ Program-memory overflow

42861 Bytes Available
10307 Bytes Free

    0 Warning Error(s)
    1 Severe  Error(s)
thanks!

Posted: Sun Jan 11, 2009 1:53 pm
by Buff
You can try using the $DYNAMIC metastatement which may help.
If it is one program, the best bet is to put some of the functions and subs in separate bas files then use the load option and load these other bas files. The system will then make a mak file with the names of the bas files.
When compiling, it will compile each bas individually then link them together allowing for larger programs. To use it this way you may have to add some common and shared statements. Also check to be sure your line lengths are not too long. Try to keep line lengths under 100 characters when possible.