Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!vsi!mtndew!friedl From: friedl@mtndew.UUCP (Steve Friedl) Newsgroups: comp.lang.c Subject: Re: Port Access Summary: Limited port access Message-ID: <322@mtndew.UUCP> Date: 6 Jan 90 20:32:35 GMT References: <12720@cbnews.ATT.COM> <504@bbxsda.UUCP> Distribution: usa Organization: Steve's Barnburner 386 Lines: 30 Kirk Trost asks: >Is there an easy way to access 386 ports using C under UNIX. Scott Amspoker replies: > I would be very surprised if UNIX system allowed a user process > to access ports directly. Surprise! General-purpose access to I/O ports is not supported, but there is limited access to display-related ports. contains a handful of what are referred to as "VP/ix reserved ioctls", and two are /* VP/ix reserved ioctls */ #define KDENABIO (KIOC|60) /* enable direct I/O to ports */ #define KDDISABIO (KIOC|61) /* disable direct I/O to ports */ The third arg to ioctl is not used. I am not sure exactly which I/O addresses are permitted, but I do know that the port input and output instructions work for some ports (the display, probably) while they don't work for others. Steve -- Stephen J. Friedl, KA8CMY / Consultant / Tustin, CA / 3B2-kind-of-guy 714 544 6561 voice / 714 544 6496 fax / uunet!mtndew!friedl / friedl@vsi.com "PostScript wizard in training." - me