Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: CurrentA5 and DDP listeners Message-ID: <7954@hoptoad.uucp> Date: 11 Jul 89 23:50:31 GMT References: <12515@netnews.upenn.edu> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 27 In article <12515@netnews.upenn.edu> bell@eniac.seas.upenn.edu (Mike Bell) writes: >This is from Barry Twycross at Du Pont Pixel systems in England really > >I was writting a DDP socket listener running under multifinder, and I >assumed that the interupt handler would take care to make sure that your >CurrentA5 would be set up correctly, but it dosn't. I seem to get other >programs A5 value occasionally (this is good for crashing lightspeed C >or the debugger out from underneath of you as I was writing into thier >global space.) > >The fix I use is to store my CurrentA5 processor relative in the code, >but this is really against my principles. I've been writing DDP socket listeners for something like five years now, and I have yet to find another solution. Way back when, Switcher had the same problem. It is not only in socket listeners, but in all interrupt driven code -- if you install your own interrupt handlers, you can't assume that you will only be called when your application controls CurrentA5. There's no place else to store your A5 except in PC-relative code space. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com Postal: 424 Tehama, SF CA 94103; Phone: (415) 495-2934 "Superhero stories could best be described as entertainment that externalizes childhood power fantasies." -- Timothy Fay on rec.arts.comics