Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site looking.UUCP Path: utzoo!watmath!looking!brad From: brad@looking.UUCP (Brad Templeton) Newsgroups: net.micro Subject: Re: Re: 386 Family Products (8086 sucks Message-ID: <464@looking.UUCP> Date: Sun, 8-Dec-85 14:16:31 EST Article-I.D.: looking.464 Posted: Sun Dec 8 14:16:31 1985 Date-Received: Mon, 9-Dec-85 03:28:53 EST References: <133@daisy.UUCP> <97800013@ima.UUCP> Reply-To: @looking.UUCP (Brad Templeton) Organization: Looking Glass Software Ltd. Waterloo, Ontario Lines: 59 Summary: In article <97800013@ima.UUCP> johnl@ima.UUCP writes: > >/* Written 1:44 pm Dec 3, 1985 by 5@utzoo@ecn-pc in ima:net.micro */ >Oh, stop it. It's just not true that existing compilers can hide the >808x's segmentation. I have just spent the last year and a half writing a >large program for the 808x with 5 other people. We spent about 1/4 of our >time dealing with the addressing nonsense on the Intel chip. The problem >is that if you have more than 64K total of data, you have to worry about >allocating that data to segments, and about addressing those segments. >Compilers are not much help. > >I really wish that it were true that a good compiler existed that could >hide the addressing from us, but it's not. I looked hard, and there is no >compiler of any sort that simultaneously hides the addressing problems and >generates code adequate for programs that one can sell. There just isn't. >Nor is there likely to be one any time soon. Please correct me if I'm >wrong, but don't bother if you haven't run at least a 1,000 line program >through your compiler. > >John Levine, ima!johnl > I'll correct you, because you are wrong. Our product (A syntax-directed programming environment for Pascal) is a 30,000 line program. Using both the Mark Williams C compilers and Microsoft C compilers, this program required almost no segment funnies to compile and run in large model. Funny code to deal with segmentation is only required in dealing with the operating system or special hardware, and it isn't all that hard to write. It has to be redone for every computer, anyway. A minor amount of segment dependent code also existed where we had deliberately used it to increase efficiency. You appear (correct *me* if I'm wrong) to be confusing "dealing with segmentation" with "writing good C programs." Clean C programs, the kind that run properly through LINT, will have no trouble running under the 8086 "Large" model if they don't use single objects larger than 64K in size. Since very few programs do that, your anxiety is excessive. Now I will tell you that we did have lots of segment headaches later, but that was only because of a conscious decision to switch to a "hybrid" model using the Microsoft C compiler. We did this because we required the program to run on a 256K IBM-PC. If we had been content to run on a 320K machine, there would have been no troubles. But then, I don't think we could have ever gotten the program to run in that small an amount of memory on a machine with all 32 bit pointers. ----- It seems to me that most people complaining about problems using LARGE model are just not programming properly. I understand this, because I had to run our system through Lint to pull out mistakes before attempting to compile it large. If you use a Vax, 68000 or pdp-11 all day, you almost thing assumptions like sizeof(int) == sizeof(char *) and "0 is a valid pointer argument" are OK. They are *NOT*, and not just for the 8086. So declare your types, and if you really want to put a pointer into an int, use a special typedef version of int that you can make long. -- Brad Templeton, Looking Glass Software Ltd. - Waterloo, Ontario 519/884-7473