This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: accessing hardware
- To: "'Cygwin mailing list'" <cygwin at sourceware dot cygnus dot com>
- Subject: Re: accessing hardware
- From: Heinz-Juergen Oertel <oe at port dot de>
- Date: Thu, 28 Oct 1999 13:19:51 +0200
- >Received: from port.de (oe@ute.port.de [194.173.33.3])by ute.port.de (8.8.8/8.8.8) with ESMTP id NAA00633;Thu, 28 Oct 1999 13:19:52 +0200
- Organization: port GmbH Germany
- References: <1BC4E8549E84D311BDDD00001CC00D98342126@mail.hrz.uni-siegen.de>
"Schmidt, Dieter" wrote:
>
> Dear Sirs and Madams,
>
> I want to adress hardware in my PC using the cygwin-compiler.
> Is there any instruction like outputb(word,byte) in the Turbo C
> compiler available in cygwin ?
>
> Yours sincerely
>
> Dieter Schmidt
try this
--
Heinz
/* port io functions for gcc or egcs - useable for Cygwin targets */
static inline int inportb( int port )
{
unsigned char value;
__asm__ volatile ("inb %1,%0"
: "=a" (value)
: "d" ((unsigned short)port));
return value;
}
static inline void outportb( unsigned short int port, unsigned char val )
{
__asm__ volatile (
"outb %0,%1\n"
:
: "a" (val), "d" (port)
);
}
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com