Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!snorkelwacker!apple!stevec From: stevec@Apple.COM (Steve Christensen) Newsgroups: comp.sys.mac.programmer Subject: Re: Device drivers : must they be written in assembler? Message-ID: <10178@goofy.Apple.COM> Date: 12 Sep 90 18:51:33 GMT References: <872.26ee1d0a@iccgcc.decnet.ab.com> Organization: Apple Computer Inc., Cupertino, CA Lines: 28 In article <872.26ee1d0a@iccgcc.decnet.ab.com> milikich@iccgcc.decnet.ab.com ((Mike Milikich), Allen-Bradley Company) writes: >This is probably a really dumb question, but please bear with me - I'm just >getting started. > >Inside Mac Vol. II-6 desribes all sorts of neat stuff about device drivers, but >also makes some sort of statement about how they are normally written in >assembler. Is this just a dated statement, or is it still accurate? It seems >unlikely that it wouldn't be possible to write a serial driver, say, in >Think C. Anyone/everyone want to set me straight? No, you can write a driver in whatever language you want, since you ultimately end up with assembly language anyway. As long as the header has the correct info, it doesn't really matter how the rest of the driver is done. I wouldn't want to make a comment on whether or not the bit about writing drivers in assembly is dated, but I think the reason for doing it that way is that you have much more control over the generated code if it's written is assembly (vs a high-level language like C) for those cases where timing issues are critical... steve -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ whoami? Steve Christensen snail: Apple Computer, 20525 Mariani Ave, Cupertino, CA 95014 Internet: stevec@goofy.apple.com AppleLink: stevec CompuServe: 76174,1712