Path: utzoo!attcan!uunet!snorkelwacker!ira.uka.de!smurf!urlichs From: urlichs@smurf.ira.uka.de Newsgroups: comp.sys.mac.programmer Subject: Re: Opening Drivers Message-ID: <1311@smurf.ira.uka.de> Date: 18 Dec 89 16:26:35 GMT References: <7421@hubcap.clemson.edu> <9310@hoptoad.uucp> Reply-To: urlichs@smurf.ira.uka.de (Matthias Urlichs) Organization: University of Karlsruhe, FRG Lines: 24 In comp.sys.mac.programmer tim@hoptoad.UUCP (Tim Maroney) writes: < In article <7421@hubcap.clemson.edu> mikeoro@hubcap.clemson.edu (Michael < K O'Rourke) writes: < Close. Check the unit table, not the system file. Walk over the unit < table in a way similar to that of Tech Note #71. Look for an empty < DCE entry. You may then install yourself as the driver with the < reference number corresponding to the empty slot. Use the _DrvrInstall < trap documented in Tech Note #108. < You'll have to check the System file also. Some drivers may not be opened yet, and won't appear in the table. There may not be any more free space in the unit table for your driver, so you might have to make it bigger. The technique is straightforward (make new pointer in system heap, copy old unit table there, enter pointer and size in low mem globals). Don't forget to lock out interrupts while doing that, use NewPtrSysClear and not NewPtr, and do not free the old table because you don't know where it came from. Disclaimer: I saw the above in Apple's ADSP Init, so to the best of my knowledge it works. -- Matthias Urlichs