Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!mjm From: mjm@eleazar.dartmouth.edu (Michael McClemen) Newsgroups: comp.sys.mac.programmer Subject: Re: Terminate and Stay Resident? Message-ID: <14009@dartvax.Dartmouth.EDU> Date: 20 Jun 89 19:34:46 GMT References: <2361@etive.ed.ac.uk> Sender: news@dartvax.Dartmouth.EDU Reply-To: mjm@eleazar.dartmouth.edu (Michael McClemen) Organization: Dartmouth College, Hanover, NH Lines: 17 > PC (ugh!) version of the program a terminate-and-stay-resident block of code > is loaded and then the main application runs and uses services provided by > the first program by executing software interupts. > Is it possible to do something similar on a Mac without too much You may want to try writing the "terminate-and-stay-resident" code as a driver. A Macintosh driver is a resource of type 'DRVR' containing executable code and a specialized header that enables it to receive various types of control calls and events. Your application can open the driver (it gets called to initialize itself) and then make various control calls to it. A driver can also be set up to own windows and receive events associated with them, or (I think) to receive network and disk interrupts. Just to make things confusing, a desk accessory is a sort of driver. So is the disk interface code, the serial port interface code, the Appletalk interface code... The details, as usual, are in Inside Macintosh and the tech notes. Michael McClennen