This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Read/write IO ports on NT


On Tue, Jul 24, 2001 at 11:15:40AM +0100, Clive Mayo 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.

You can't on NT. Use standard file IO.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]