Re: How to talk to hardware devices in C




"x01001x" <xemail@xxxxxxxxxxxx> wrote in message news:1186395001.887098.154270@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
When programming in C (not C++) how does one send information to a
hardware device such as a video card or modem? How is this done in
Linux C programming versus Microsoft C programming?

In the same way, essentially.
Let a third party, maybe the OS authors or maybe someone else, produce a C-callable library that makes the hardware do things. For instance under Linux you can call Xlib to open a window and draw pixels on it.

If you are asking how to implement something like Xlib itself, the answer is with a mixture of C and assembler, that maybe writes to the video memory on vertical retrace interrupts or similar - I no longer know exactly how it is done.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

.



Relevant Pages

  • Re: How to talk to hardware devices in C
    ... hardware device such as a video card or modem? ... Linux C programming versus Microsoft C programming? ...
    (comp.lang.c)
  • How to talk to hardware devices in C
    ... hardware device such as a video card or modem? ... Linux C programming versus Microsoft C programming? ...
    (comp.lang.c)
  • Re: Why do so many people love Teas Instruments?
    ... that almost every modern programming language ... What you described is some "improvements" to the algebra, ... different calculators will produce different results depending on how ... She lived with Linux for a few weeks, ...
    (comp.sys.hp48)
  • Re: Upgrade all Linux Certification exams to test knowledge of PROGRAMMING!!
    ... pdf file for the previous Linux+ networking ... networking interface for Linux certified people ... Three computer programming classes plus ... programming requirement to get a LINUX+ certification a new ...
    (comp.os.linux.networking)
  • Re: Annoucning DragonFly BSD!
    ... :> http://www.dragonflybsd.org/ may be a just a troll erection, ... If Linus felt that way he would never have started Linux. ... the actual programming. ... generations of operating environments I don't believe in the immortality ...
    (freebsd-current)