Board index » delphi » rehash - the 64k limit problem

rehash - the 64k limit problem

Here we go again, I wish Borland would do just one last release of
pascal for dos.
say v8.0 or something, and get rid of the 64k limit, add long filenames,
and that would make everyone happy. maybe.

I have one massive project, using units, and have divested everything
out of the main program I can, but I'm still bumping the 64k limit, even
recoding, cutting things down, paring it down as much as possible, I
have very little room left, maybe 2k at the moment but I have a major
procedure to add! and the stuff I need may run over that.

I can't use overlays the program is real time, and decisions based,
everything needs to be in memory (not module) all at once. can't unload
anything and load other stuff. just won't work. its gotta all be there.

The program uses massive record structures, and very large arrays, and
arrays of records (of arrays even). You can't pass a whole record to a
procedure can you?
(now there's a thought!) how about a procedure in a unit?

How do you pass a whole array? how about a record containing an array,
or an array of records, or a record of array of records?

no the record mess can't be recoded, it's gotta be the way it is.

All this is 200K of source code. yowza!

Dan.

 

Re:rehash - the 64k limit problem


Quote
> Here we go again, I wish Borland would do just one last release of
> pascal for dos.
> say v8.0 or something, and get rid of the 64k limit, add long filenames,
> and that would make everyone happy. maybe.

   It won't happen.  Perhaps you should be looking at one of the 32 bit
Pascals (TMT, FPK, etc.).

Quote
> I have one massive project, using units, and have divested everything
> out of the main program I can, but I'm still bumping the 64k limit, even
> recoding, cutting things down, paring it down as much as possible, I
> have very little room left, maybe 2k at the moment but I have a major
> procedure to add! and the stuff I need may run over that.

> I can't use overlays the program is real time, and decisions based,
> everything needs to be in memory (not module) all at once. can't unload
> anything and load other stuff. just won't work. its gotta all be there.

   I really wonder if this is true.  The TP/BP Overlay Manager is very
good, and what with the sped of PCs and memories today, I would bet that
almost any program application can done with overlays.  I've written many
program which make extensive use of overlaying, and I have yet to
encounter a performance issue with any of them.

Quote
> The program uses massive record structures, and very large arrays, and
> arrays of records (of arrays even). You can't pass a whole record to a
> procedure can you?

   You can pass a pointer to it...or use global data.  Why is this an
issue?

Quote
> (now there's a thought!) how about a procedure in a unit?

   What do you mean here?  Of _course_ you can (and should!) package some
of your program's code in separate Units.  Perhaps we don't have a common
understanding of what you mean by "the 64K limit".  What exactly are you
encountering?

Quote
> How do you pass a whole array? how about a record containing an array,
> or an array of records, or a record of array of records?

   You can do all these things, but Var parameters (pointers) work just
fine and accomplish the same thing as value parameters...with a little
better performance, too.

Quote
> no the record mess can't be recoded, it's gotta be the way it is.

   That's always in question.  Who says so?  Perhaps you're a little too
close to the problem that you can't see how some redesign could solve
many of your current problems.

Quote
> All this is 200K of source code. yowza!

   This whole message has the "look" of a project which has either been
fraught with misunderstanding from its inception or one which has allowed
the perception of its requirements to dominate too much of its
implementation.  As I see this, I can't say what specific actions could
solve the many problems you state, but it more seems as though you should
be stepping back and taking a wholly different view of it and what needs
to be accomplished...think "outside the box", if you will.
   I ask again, "WHAT 64K limit" are you referring to?

Re:rehash - the 64k limit problem


In article <38A1D989.EFB80...@bell.ca>,
  Dan Gahlinger <dan.gahlin...@bell.ca> wrote:

Quote
> Here we go again, I wish Borland would do just one last release of
> pascal for dos.
> say v8.0 or something,

It's called Delphi 1

Quote
> and get rid of the 64k limit,

Use the heap!

Quote
> add long filenames, and that would make everyone happy. maybe.

DOS is incompatible with LFNs!

Quote
> I have one massive project, using units, and have divested everything
> out of the main program I can, but I'm still bumping the 64k limit,

Which 64k limit, code or data?

Quote
> even recoding, cutting things down, paring it down as much as
> possible, I have very little room left, maybe 2k at the moment but I
> have a major procedure to add! and the stuff I need may run over that.

> I can't use overlays the program is real time, and decisions based,
> everything needs to be in memory (not module) all at once. can't
> unload anything and load other stuff. just won't work. its gotta all
> be there.

Use overlays in EMS/XMS, on a fast processor the time to load them will
be minimal!

Quote
> The program uses massive record structures, and very large arrays, and
> arrays of records (of arrays even). You can't pass a whole record to a
> procedure can you?

Why not?

Quote
> (now there's a thought!) how about a procedure in a unit?

Are you kidding? That's what units were made for!

Quote
> How do you pass a whole array? how about a record containing an array,
> or an array of records, or a record of array of records?

By using types!

Quote
> no the record mess can't be recoded, it's gotta be the way it is.

Show show us the code/record mess, and I'm pretty sure we'll be able to
show you that the above statement wrong.

Quote
> All this is 200K of source code. yowza!

Only 200k? The size of the source of one of my programs is 450K, size of
source bears little (as in _none whatsoever_) relationship with the size
of the executable!

Robert
--
Robert AH Prins
prin...@willis.com

Sent via Deja.com http://www.deja.com/
Before you buy.

Re:rehash - the 64k limit problem


Mike Copeland a crit dans le message ...

Quote
>> Here we go again, I wish Borland would do just one last release of
>> pascal for dos.
>> say v8.0 or something, and get rid of the 64k limit, add long filenames,
>> and that would make everyone happy. maybe.

>   It won't happen.  Perhaps you should be looking at one of the 32 bit
>Pascals (TMT, FPK, etc.).

Borland Pascal 8 exists : it's Delphi 1. I use the command line compiler
every day to compile plain DOS applications. The compiler reports itself as
version 8.

Some features are very nice, in particular the exceptions (try except end).
But of course, the 64 K limit still exists...

Some people use 32 bits versions of Delphi (2,3,4,5) to compile plain DOS
applications too, with no limitation.

Quote
>> I can't use overlays the program is real time, and decisions based,
>> everything needs to be in memory (not module) all at once. can't unload
>> anything and load other stuff. just won't work. its gotta all be there.

>   I really wonder if this is true.  The TP/BP Overlay Manager is very
>good, and what with the sped of PCs and memories today, I would bet that
>almost any program application can done with overlays.  I've written many
>program which make extensive use of overlaying, and I have yet to
>encounter a performance issue with any of them.

In a real time application, you often use hardware interrupts. In interrupt
service routine, it is impossible to call an overlayed procedure, because
DOS is not reentrant.

Best regards to all

Denis

Re:rehash - the 64k limit problem


Quote
Robert AH Prins wrote:
> > Here we go again, I wish Borland would do just one last release of
> > pascal for dos.
> > say v8.0 or something,

> It's called Delphi 1

... which produces executable files that will not run under DOS. Not really
a "Pascal for DOS" then.

Quote
> > and get rid of the 64k limit,

> Use the heap!

But the 64k limit of data structures is still there.

Re:rehash - the 64k limit problem


Frederic Bonroy <fbon...@mail.dotcom.fr> said
Quote
>Robert AH Prins wrote:

>> > Here we go again, I wish Borland would do just one last release of
>> > pascal for dos.
>> > say v8.0 or something,

>> It's called Delphi 1

>... which produces executable files that will not run under DOS. Not really
>a "Pascal for DOS" then.

Actually, with a little bit of work it can by using the undocumented
switches. I currently compile my real and pmode programs using DCC
from the Delphi 1 distribution.
--
Information on Newsgroup posted weekly on Sunday - read before writing!
Contains links to    |  http://homepages.force9.net/pascal/faq/
helpful information  |  http://www.merlyn.demon.co.uk/clpb-faq.txt
and some guidelines  |  ftp://garbo.uwasa.fi/pc/doc-net/faqclpb.zip

Re:rehash - the 64k limit problem


Im Artikel <38A1D989.EFB80...@bell.ca>, Dan Gahlinger <dan.gahlin...@bell.ca>
schreibt:

Quote
>Here we go again, I wish Borland would do just one last release of
>pascal for dos.

DOS is dead, but Delphi continues to offer the creation of MSDOS type
applications, for both 16 and 32 bit models. Perhaps it's that what you ask
for?

DoDi

Re:rehash - the 64k limit problem


Try passing a pointer to the memory space
occupied by the array.
As far as the 64k limit, try executing
a sub program from within your program
to execute other functions(EXEC) and passing data throught a file

Re:rehash - the 64k limit problem


Quote
Denis Fourr wrote:

> Mike Copeland a crit dans le message ...
> >> Here we go again, I wish Borland would do just one last release of
> >> pascal for dos.
> >> say v8.0 or something, and get rid of the 64k limit, add long filenames,
> >> and that would make everyone happy. maybe.

> >   It won't happen.  Perhaps you should be looking at one of the 32 bit
> >Pascals (TMT, FPK, etc.).

> Borland Pascal 8 exists : it's Delphi 1. I use the command line compiler
> every day to compile plain DOS applications. The compiler reports itself as
> version 8.

> Some features are very nice, in particular the exceptions (try except end).
> But of course, the 64 K limit still exists...

> Some people use 32 bits versions of Delphi (2,3,4,5) to compile plain DOS
> applications too, with no limitation.

[snip]  :-)

You mean that you can use Delphi to make 32 bit applications which run
just fine in
Dos 6.22 with no Dos memory problems? (this seems to be the promise of
Pascal TMT and FPC).

--
Patrick D. Rockwell
mailto:prockw...@thegrid.net
mailto:HNHC...@prodigy.net
mailto:patri48...@aol.com

Re:rehash - the 64k limit problem


Quote
VBDis wrote:

> Im Artikel <38A1D989.EFB80...@bell.ca>, Dan Gahlinger <dan.gahlin...@bell.ca>
> schreibt:

> >Here we go again, I wish Borland would do just one last release of
> >pascal for dos.

> DOS is dead, but Delphi continues to offer the creation of MSDOS type
> applications, for both 16 and 32 bit models. Perhaps it's that what you ask
> for?

MS DOS is dead, but not Dos. There are other Dos substitutes.

--
Patrick D. Rockwell
mailto:prockw...@thegrid.net
mailto:HNHC...@prodigy.net
mailto:patri48...@aol.com

Re:rehash - the 64k limit problem


Quote
> > Some people use 32 bits versions of Delphi (2,3,4,5) to compile plain DOS
> > applications too, with no limitation.

> [snip]  :-)

> You mean that you can use Delphi to make 32 bit applications which run
> just fine in
> Dos 6.22 with no Dos memory problems? (this seems to be the promise of
> Pascal TMT and FPC).

More or less yes (for FPC), the language is reaching Delphi compability
to
a reasonably high grade, the Delphi libraries (VCL) however are largely
unimplemented, but some still basic substitutes exist.

Re:rehash - the 64k limit problem


For data:

You have the total DOS memory for your data if you use dynamic data access
(using procedures like New or GetMem) in your application. In addition you can
use the extended memory as a RAM drive and store data in temporary files within
this RAM drive.

The most easy way I found to use dynamic data are objects.

For instance: Instead of an array of records you should use an array of
pointers to records. In the 64 kB data segment of your program your array may
be administrated by using a pointer to the array. A problem could be that your
array can only contain $10000 div 4 pointers to the records. If this is not
enough you could use linked lists of records and make routines to access and
manage them. I have a unit that could help you doing this. EMail me, if you
need it.

Andreas Jakobsche
http://members.aol.com/AJakobsche/
mailto:AJakobs...@aol.com

Other Threads