Path: utzoo!attcan!uunet!husc6!endor!siegel From: siegel@endor.harvard.edu (Rich Siegel) Newsgroups: comp.sys.mac.programmer Subject: Re: Standard File and Desk Accessories Keywords: Globals in DAs, Party, Enough! Message-ID: <2026@husc6.harvard.edu> Date: 9 Jun 89 02:31:42 GMT References: <50967@tut.cis.ohio-state.edu> <7547@hoptoad.uucp> <4972@umd5.umd.edu> <51276@tut.cis.ohio-state.edu> <2015@husc6.harvard.edu> <1241@speedy.mcnc.org> <2024@husc6.harvard.edu> <13855@dartvax.Dartmouth.EDU> Sender: news@husc6.harvard.edu Reply-To: siegel@endor.UUCP (Rich Siegel) Organization: Symantec/THINK Technologies, Bedford, MA Lines: 60 In article <13855@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu (Earle R. Horton) writes: > > This looks like fun! May I throw in my two cents worth? It IS fun. By the way, Tim Maroney and I really ARE two different people, even though our postings have similar content. I guess we just think the same way.... :-) > Aha! So one of you A4-relative types admits that the trick will >fail someday! This makes my day. If Apple is real careful about Hey, I never said it would work forever. It's actually an educated bet, because it's highly possible that when separate code and data spaces are implemented in the OS, the support structure desk accessories may be radically different, and may well support base-register-relative globals for DA's. Who knows? > It's just not real nice to write computer software which has a >shorter lifetime than it could have, had you coded it differently. I challenge you to solve this problem for the PRESENT incarnation of the operating system, given the contstraints of not being allowed to use a base register, and not being allowed to use any low-memory system space. For example, suppose you have an INIT and a cdev that need to share information with one another? How do you propose to have them communicate? Remember, there's no low memory you can use, and there's no place to place a base register. Well, you could put a block in the system heap with your unique signature in it, and crawl the system heap for it, BUT that (a) won't work when the format of heap blocks changes, and (b) won't work when the system heap becomes protected. As I said, this is just an example. Sometimes, expediency is necessary. It's a risk, but it beats the alternatives (bogus solutions, or no solutions at all). > Please think carefully before using any technique which can be >demonstrated to have a high probably of failure under a future >operating system, no matter how convenient it might be to use it >today. And please think carefully for attacking proven techniques, without also providing a workable solution of your own..... --Rich ~~~~~~~~~~~~~~~ Rich Siegel Staff Software Developer Symantec Corporation, Language Products Group Internet: siegel@endor.harvard.edu UUCP: ..harvard!endor!siegel I classify myself as a real developer because my desk is hip-deep in assembly-language listings and I spend more than 50% of my time in TMON. ~~~~~~~~~~~~~~~