Re: How to talk to hardware devices in C



On Aug 6, 3:10 am, x01001x <xem...@xxxxxxxxxxxx> wrote:
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?

Take a look at following C code which directly communicate with
Monitor and Fills the entire screen with letter 'A'. You don't need
the printf statement.

#include<stdio.h>
#include<conio.h>

void main()
{
int i;
char far *vidmem=0xB8000000;
for(i=0;i<=3999; i=i+2)
*(vidmem+i)='A';
}

for more C programs and assembly language codes which directly
communicates with hardware go to

http://geocities.com/t1softwares/cprg.htm

and http://geocities.com/t1softwares/asemprg.htm


.



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? ... device filtering drivers for the fun of tinkering with the Windows OS, ... and the DDK's help file for Win32 taught me a ton about the ...
    (comp.lang.c)
  • Re: How to talk to hardware devices in C
    ... Linux C programming versus Microsoft C programming? ... You need to look into the hardware device datasheet and program ... Display communication standards like DDC, ...
    (comp.lang.c)
  • 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? ... For instance under Linux you can call Xlib to open a window and draw pixels on it. ...
    (comp.lang.c)
  • 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? ... Interfacing with hardware is almost always architecture and operating system ...
    (comp.lang.c)