From: fjh AT cs DOT mu DOT OZ DOT AU (Fergus Henderson) Subject: Re: Serial IO focusing 24 Aug 1997 11:43:45 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199708220915.TAA03323.cygnus.gnu-win32@murlibobo.cs.mu.OZ.AU> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Original-To: koi AT ssa DOT crane DOT navy DOT mil (mark koi) Original-Cc: gnu-win32 AT cygnus DOT com (Cygnus GNU-win32 mailing list) In-Reply-To: <33FB542A.8271A54F@ssa.crane.navy.mil> from mark koi at "Aug 20, 97 04:31:39 pm" X-Mailer: ELM [version 2.4ME+ PL15 (25)] Original-Sender: owner-gnu-win32 AT cygnus DOT com 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 | "I have always known that the pursuit WWW: | 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".