delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/01/11/10:30:33

From: oe AT port DOT de (Heinz-Juergen Oertel)
Subject: Re: Parallel port programming under Win95
11 Jan 1999 10:30:33 -0800 :
Message-ID: <3699D0A3.659211B6.cygnus.gnu-win32@port.de>
References: <36979240 DOT 7A191CC1 AT wanadoo DOT fr>
Mime-Version: 1.0
To: Jean-Pierre LAMBELIN <jp DOT lambelin AT wanadoo DOT fr>, gnu-win32 AT cygnus DOT com

This is a multi-part message in MIME format.
--------------76B24069787CCEB0CEC3A341
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Jean-Pierre LAMBELIN wrote:
> =

> Is-it possible to access the parallel port whith some Cygwin B20 C code=

> under Windows95?
> Under Linux I used   #include <asm/io.h> , ioperm(), outb()...
> I simply want to read or write one byte.
> Some example(s) would be welcome.
> Thanks for your help.
> =

> -
> For help on using this list (especially unsubscribing), send a message =
to
> "gnu-win32-request AT cygnus DOT com" with one line of text: "help".
> =01=01=01=01
> =01=01=01=01
i use the following inline functions to access io ports.
at least it is possible with w98.
don't forget to reserve the io ports in the system folder.










-- =

with best regards / mit freundlichen Gr=FC=DFen

  Heinz-J=FCrgen Oertel

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Heinz-Juergen Oertel
port GmbH            phone +49 3493 743-10
Antonienstr. 3       fax   +49 3493 743-15
D-06749 Bitterfeld   mailto:service AT port DOT de
Germany              http://www.port.de
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--------------76B24069787CCEB0CEC3A341
Content-Type: text/plain; charset=us-ascii; name="portio.h"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="portio.h"



static inline int inportb( int port )
{
   unsigned char value;
  __asm__ volatile ("inb %1,%0"
                    : "=a" (value)
                    : "d" ((unsigned short)port));
   return value;
}

static inline void outportb( unsigned short int port, unsigned char val )
{
  __asm__ volatile (
                    "outb %0,%1\n"
                    :
                    : "a" (val), "d" (port)
                    );
}



--------------76B24069787CCEB0CEC3A341--

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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