Need to Address i/o ports directoly HELP!!
John Temples
john at jwt.UUCP
Fri Feb 15 10:08:55 AEST 1991
In article <1991Feb14.044524.3106 at grebyn.com> yml at 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 at jwt.UUCP (uunet!jwt!john)
More information about the Comp.unix.sysv386
mailing list