Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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 , 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> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit 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 :) 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 > >> #include > >> #include > >> #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/