Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site wanginst.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!wanginst!vishniac From: vishniac@wanginst.UUCP (Ephraim Vishniac) Newsgroups: net.micro.mac Subject: Re: Mac "Make" Message-ID: <1032@wanginst.UUCP> Date: Thu, 5-Sep-85 09:52:14 EDT Article-I.D.: wanginst.1032 Posted: Thu Sep 5 09:52:14 1985 Date-Received: Sat, 7-Sep-85 05:24:38 EDT References: <8509040349.AA09171@ucbkim.ARPA> Organization: Wang Institute, Tyngsboro, Ma. 01879 Lines: 26 > A number of programs provide the ability to invoke another program. Others > such as the "transfer" desk accessory, the finder, and the minifinder, regain > control once another program terminates. > > Can someone explain how to this mechanism works? It occurs to me that it > might not be too hard to get a public domain "make" program to run on the > Mac. > I know of two ways that one can gain control between application programs. If you mean to completely replace the finder, you install your program by setting it as the "shell" application. This is one of the items stored at the front of the boot sectors on your disk. After IPL, the name of the shell is stored in low memory, so you can change shells on the fly. The sneakier method is to use _GetTrapAddress and _SetTrapAddress to insert some of your own code into the _Launch and _ExitToShell traps. For example, you could patch yourself into the _ExitToShell trap to give the user the choice of launching another program or continuing into the real finder. Although I haven't checked to be sure, I imagine that this is the way the SkipFinder DA operates. -- Ephraim Vishniac [apollo, bbncca, cadmus, decvax, harvard, linus, masscomp]!wanginst!vishniac vishniac%Wang-Inst@Csnet-Relay