user doing direct I/O

P.Garbha pgd at bbt.se
Fri Jul 27 20:34:45 AEST 1990


In article <1990Jul26.232311.21450 at metro.ucc.su.OZ.AU> glenn at extro.ucc.su.OZ.AU (Glenn Geers) writes:
>From article <251 at carssdf.UUCP>, by usenet at carssdf.UUCP (John Watson):
>> 
>>   Is there any way for a user to do direct (INP/OUTP) io to devices
>> similar to the printer port without writing a device driver?  These
>> instructions normally result in a protection violation.
>
>A lot of people would like to know how to do this. 
>It turns out that it can be done on Xenix 2.2.2 and up using an ioctl. Only

I think there exist another possibility.
Create a dev file with major number 4 (same as mem), and minor numbers
according to the following list: 
3 -- for byte in/out to port
4 -- for word in/out to port
5 -- for lword in/out to port

These devices will go to i/o device space. So lseek to the address you
want to do input/output to, and read/write to one of these ports.

Now this is untested, and undocumented (at least I have not found the
documentation for it. Maybe it is there, somewhere). If someone (from SCO?)
could confirm if it is right, or wrong, it would be nice.
If this is not right, can someone tell what minor device number 3,4 &
5 actually are doing on the mem device?



More information about the Comp.unix.xenix mailing list