Memory problem with QB7.1
Moderators:Administrator, Global Moderator
-
- Newbie
- Posts:2
- Joined:Sat May 29, 2004 5:48 am
Although I haven't used the dos version of my application for awhile, I recently found that I get an "Out of Memory" message when I try to load all 7 of its modules. It chokes after about 4 modules. I have Windows XP home as my os. I used to run it without a problem on Win 95/98 machines although I remember having this message before on one of those other machines and I had to fiddle with the config.sys file, himem.sys, etc. to correct it but don't know where to start with this system. I have 512MB now but even with only 8MB of extended memory previously it worked fine. Apparently XP uses it differently with MSDos. Anyone have any ideas? The program will not start from the IDE without all the modules loaded.
Re: Memory problem with QB7.1
Unless you are using a routine to use extended memory
like with an interrupt call, then the amount of extended
memory is of no value. PDS may possibly not be subject
to the 64k limit but probably is.
I would first check line lengths. This can affect it.
Are you using multiple modules that are "loaded" with
a mak file. This is what it sounds like, but if not, check that out. That can make larger programs and the compiler can compile each then link them together.
If you are doing it that way, perhaps one or more modules needs to be further broken up.
Large arrays can frequently cause problems.
Use REM $Dynamic and the /AH switch.
Other than that, you may have to go to multiple programs, using chain/common and brun71.exe (I guess
that's what the pds version of brun45.exe would be).
Hope something in there is usefull to you.
like with an interrupt call, then the amount of extended
memory is of no value. PDS may possibly not be subject
to the 64k limit but probably is.
I would first check line lengths. This can affect it.
Are you using multiple modules that are "loaded" with
a mak file. This is what it sounds like, but if not, check that out. That can make larger programs and the compiler can compile each then link them together.
If you are doing it that way, perhaps one or more modules needs to be further broken up.
Large arrays can frequently cause problems.
Use REM $Dynamic and the /AH switch.
Other than that, you may have to go to multiple programs, using chain/common and brun71.exe (I guess
that's what the pds version of brun45.exe would be).
Hope something in there is usefull to you.
-
- Newbie
- Posts:2
- Joined:Sat May 29, 2004 5:48 am
Re: Memory problem with QB7.1
thank you very much. No arrays. It may be worth it to do the work on a machine that I know can do it.
Re: Memory problem with QB7.1
I too have a memory problem with the learning program that can be downloaded at http://amor.rz.hu-berlin.de/~h0444e1w/vokeng.htm.
It uses arrays and crashes whenever the files are longer than about 3*250 variables.
Unfortunately I do not understand what you wrote:
It uses arrays and crashes whenever the files are longer than about 3*250 variables.
Unfortunately I do not understand what you wrote:
???Use REM $Dynamic and the /AH switch.
Other than that, you may have to go to multiple programs, using chain/common and brun71.exe (I guess
that's what the pds version of brun45.exe would be).
-
- QBasic God
- Posts:166
- Joined:Tue Mar 25, 2003 12:45 am
- Location:U.S.A.
- Contact:
Re: Memory problem with QB7.1
What that means is...
At the beginning of your program add this line...
Then on QB's command line options, add the /AH switch.
For example...
That's what one of mine looks like. You can also look at the command line options in QB under...
HELP/CONTENTS/QB COMMAND LINE OPTIONS
You may also want to look into using EMS\XMS to store your variables. It requires you to code a function to read/write the segment and offset for each variable, but the memory you gain for actual code is wellworth it.
At the beginning of your program add this line...
Code: Select all
'$DYNAMIC
For example...
Code: Select all
C:/QB45/QB.EXE /AH
HELP/CONTENTS/QB COMMAND LINE OPTIONS
You may also want to look into using EMS\XMS to store your variables. It requires you to code a function to read/write the segment and offset for each variable, but the memory you gain for actual code is wellworth it.
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!
Likely this will solve your memory problems
Go to properties of QBX.exe, click memory, set EMS to None, everything else to Auto and check uses HMA. You don't set compatibility to windows 95 or 98, and you can check the "close on exit" (optional), and then click OK. The system automatically creates the qbx.pif file that has the same attributes.
You can double click on either qbx.exe or qbx.pif and it will load any size file, which is a problem some of us have had. Does it work on your machine?
You can double click on either qbx.exe or qbx.pif and it will load any size file, which is a problem some of us have had. Does it work on your machine?