Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!excelan!kinetics!mahboud From: mahboud@kinetics.com (Mahboud Zabetian,Kinetics,4511,9457194,) Newsgroups: comp.sys.mac.programmer Subject: Re: How can a CDEV "talk" to its INIT? Message-ID: <871@excelan.COM> Date: 12 Dec 89 18:33:59 GMT References: <8183@cs.yale.edu> Sender: news@excelan.COM Lines: 31 From article <8183@cs.yale.edu>, by kishon-amir@CS.Yale.EDU (amir kishon): > > I would like to write a CDEV that can change the global variables of a > patch to GetNextEvent (the patch was done by an INIT that I wrote). > How can I have both the CDEV and the patch (INIT) point to the same > global variables, so the CDEV can change those values? Or are there > any other ways to do that? namely, to keep some static global > parameters referenced both by a CDEV code resource and an INIT code > resource? I am working with Think C 4.0. HELPPPPPPPPPPPPPPPPPPPPPPP > > Thanks, > > -amir Make the first instruction in your init be a JMP to the third instruction. Make the second instruction be a JMP to code that will set up your globals for you(these globals will probably be imbedded in your patch). Now when you change the settings in the cdev, load in your init resource, and jump to 2(A0) where A0 is the begining of the code. Or if you can wait until reboot before changing things around, then just store that info in a resource and read it on the next reboot. -mahboud Standard Disclaimer: Don't mind me, I'm just babbling. ------------------------------------------------------------------------------ Mahboud Zabetian (415) 975-4511 mahboud@kinetics.com Kinetics/Excelan/Novell 1340 Treat Blvd, Suite 500 ...!ucbvax!mtxinu!kinetics!mahboud Walnut Creek, CA 94596