[net.micro] 8086 large model compiler?

ix264@sdcc6.ucsd.EDU (ix264) (08/02/86)

     I have just bought an AT&T 6300 (an 8086 machine) and SCO Xenix.
I am very happy with both apart from 1 grave difficulty.  As a
mathematician, I had hoped to do some calculations with fairly
large matrices or linked lists.  It develops, however, that the
Microsoft C compiler limits me to 64k of data in any program.
That is, in words I didn't understand until yesterday, it
produces only small or middle model code executable on the 8086.
So for many of my purposes, I have a not very useful machine.
Live and learn.  
     Is there any way around this?  I am willing to pay for
software, but not for a new machine.  I don't know about
computer architecture or assembly language programming, and I
don't want to learn (how's that for a hardened user? :-).  If
there's no alternative to that, though, I'm willing.  What
I hope to find would be either

1. Some sort of software letting my existing compiler and
operating system use the memory it seems to me is right in front
of their faces (is my frustration showing?), or

2. Another compiler which can produce code executable on the
8086 using lots of memory for data, either static or dynamic or
both, I don't care.  Ideally it would run under Xenix, but
MS-DOS is fine.  I'd prefer C, but am willing to look at other
languages.  Do such compilers exist, or are they impossible
under the constraints of the 8086?

     Probably these questions are unutterably stupid to the
cognescenti, but I still need help.  If anyone can give me a
pointer (a far pointer? :-) to their solution, you will make my
week.  I'll take you to dinner, pay money, post summaries to the
net, whatever you desire.  Profuse thanks in advance.
                            Tim McLarnan
                            Math Dept., UC San Diego
                            ix264@sdcc6
                            (619) 566-6168

sandersr@ecn-pc.UUCP (Robert C Sanders) (08/03/86)

In article <2794@sdcc6.ucsd.EDU> ix264@sdcc6.ucsd.EDU (ix264) writes:
>				....  It develops, however, that the
>Microsoft C compiler limits me to 64k of data in any program.
>That is, in words I didn't understand until yesterday, it
>produces only small or middle model code executable on the 8086. ...
>
>     Is there any way around this?  I am willing to pay for
>software, but not for a new machine.  I don't know about
>computer architecture or assembly language programming, and I
>don't want to learn (how's that for a hardened user? :-).  If
>there's no alternative to that, though, I'm willing.  What
>I hope to find would be either
>
>1. Some sort of software letting my existing compiler and
>operating system use the memory it seems to me is right in front
>of their faces (is my frustration showing?), or
>
>2. Another compiler which can produce code executable on the
>8086 using lots of memory for data, either static or dynamic or
>both, I don't care.  Ideally it would run under Xenix, but
>MS-DOS is fine.  I'd prefer C, but am willing to look at other
>languages.  Do such compilers exist, or are they impossible
>under the constraints of the 8086?
>
>                            Tim McLarnan

Are you absolutely sure about this?  I think that it DOES allow large
model data.

My experience is with Computer Innovations C86 C compiler over MS C (they
are fairly similar), but I know that all I have to do is change the 
default #defines at the front of my code, and I can increase the stack/heap
up to the limits of memory (they are normally set for 96K to allow for
the system() call the call up command.com and whatever program).  This
means I have to malloc() or calloc() memory for the array, but that is
no problem; I just read it in from a file.

I too have a program that utilizes a HUGE data array, and I do use all
476K of main memory I have left after the program loads.  Remember, you
can't declare the array directly; declare a pointer instead, and calloc
the memory required -- MS C should also have a function the tests whether
there is any memory left, and return how much like CII C86 does.

I even created an OBJ file that I link in front of the program that resets
all of CI-C86 default values to use all of the rest of the memory -- it
just asks for FFFF segments (I even included an option in my "cc" executive
for the various-passes-of-the-compiler/MASM/LINK, -H, for "huge" model that
just links the OBJs in order).

I think MS C can do this too; but if not, I *KNOW* CII C86 does.

-- 
Continuing Engineering Education Telecommunications
Purdue University 		...!ihnp4!pur-ee!pc-ecn!sandersr

Let's make like a BSD process, and go FORK-OFF !!	-- bob
(and "make" a few children while we're at it ...)

dyer@spdcc.UUCP (Steve Dyer) (08/06/86)

MS-DOS version 3.0 of the Microsoft C Compiler supported large model
programs, reportedly with a few bugs.  The newest release, version 4.0,
available now, supports "huge" model, which is > 64K data, with individual
objects potentially larger than 64K.  Hopefully it will be more robust than
the large and huge model compiler which has been available for XENIX 286 for a
while now.  Actually, SCO is just now releasing a new version of their
XENIX 286 C compiler which should have many of these problems fixed.
We'll see.  As it is now, you use the -Ml or -Mh flags to the C compiler
and then start saying your prayers...

Are you sure that SCO XENIX for the 8086/8 doesn't support large and huge
model programs?  I can't see any reference in my C development manual
to the large/huge models being forbidden under SCO XENIX-86 (although
I only have experience with XENIX-286, the manuals are, I believe, the
same.)  
-- 
Steve Dyer
dyer@harvard.HARVARD.EDU
{linus,wanginst,bbncca,bbnccv,harvard,ima,ihnp4}!spdcc!dyer