home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / linux / 23181 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.4 KB  |  34 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!mcsun!Germany.EU.net!horga!agsc!veeble.han.sub.org!gkminix!gero
  3. From: gero@gkminix.han.de (Gero Kuhlmann)
  4. Subject: Re: Accessing IRQ/IO instructions under Linux.
  5. References: <1993Jan3.210918.25893@ifi.uio.no>
  6. Organization: gkminix, Hannover, Germany
  7. Date: Thu, 7 Jan 93 20:33:54 GMT
  8. X-Newsreader: TIN [version 1.1 PL6]
  9. Message-ID: <1993Jan7.203354.22647@gkminix.han.de>
  10. Lines: 22
  11.  
  12. Rune Fr|ysa (runefr@ifi.uio.no) wrote:
  13. > Since Linux is (fortunately) running under protected mode, I have
  14. > some difficulties determining how to use my MPU-401 MIDI interface.
  15. > Under DOS, i would redirect IRQ 3 (or 9, or .. have forgot the 
  16. > number) to an interrupt routine of my own.
  17. > Well, I can get my program work without this IRQ help, but I also
  18. > need access to port 330h and 331h. In DOS, a simple IO instuction
  19. > would be sufficient, but in Linux, I guess that I have to tell the
  20. > kernel to do this. 
  21.  
  22. There is a device called /dev/port. After opening the device you have to
  23. position the file pointer at the byte offset corresponding to your port
  24. address. Then you can read or write successive bytes. I never tried it
  25. by myself. If you should have any problems with this have a look at
  26. /usr/src/linux/kernel/chr_drv/mem.c
  27.  
  28. gero.
  29.  
  30. -- 
  31. Gero Kuhlmann            Zerberus:  G.KUHLMANN@A-LINK-H.ZER
  32. Donarweg 4            SubNet:    gero@gkminix.sub.org
  33. D-3000 Hannover 51              IN:        gero@gkminix.han.de
  34.