Re: How to talk to hardware devices in C
- From: Bliton <shendeajay@xxxxxxxxx>
- Date: Thu, 09 Aug 2007 10:34:45 -0700
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
.
- Follow-Ups:
- Re: How to talk to hardware devices in C
- From: Charlton Wilbur
- Re: How to talk to hardware devices in C
- From: Flash Gordon
- Re: How to talk to hardware devices in C
- References:
- How to talk to hardware devices in C
- From: x01001x
- How to talk to hardware devices in C
- Prev by Date: Re: Puzzling program
- Next by Date: byte alignment in structures and unions
- Previous by thread: Re: How to talk to hardware devices in C
- Next by thread: Re: How to talk to hardware devices in C
- Index(es):
Relevant Pages
|