[comp.os.msdos.programmer] Need help on unix->dos port

kudva@ecn.purdue.edu (Gautham K. Kudva) (05/01/91)

I've developed a C program on unix (Sun SPARC 1) that I need to port to
DOS. The problem is that this program allocates large structures, and 
the total memory requirements exceed 1Mb at times. Is there any way that
I can get over the 640Kb limit of DOS without altering my code too much?
I don't have much experience with the PC, so I'd like to avoid a lot of
hacking if possible. I read an ad. in the BYTE magazine for something 
called the "DOS extender" which claims to get over the 640Kb limit. Has
anyone used this software? In terms of ease of use, applicability etc.,
is it worth the $1000 or so they are asking for it? 

Thanks in advance

Gautham.

______________________________________________________________
Gautham Kudva
kudva@ecn.purdue.edu

dj@ctron.com (DJ Delorie) (05/01/91)

In article <1991May1.091701@ecn.purdue.edu>, kudva@ecn.purdue.edu (Gautham K. Kudva) writes:
> I've developed a C program on unix (Sun SPARC 1) that I need to port to
> DOS. The problem is that this program allocates large structures, and 
> the total memory requirements exceed 1Mb at times. Is there any way that
> I can get over the 640Kb limit of DOS without altering my code too much?
> I don't have much experience with the PC, so I'd like to avoid a lot of
> hacking if possible. I read an ad. in the BYTE magazine for something 
> called the "DOS extender" which claims to get over the 640Kb limit. Has
> anyone used this software? In terms of ease of use, applicability etc.,
> is it worth the $1000 or so they are asking for it? 

No, it is not worth it, since I wrote one you can have for FREE*, including
FSF's C and C++ compilers (32-bit, 386/486 required).

anonymous FTP:
grape.ecs.clarkson.edu   pub/msdos/djgcc/*

(Get the readme first, then the files later)

If you can't FTP, send me mail for other arrangements.  I'm working
on getting it to other sites.

DJ
dj@ctron.com
--------
* not counting Internet connect charges, postage, floppy costs, or
other distribution fees.

cadsi@ccad.uiowa.edu (CADSI) (05/01/91)

From article <1991May1.091701@ecn.purdue.edu>, by kudva@ecn.purdue.edu (Gautham K. Kudva):
> I've developed a C program on unix (Sun SPARC 1) that I need to port to
> DOS. The problem is that this program allocates large structures, and 
> the total memory requirements exceed 1Mb at times. Is there any way that
> I can get over the 640Kb limit of DOS without altering my code too much?
> I don't have much experience with the PC, so I'd like to avoid a lot of
> hacking if possible. I read an ad. in the BYTE magazine for something 
> called the "DOS extender" which claims to get over the 640Kb limit. Has
> anyone used this software? In terms of ease of use, applicability etc.,
> is it worth the $1000 or so they are asking for it? 
> 

I have used the Phar Lap extender extensively.  It works well.  Problem
is, if you plan to distribute your program, you'll pay a healthy price
for the runtime version of the extender.  There is an alternative.  Ergo
Systems claims NO license fees and/or royalties.  I've not used Ergo's,
but I after my costs of Phar Lap, I kind of wish I did.  There is another
player now - the Phar Lap 286 extender.  It extends MS 6.0 code to allow
multi-segment allocations.  This might be a good idea for you, since
the 386 compilers will only generate code to be run on a 386.

|----------------------------------------------------------------------------|
|Tom Hite					|  The views expressed by me |
|Manager, Product development			|  are mine, not necessarily |
|CADSI (Computer Aided Design Software Inc.	|  the views of CADSI.       |
|----------------------------------------------------------------------------|

ekalenda@cup.portal.com (Edward John Kalenda) (05/02/91)

>I've developed a C program on unix (Sun SPARC 1) that I need to port to
>DOS. The problem is that this program allocates large structures, and 
>the total memory requirements exceed 1Mb at times. Is there any way that
>I can get over the 640Kb limit of DOS without altering my code too much?
>I don't have much experience with the PC, so I'd like to avoid a lot of
>hacking if possible. I read an ad. in the BYTE magazine for something 
>called the "DOS extender" which claims to get over the 640Kb limit. Has
>anyone used this software? In terms of ease of use, applicability etc.,
>is it worth the $1000 or so they are asking for it? 

The other approach commonly used is to use Expanded Memory. Your program
will be able to run on any PC that has an EMS board installed (or a 386
with a Memory Manager running). The main hassle is that you will need to
rework your memory usage to use the memory handle concept. This may be
far more than you will want to do.

I don't remember the name of the product, but there iss one that lets you
allocate memory and refer to it by handles which you "lock" and "unlock"
as you need them. It will use main memory, expanded memory, and page
unlocked blocks to and from disk as needed. Your individual memory blocks
are small (16K or so) but you can work with several megabytes worth in a
fairly transperant fashion. Not aas good as Unix virtual memory but it
works.

Ed
ekalenda@cup.portal.com