This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Read/write IO ports on NT
- To: cygwin at cygwin dot com
- Subject: Re: Read/write IO ports on NT
- From: Gunnar Andre Dalsnes <hardon at online dot no>
- Date: Fri, 27 Jul 2001 04:02:04 +0200
At 24.07.01 12:15 , you wrote:
>Hi
>
>Trying to read and write directly at IO port on NT, using the following code
>
>int main()
>{
> __asm("mov $1, %al");
> __asm("mov $0x3f8, %dx");
> __asm("out %al, %dx");
> return 0;
>}
>
>also tried
>
>int main()
>{
> _outp(0x378, 1);
> return 0;
>}
>
>but get the following exception, Privileged instruction.
>Any suggestions or pointers of how to code this.
>
>Clive Mayo
You need a kernel-mode device driver to do this.
Get sample source from Dr. Dobb's Journal.
ftp://ftp.ddj.com/1996/1996.05/directio.zip
Gunnar.
>--
>Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>Bug reporting: http://cygwin.com/bugs.html
>Documentation: http://cygwin.com/docs.html
>FAQ: http://cygwin.com/faq/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/