🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #565

Re: Mixed Memory Model Question

#565
From: Ted H. Emigh
Date: Fri, 14 Sep 1990 12:44
26 lines
1907 bytes
In article <1990Sep13.141323.10882@jarvis.csri.toronto.edu> west@turing.toronto.edu (Tom West) writes:
>
>  I have a question about mixing memory models.  I have a large program that
>has three very separate parts to it.  While each part is less than 64k, the
>total is much larger.  Since there are very few calls that cross the
>boundary of the three blocks, I would like to make each section small model
>if possible.  Unfortunately, I'm not sure how this is done.  My guess is:
>
>  Each section is compiled small model, but any routines that are called
>from another section of the program are declared far.  Furthermore, one
>must somehow make sure that all parts of a single section are placed in
>the same segment.  I'm not sure what options one would link it with.
>
>I am using MSC 6.0, but I assume that the experience is transferrable.

I use Turbo C.

Basically, this will not work.  The reason is the library functions.  In
the small model, the library functions reside in the same 64K as the rest
of the program.  You must use them from several different segments, so they
must be large model.

You CAN declare your functions as "near", which will reduce some overhead.
If the "cross call" are not very numerous (either in number or functionally),
then you might try to compile it as several programs and use "spawn" (or
similar functions) to go between the modules.
Technical Details
Message-ID: <5953@ncsugn.ncsu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!bu.edu!ncsuvx!ncsugn!emigh
References: <1990Sep13.141323.10882@jarvis.csri.toronto.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!bu.edu!ncsuvx!ncsugn!emigh
From: emigh@ncsugn.ncsu.edu (Ted H. Emigh)
Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer
Subject: Re: Mixed Memory Model Question
Message-ID: <5953@ncsugn.ncsu.edu>
Date: 14 Sep 90 12:44:43 GMT
References: <1990Sep13.141323.10882@jarvis.csri.toronto.edu>
Reply-To: emigh@ncsugn.UUCP (Ted H. Emigh)
Organization: North Carolina State University, Department of Genetics
Lines: 26