device driver programming....how does it work

This is a discussion on device driver programming....how does it work within the C Programming forums, part of the General Programming Boards category; hey all! i'm afraid this yet another question from a noob, but i'm learning to program in C which i ...

  1. #1
    Registered User the bassinvader's Avatar
    Join Date
    Jul 2006
    Location
    Europe
    Posts
    51

    device driver programming....how does it work

    hey all!

    i'm afraid this yet another question from a
    noob, but i'm learning to program in C which
    i read is used a lot in games and small device
    drivers. From what i've learnt so far i cant grasp
    how this would be undertaken so are there any sites
    that can give me a rough overview of how its done?
    (just to satisfy my curiosity)

  2. #2
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    Well, for device drivers under Linux, you could get started with something like this book, available both in print, and online (for free).

  3. #3
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  4. #4
    Registered User
    Join Date
    Aug 2005
    Posts
    44
    Device drivers are often done in assembly because it allows lowest access to hardware.

  5. #5
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    For the purpose of Gaming, what you are talking about is taking control of the device from the system and giving it to the game. It's not really writing device drivers it's using the api from the device driver to take control, which is designed to be used by c programs.

    if you really want to learn how to write device drivers, then Kermit's link is a good start. the methoology is that same for all operating systems, the specifics are different because of the differences in operating systems.
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 21
    Last Post: 06-24-2009, 10:49 AM
  2. kernel memory char device
    By MK27 in forum Linux Programming
    Replies: 2
    Last Post: 05-02-2009, 07:42 AM
  3. Diving into hardware device driver in Windows
    By AsAdi in forum Windows Programming
    Replies: 1
    Last Post: 02-01-2003, 03:30 AM
  4. Device problem
    By John22 in forum C Programming
    Replies: 0
    Last Post: 12-19-2002, 12:02 PM
  5. writing device driver
    By ronin in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 07-08-2002, 11:48 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21