Dave wrote:
> 
> How does one directly access an I/O address from C?
> 
> For example if I want to write a char to port 0x80 (or read a char from a
> port) what is the statement?
> 
> How about memory mapped I/O? If one wants to directly access a specific
> memory address what are the statements?
> 
> Is direct I/O and direct memory access part of ANSI C?
> 
> I have an embedded X86 project that has to directly access the hardware. I
> would prefer doing it in C rather than ASM.

Suggest you download the Linux Programmer's guide from the Linux Documentation Project
http://metalab.unc.edu/mdw/linux.html

And then do a search for inb outb for writing to the ports and
look at using memory mapped I/O using pointers.

Jonathan

Reply via email to