delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/21/04:35:07

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3BAAFB9C.12816CCB@syntrex.com>
Date: Fri, 21 Sep 2001 10:34:36 +0200
From: Pavel Tsekov <ptsekov AT syntrex DOT com>
Organization: Syntrex Inc.
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: abhishek gupta <abhi_iit AT rediffmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: asm/io.h where can I find this ??
References: <20010921083445 DOT 26638 DOT qmail AT mailweb26 DOT rediffmail DOT com>

abhishek gupta wrote:
> 
> Hi,
> thanks for replying to our query.
> if we cant run the piece of code on cygwin, than what should do to write to port and read from the port ( low level i/o operations on port ) under windows environment using this gnu compiler (cygwin).
> are there any other API's availble.

I think you should operate the specified parallel device using /dev/lp*
if cygwin supports this. I dont know actually if it does, although
serial devices are supported. Perhaps someone on the list knows and you
should try searching the archives <g> :)

For a Windows specific why to handle the situation check this link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/filesio_7wmd.asp
or the description
of CreateFile in the MSDN library if you have it. In this topic look for
"Communication Resources".

> 
> thanks
> abhishek
> 
> >> /*----Start of myprog source -------*/
> >>
> >> #include <stdio.h>
> >> #include <unistd.h>
> >> #include <asm/io.h>
> >> #define BASEPORT 0x378
> >>
> >> int main()
> >> {
> >>     int i=0;
> >>     char c='A';
> >>     ioperm (0x378,1,1);
> >>     for (i;i<10;i++) {
> >>        outb(c,0x378);
> >>        printf("%c\n",inb(0x378));
> >>        printf("%c\n",c);
> >>        c++;
> >>     }
> >>     ioperm (0x378,1,0);
> >> }
> >>
> >> /*----End of myprog source -------*/
> 
>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019