×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Running out of memory while compiling

Running out of memory while compiling

Running out of memory while compiling

(OP)
When compiling my QBasic program I get the message that I have run out of memory. Is there any way one can write a program in QBasic that requires more than 64K memory? I need to use an array of the size A&(56,44,8), plus a lot of other material, but the A& array blows me out of the compiler. Can I somehow increase the size of the program beyond the 64K limit that apparently the compiler is working with? Nowadays, with so much more computing power, it should be possible to work out larger programs than 64K.
Any advice would be appreciated.
Thanks, Oildad

RE: Running out of memory while compiling

Windows can handle arrays larger than 64K, but QuickBASIC can't because it was written for DOS.  There are other free console compilers for a variety of BASIC languages that WILL handle larger arrays.  For a list of some of them, check out:

http://www.basic.mindteq.com/

Lee

RE: Running out of memory while compiling

There are some ways around the 64k limit (which really is
probably less in acuality).

For programs that do not use large arrays, try making
other programs that just have subs/functions in them with
no main code.

then load them using the load option into the main program.
When you save, a mak file is made that remembers what bas file are included.

How does this help ? Each bas file will be compiled individually then linked to make one program. each has the
64k limit.

There are libraries that allow the use of XMS and EMS memory.

There are also some switches that allow QuickBasic to use
larger arrays. See also $dynamic meta statement.

Hope that helps some

RE: Running out of memory while compiling

(OP)
Thank you both for this helpful information, especially all the different compilers available now.
Reprogramming is not always easy to do. In this particular case the large array is something that will stay active most of the time during the processing of the programming, because it will be used as a decision maker.
I have been a programmer for many years, CDC 3200, CDC 6600, and then IBM. Later in my work computer programs were bought and used as a tool, and from then on I did not so much programming any more. After my retirement I am trying to pick up it up again as a hobby, and I have to readjust my thinking a bit.
Once again, thanks for all your input.

RE: Running out of memory while compiling

PowerBasic has several windows compilers at a reasonable cost. You would not have the memory problem there.

Their support is the best in the business too. Their forum
is outstanding.

RE: Running out of memory while compiling

(OP)
I tried Quickbasic 4.5 (Qb4.5) and found out that the program 'works' there. Apparently size is not so much a problem there. However, the statement CALL ABSOLUTE causes the error message "Subprogram not defined". This statement did not cause that problem with the original QuickBasic compiler. The Index of the compiler mentions the statement as a possibility, but apparently it is not present in the library.
Anybody know on how to bypass this problem. The statement comes from a routine used to use the mouse.

RE: Running out of memory while compiling

In QuickBasic 4.x you must load the library containing call absolute and interrupt.

Start the QB editor with QB /L

That should fix the call absolute error message.
Call absolute is not included in the editor as call absolute is in Qbasic.
 
the L switch is of the form
/L libraryname

Without a libraryname it defaults to QB.QLB (QBX.QLB for PDS). QB.QLB (and the associated QB.LIB) contain Call absolute and Call interrupt and some other related calls.

You may need to include qb.bi in your program for the declarations (or get from qb.bi the declarations and type defs needed).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close