Thread View: alt.msdos.programmer
2 messages
2 total messages
Started by Tom West
Thu, 13 Sep 1990 18:13
Mixed Memory Model Question
Author: Tom West
Date: Thu, 13 Sep 1990 18:13
Date: Thu, 13 Sep 1990 18:13
20 lines
1401 bytes
1401 bytes
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. The assumption is that the total program has less than 64k of data. If it was larger, then one would compile each section with the compact model. I am using MSC 6.0, but I assume that the experience is transferrable. Could anyone experienced with mixing memory models either confirm or correct this? Thanks. Tom West west@turing.toronto.edu
Re: Mixed Memory Model Question
Author: Ted H. Emigh
Date: Fri, 14 Sep 1990 12:44
Date: Fri, 14 Sep 1990 12:44
26 lines
1907 bytes
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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads