Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!masscomp!peora!tarpit!bilver!jwt!john From: john@jwt.UUCP (John Temples) Newsgroups: comp.unix.sysv386 Subject: Re: Need to Address i/o ports directoly HELP!! Message-ID: <1991Feb14.230855.4613@jwt.UUCP> Date: 14 Feb 91 23:08:55 GMT References: <1991Feb14.044524.3106@grebyn.com> Organization: Private System -- Orlando, FL Lines: 23 In article <1991Feb14.044524.3106@grebyn.com> yml@grebyn.UUCP (Yermo M. Lamers) writes: >In the SCO unix manuals they described a system for directly accessing >the video boards (EGA, VGA and the like). Is there a way without writing >a device driver to write/read bytes to/from an I/O port? Has anyone out >there already solved a similar problem? ISC and ESIX have ioctl calls documented in display(7): KDADDIO, KDENABIO, and MCAIO, though I've never tried using these with arbitrary addresses not on the video cards. I just wrote a one-line device driver: u.u_ar0[EFL] |= PS_IOPL; which, when opened, gives you I/O privilege level so you can read/write any port. This comes in handy for lots of different things, like reprogramming keyboard repeat rates, or doing quick-hack hardware interfaces like you've described above. Note that this does subvert some of the OS's protection; use at your own risk, etc. Of course, on ISC/ESIX, the above doesn't need to be in a device driver since the u block is writeable. :( -- John W. Temples -- john@jwt.UUCP (uunet!jwt!john)