Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!nuchat!sugar!peter From: peter@sugar.UUCP (Peter da Silva) Newsgroups: comp.sys.amiga Subject: Re: Request for Compiler Info Message-ID: <984@sugar.UUCP> Date: Wed, 4-Nov-87 23:53:21 EST Article-I.D.: sugar.984 Posted: Wed Nov 4 23:53:21 1987 Date-Received: Sat, 7-Nov-87 17:48:42 EST References: <8710310645.AA24165@cory.Berkeley.EDU> Organization: Sugar Land UNIX - Houston, TX Lines: 49 Summary: You have it backwards... > >So they should use relative addressing for data/code that they know to be local > >to the module, but still use 32-bit pointers for indirection to maintain > >compatibility. The programmer should not have to know about it. > > In fact, since you "don't want to know about it", > I guess that means you won't ever be writing C interfaces to Interrupts, > Devices, or libraries. In that case, you can simply use the small data > model (gee, look ma, I don't have to specify any options for that!), and > forget about it, not deal with it, and "don't want to know about it". > > -Matt You have things backwards. You're making a couple of assumptions that are probably not tenable. First of all, you're assuming that the compiler can't be smart enough to use the appropriate models when needed. That's not even the case on the IBM-PC. Sure, pretty much everyone has decided to accept memory models for 'C' compilers, but it's clearly not impossible. PL/M does a marvellous job of making the brain-damaged architecture of the 8086 family invisible. Microsoft is gradually improving mixed-model handling in their 'C' compiler, by the way. The 68000 has a much better architecture. Aztec has done a better job of "mixing models" on the 68000 than on the 8086, and with less time spent doing it. Their first Amiga compiler was pretty obviously as close to a straight port of the IBM-PC one as they could manage. They're getting better. When I can say "OpenLibrary("intuition.library", 33)" and have it use a 32-bit int for the argument (33), but still call "printf("%06d", i)" and pass 16 bits they'll have arrived. The second assumption is that the compiler should be designed to make the hard jobs easy, while making the easy jobs harder. One of the things you should always do is make the easy stuff easy. The hard stuff will always be hard. I mean, look at the reception your sample drivers are getting. Most people spend more time making calls to intuition.library than intercepting message packets. Even you do. Shouldn't that be made easier? One thing you got right... I'm going to be spending a lot more of my time working on getting the user interface of my code right than turning it into a library. Thanks for the code... I've never been a fan of reinventing the wheel (so long as it's not square). Boy, I'll be glad when Aztec goes to full ANSI with function prototyping and this "memory model" nonsense can be tossed out. -- -- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter -- Disclaimer: These U aren't mere opinions... these are *values*.