* Problem about parallel port!
@ 2000-09-27 22:23 º£¶«
2000-09-28 19:39 ` Peter J Eccles
0 siblings, 1 reply; 2+ messages in thread
From: úãöë @ 2000-09-27 22:23 UTC (permalink / raw)
To: cygwin
How can I access the parallel port in cygwin under win2000 or win98?
y.h.d@263.net
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problem about parallel port!
2000-09-27 22:23 Problem about parallel port! º£¶«
@ 2000-09-28 19:39 ` Peter J Eccles
0 siblings, 0 replies; 2+ messages in thread
From: Peter J Eccles @ 2000-09-28 19:39 UTC (permalink / raw)
To: úãöë
Cc: cygwin
> How can I access the parallel port in cygwin under win2000 or win98?
Under win98 (aka DOS), anyone can get unrestricted access the the IO ports of
the board using code such as:
static inline int win9x_inportb( int port )
{
unsigned char value;
__asm__ volatile ("inb %1,%0"
: "=a" (value)
: "d" ((unsigned short)port));
return value;
}
static inline void win9x_outportb( unsigned short int port, unsigned char val )
{
__asm__ volatile (
"outb %0,%1\n"
:
: "a" (val), "d" (port)
);
}
Under Win2k (aka WinNT), it is more involved, you need to use a device
driver to do the work, and you just use function calls to this device driver
to do the actual port IO. I have used the MMP library (which gives access to
the entire IO space and memory, and therefore is not really secure).
MMP lives at: http://www.einev.ch/references/mondada/mmp/
There is many others though which are perhaps a bit safer, try:
http://www.lvr.com/
for links to a few other libraries (under the parallel port section)
===============================================================================
Peter Eccles
Computer Systems Engineering (4th year)
RMIT Melbourne Australia
email: petere@connexus.net.au
===============================================================================
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-09-28 19:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-27 22:23 Problem about parallel port! º£¶«
2000-09-28 19:39 ` Peter J Eccles
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).