Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!gatech!rayssd!dhb From: dhb@rayssd.UUCP Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: Device Drivers Message-ID: <666@rayssd.RAY.COM> Date: Mon, 16-Feb-87 12:46:25 EST Article-I.D.: rayssd.666 Posted: Mon Feb 16 12:46:25 1987 Date-Received: Tue, 17-Feb-87 06:39:11 EST References: <907@moscom.UUCP> Sender: dhb@rayssd.RAY.COM (David H. Brierley @ Raytheon Company, Portsmouth RI) Reply-To: dhb@rayssd.RAY.COM (David H. Brierley) Organization: Raytheon Company, Portsmouth RI Lines: 31 Xref: watmath comp.lang.c:1050 comp.unix.wizards:983 In article <907@moscom.UUCP> jwr@moscom.UUCP (Jim Reid) writes: >I would like to learn how to write device drivers (in C under Unix). >I presently know very little of this subject. >Can anyone offer advice, references, or sample programs ? I am posting this as a followup instead of using mail because I have seen several messages like this lately and most of the replies that I sent out were bounced back. If you (or your company) have access to a Sun workstation, get a copy of the manual "Writing Device Drivers for the Sun Workstation". The "part number" from Sun is 800-1304-xx (the last two digits are the rev). Some of the stuff in the manual is specific to the Sun but as a general rule it applies to any Berkeley based UNIX system. You should also read "The UNIX I/O System" by Dennis Ritchie. To quote the table of contents from the 4.3 manuals: "still helpful for those writing device drivers". After having read all of this you should follow the advice listed in one of the documents that comes with 4.xBSD, find a driver for a similar device and make minor modifications. If you have ever been confused by attempting to read a device driver you will be amazed at how much more understandable they are after reading these two manuals. Not completely understandable mind you, just more so than before. Complete understanding requires either years of experience or mind-altering drugs. If you are trying to write a driver for a non-Berkeley system, skip the first part and begin by reading the Ritchie paper. -- David H. Brierley Raytheon Submarine Signal Division; Portsmouth RI; (401)-847-8000 x4073 smart mailer or arpanet: dhb@rayssd.ray.com old dumb mailer or uucp: {cbosgd,gatech,ihnp4,linus!raybed2} !rayssd!dhb