Serial IO focusing
Fergus Henderson
fjh@cs.mu.OZ.AU
Fri Aug 22 04:06:00 GMT 1997
mark koi, you wrote:
> I had a program under DOS which controlled a serial port using a polling
>
> method. Now I am trying to use gnu-win32, and I see no libraries for
> things like outp(), inp().
I think you probably just need to define these using inline assembler.
#define outb(value, port) \
({ __asm__ __volatile__ ("outb %b0,%w1"::"a" (value), "d" (port)); })
#define inb(port) \
({ char _v; \
__asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"d" (port)); \
_v; \
})
However, I haven't tried this...
I don't know if Windows allows direct access to I/O ports like this.
You might have to write a Windows device driver (VxD).
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
WWW: < http://www.cs.mu.oz.au/~fjh > | of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
More information about the Cygwin
mailing list