Mail Archives: cygwin/1997/08/24/11:43:45
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 AT cs DOT mu DOT oz DOT 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 AT 128 DOT 250 DOT 37 DOT 3 | -- the last words of T. S. Garp.
-
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 -