tad@killer.UUCP (Tad Marko) (08/07/86)
[if you have seen this before, it is because I am reposting it due to some trouble with a major feed upstream from me.] A while back, there was a discussion about the standard memory models offered by Microsoft C, and how none of them were really right (ie. no small code, large data model). Well, quite accidentally, I stumbled across section 7.11.2 of the MSC User's Guide, and found the section called "Creating Customized Memory Models", and said, "Hey, I bet this could be what we all need!". I'm not an expert at diddling with these type of things (yet), but I think the following switch is appropriate: -Asfd the s is for short code pointers, the f for far data pointers, and the d I'm not real sure about. The manual says that all the memory models use d as a default which is stack segment equal to data segment. The other options are u, for separate DS and SS, which I think is inappropriate, and w, for a separate SS, but no fixed DS, which I'm *sure* is not appropriate. BTW: Section 7.11.2 is on page 151. Tad P.S.: There was a problem for a week with a feed somewhere downstream from ihnp4, and I think that a *LOT* of people would benefit from a reposting of MicroEMACS 3.7. (including me!) -- Tad Marko ..!ihnp4!killer!tad || ..!ihnp4!alamo!infoswx!ntvax!tad UNIX Connection BBS AT&T 3B2 North Texas State U. VAX 11/780 If it's not nailed down, it's mine; If I can pick it up, it's not nailed down.
toma@tekgvs.UUCP (Thomas Almy) (08/11/86)
In article <243@killer.UUCP> tad@killer.UUCP writes: > >A while back, there was a discussion about the standard memory >models offered by Microsoft C, and how none of them were really >right (ie. no small code, large data model). Well, quite >accidentally, I stumbled across section 7.11.2 of the MSC User's >Guide, and found the section called "Creating Customized >Memory Models", and said, "Hey, I bet this could be what we all >need!". > >I'm not an expert at diddling with these type of things (yet), >but I think the following switch is appropriate: > >-Asfd > >the s is for short code pointers, the f for far data pointers, and >the d I'm not real sure about. The manual says that all the >memory models use d as a default which is stack segment equal >to data segment. The other options are u, for separate DS and SS, >which I think is inappropriate, and w, for a separate SS, but no >fixed DS, which I'm *sure* is not appropriate. But how do you recompile the C library for the mixed model when Microsoft doesn't supply the library sources? There is no library with short code pointers and far data pointers. I was thinking of just using the small model but declaring the line structures to be far. The trouble with this is that I would have to write malloc. At any rate, the new version 4.0 C supports a model with small code and large data, so the problem is moot. Tom Almy Tektronix, Inc.
simsong@wisdom.BITNET (Simson L. Garfinkel) (08/13/86)
Newsgroups: net.emacs,net.micro.pc,net.micro Subject: Re: MicroEMACS and MS C Summary: Memory Modeles exploited Expires: References: <> Sender: Simson L. Garfinkel Reply-To: simsong%H@wiscvm.arpa (Simson L. Garfinkel) Followup-To: Distribution: net Organization: Weizmann Inst. of Science, Dept. Of Math, Rehovot, Israel Keywords: MS C In article <> tad@killer.UUCP writes: >A while back, there was a discussion about the standard memory >models offered by Microsoft C, and how none of them were really >right (ie. no small code, large data model). Well, quite >accidentally, I stumbled across section 7.11.2 of the MSC User's >Guide, and found the section called "Creating Customized >Memory Models", and said, "Hey, I bet this could be what we all >need!". I've been using MS C for a long time now. Yes, it does offer these various memory model options. Unfortunately, MicroSoft does not provide a library for use with the small code, large data model until you get to MS C version 4.0. So, you're welcome to use this Customized Memory Model but you have to write your own library routine, or do harry things to call their library rotines (basically, you can declare all of their library routines as "far", but this doesn't always work). MS 4.0 comes with a new memory model (the name of which escapes me at the moment) which is large data, small code. --simson
jpn@teddy.UUCP (John P. Nelson) (08/13/86)
>I stumbled across section 7.11.2 of the MSC User's >Guide, and found the section called "Creating Customized >Memory Models", and said, "Hey, I bet this could be what we all >need!". The problem with the customized memory models is that no library is provided for them. A better solution is to get MSC 4.0 that seems to have the correct memory models (I haven't recieved my copy, so don't take this as an endorsement).