Size limits in PowerBasic? 
Author Message
 Size limits in PowerBasic?

Maybe someone can answer a general question....

I've written a stocktaking/ordering program for a friend in QuackBasic
4.5, it runs in DOS / Win95DOS, and currently is about 110K compiled.

I keep having size problems - that is, even though the source code's
already in four modules, I get 'out of room' errors at compile time,
and when my friend writes a long invoice he gets 'Out of string
space'.  This seems absurd on a newish 16MB  DOSbox.

I put it down to QuackBasic's antiquated architecture.  Probably there
are ways round it but I'm not a professional programmer and I'd sooner
be worrying  about the program logic than fighting arbitrary space
limits.

So my question:   Would FirstBasic or  PB for DOS  'fix' my problem,
i.e. do they make use of much more RAM than QB will?  I don't mind
buying the program _if_ it'll do the job.   The FAQ says I can get a
trial version from  powerbasic.com but I've looked at the site and
can't see any download links.

Chris Rodliffe



Mon, 22 Apr 2002 03:00:00 GMT  
 Size limits in PowerBasic?

Quote:

> This seems absurd on a newish 16MB  DOSbox.

> I put it down to QuackBasic's antiquated architecture.

The absurd part is a "newish 16MB DOSbox".

Your problems are more related to the antiquated architecture of DOS and the
16-bit Intel architecture.  Regardless of the memory installed, a 16-bit
program can only directly access 1 meg.  Access to any more can only be done by
using a slow, archaic swapping mechanism that moves blocks of memory into and
out of this 1 meg address space.  In other words, there is no good, clean,
efficient way to make use of all that memory under DOS.

Some of your problems are related to the QBasic memory model which is again
related to 16-bit Intel architecture.   PB uses a different memory model and has
some workaround features which may offer partial relief but the only real cure
is to do what the rest of the world has done and leave DOS behind.



Mon, 22 Apr 2002 03:00:00 GMT  
 Size limits in PowerBasic?

Quote:
chris wrote...
> So my question:   Would FirstBasic or  PB for DOS  'fix' my problem,
> i.e. do they make use of much more RAM than QB will?  I don't mind
> buying the program _if_ it'll do the job.   The FAQ says I can get a
> trial version from  Powerbasic.com but I've looked at the site and
> can't see any download links.

Chris

IF you are running Win9x and IF you want to stay with the "simple" DOS text
mode interface, THEN may I suggest you take a look at the PowerBASIC Console
Compiler.  I have just completed an online (ie, CGI) system that does the
following, among other things:

1. Reads database records that are 5775 bytes long.  Holds up to 100 of
these records in memory simultaneously -- thats 577,500 bytes of string
storage in addition to normal processing overhead, which can be another
250,000 or more.

2. Each record can have up to five different formats -- handled in a single
GET$ using the user-defined UNION type.  For example, dbRec.Master.ItemNo is
a string that occupies the first 10 characters of an Item Master record;
however, dbRec.Part.PartNo is a string that occupies the first 6 characters
of a record, followed by a 32 character string that is the description.  The
first four characters of the part description are in the same "space" as the
last four of the Master.ItemNo.

3. Creates multiple indexes for the database (approx 2500 records) on the
fly using the built in ARRAY SORT function.  Takes only a couple of seconds.

4. Creates HTML output IN A SINGLE STRING that routinely exceeds 200K.
Further, the content of this string is modified with various PB string
editing commands prior to output.

I haven't worked with QB 4.5 in a while, but as I recall it can't come close
to doing these kind of things.  And for what its worth, my CGI app kicks the
{*filter*}out of the ASP/VBScript system it replaced.  Well, I can't really say I
replaced the old system -- since they never could get the old one to work!

PBCC is worth every dollar.  And with the money back guarantee, it is hard
to go wrong.  Give it a whirl.  And get ConsoleTools et al while you're at
it.

Scott



Mon, 22 Apr 2002 03:00:00 GMT  
 Size limits in PowerBasic?

<snip>

Quote:
>So my question:   Would FirstBasic or  PB for DOS  'fix' my problem,
>i.e. do they make use of much more RAM than QB will?  I don't mind
>buying the program _if_ it'll do the job.   The FAQ says I can get a
>trial version from  Powerbasic.com but I've looked at the site and
>can't see any download links.

Well, if PB/DOS can't do the job (and I'd bet it would) the PB/cc most
definately would! The easiest way to get the trial version would be to go to
ftp.powerbasic.com and d/load TRYPB35.ZIP (or whatever).

C'ya,

   ____    _    ____      ____  _____
  |  _ \  / \  / ___) __ | ___)(_   _) Don Schullian

  |____//_/ \_\(____/\__/|_|     |_|    www.DASoftVSS.com
  ___________________________________   www.basicguru.com
      Vertical Software Solutions



Tue, 23 Apr 2002 03:00:00 GMT  
 Size limits in PowerBasic?

says...

Quote:

> > This seems absurd on a newish 16MB  DOSbox.

> > I put it down to QuackBasic's antiquated architecture.

> The absurd part is a "newish 16MB DOSbox".

> Your problems are more related to the antiquated architecture of DOS and the
> 16-bit Intel architecture.  Regardless of the memory installed, a 16-bit
> program can only directly access 1 meg.  Access to any more can only be done by
> using a slow, archaic swapping mechanism that moves blocks of memory into and
> out of this 1 meg address space.  In other words, there is no good, clean,
> efficient way to make use of all that memory under DOS.

> Some of your problems are related to the QBasic memory model which is again
> related to 16-bit Intel architecture.   PB uses a different memory model and has
> some workaround features which may offer partial relief but the only real cure
> is to do what the rest of the world has done and leave DOS behind.

Good answer.

PB/DOS uses the large memory model, so you can use all available memory
in the first meg for arrays and strings.  I believe that QB45 allows you
to use all available memory in the first meg for arrays, but not strings
(they limit you to 64k).

PB/DOS also supports arrays in EMS memory up to the limit of your EMS
manager (EMM386.EXE limits you to 16 megabytes).  These "virtual arrays"
are slower than regular arrays, but the advantage here is size, not
speed.

By moving into Windows (either one of our Windows compilers, or even VB)
you gain access to 2 gigabytes of memory without (in PowerBASIC anyway)
sacrificing speed.

--Dave



Tue, 23 Apr 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Allowable size of Powerbasic programs?

2. VSAM size limits?

3. DBConnection<<open connection string size limit...

4. J LIMIT ERRORS REVISITED (was J Session Manager Size)

5. POST Request size limit with VAST/Web Connection/ISAPI

6. File Size limit

7. array size limits

8. File size limit in ST/V 286 ?

9. Data Dictionary Size Limits?

10. Printing Images - size limit?

11. source file size limit in 5.5

12. EXE Size Limit??

 

 
Powered by phpBB® Forum Software