Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!jarthur!elroy.jpl.nasa.gov!ucla-cs!tj From: tj@oahu.cs.ucla.edu (Tom Johnson) Newsgroups: comp.sys.mac.programmer Subject: DRVRs and installing them Message-ID: <32641@shemp.CS.UCLA.EDU> Date: 7 Mar 90 18:20:16 GMT Sender: news@CS.UCLA.EDU Reply-To: tj@cs.ucla.edu (Tom Johnson) Distribution: usa Organization: UCLA Computer Science Department Lines: 28 I am about to try writing a device driver for the first time. I have looked through all of my old MacTutors and Inside Mac and I must confess I am a little intimidated. (a little? Actually a lot) The only example I could find was the IAC driver in the 10/88 issue. Could someone please point me to a simpler example of writing DRVRs in Pascal (preferably) or C? I am also going to have to install this thing in the system heap using an INIT. Does anybody have some sample code on how to find an empty slot in the driver table? Once I find the empty slot I guess I would just do the following: GetNamedResource GetResInfo SetResInfo {change ID to the open slot in the table} OpenDeskAcc {open the driver} DetachResource SetResInfo {restore the original ID} Is this basic outline correct? Thanks, Tom Johnson Tom Johnson UCLA Computer Science Department 3413 Boelter Hall, Los Angeles CA 90024 (213)825-6952 UUCP: {uunet,rutgers,ucbvax}!cs.ucla.edu!tj Internet: tj@cs.ucla.edu