Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Tue, 24 Jul 2001 13:05:45 +0200
From: Corinna Vinschen <cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Read/write IO ports on NT
Message-ID: <20010724130545.R629@cygbert.vinschen.de>
Mail-Followup-To: cygwin@cygwin.com
References: <00bb01c11429$97024e90$0a090dc0@localhost>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <00bb01c11429$97024e90$0a090dc0@localhost>; from cm@ttl-3d.co.uk on Tue, Jul 24, 2001 at 11:15:40AM +0100

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/

