Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!mit-eddie!bloom-beacon!oberon!sdcrdcf!ism780c!mikep From: mikep@ism780c.UUCP (Michael A. Petonic) Newsgroups: comp.unix.xenix,comp.unix.questions,comp.sys.ibm.pc Subject: Re: How do I access the ports? Message-ID: <7077@ism780c.UUCP> Date: Wed, 5-Aug-87 05:21:15 EDT Article-I.D.: ism780c.7077 Posted: Wed Aug 5 05:21:15 1987 Date-Received: Sat, 8-Aug-87 01:13:58 EDT References: <302@uvicctr.UUCP> Reply-To: mikep@ism780c.UUCP (Michael A. Petonic) Distribution: world Organization: Interactive Systems Corp., Santa Monica CA Lines: 34 Keywords: xenix, port Xref: mnetor comp.unix.xenix:562 comp.unix.questions:3477 comp.sys.ibm.pc:6385 In article <302@uvicctr.UUCP> dtsai@uvicctr.UUCP (David Tsai) writes: >Can anyone help me? I have been trying to write to ports under the XENIX >operating system and have gotten nowhere in the last month. The routines >I want to use are: > > out( ), outb( ), in(port):word, inb(port):byte, > >and are given in the SCO XENIX System V Development System manual, >'Programmer's Guide II', pp 8-11 of 'Writing Device Drivers'; and in the IBM >XENIX Version 2.00, pp 10-12 and 10-13 of 'Application Development Guide'. > ... Well, it's been a while since I've looked at the Xenix Device Driver's Guide, but that code is to be run in Kernel mode and not in user mode. WHat this means is that the code that you write that accesses ports has got to be run in kernel mode, which means that it has to be a part of the operating system. There are two ways to do this: You can set up your own device driver for a device to handle in/output to and from ports. You could call this /dev/ports or something. Follow the device driver guide. You could then control the ports through specific ioctl()'s to that device. OR you could make a new system call that does the input/output from ports. This is probably tougher than a device driver and impossible without the kernel sources. Hope this is of help. {seismo|sdcrdcf}!ism780c!mikep MTS, INTERACTIVE Systems Corp. 2401 Colorado Blvd. Santa Monica, CA. 90404