Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!rpi!uupsi!sunic!compuram!pgd From: pgd@bbt.se (P.Garbha) Newsgroups: comp.unix.xenix Subject: Re: user doing direct I/O Message-ID: <1990Jul27.103445.703@bbt.se> Date: 27 Jul 90 10:34:45 GMT References: <251@carssdf.UUCP> <1990Jul26.232311.21450@metro.ucc.su.OZ.AU> Organization: . Lines: 25 In article <1990Jul26.232311.21450@metro.ucc.su.OZ.AU> glenn@extro.ucc.su.OZ.AU (Glenn Geers) writes: >From article <251@carssdf.UUCP>, by usenet@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?