home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / os2 / programm / 3716 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  1.2 KB

  1. Path: sparky!uunet!decwrl!concert!duke!news.duke.edu!acpub.duke.edu!jan
  2. From: jan@acpub.duke.edu (Jan Gittelman)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: IOPL or Accessing hardware ports
  5. Keywords: IOPL Ring 2
  6. Message-ID: <4012@news.duke.edu>
  7. Date: 22 Jul 92 18:08:42 GMT
  8. Sender: news@news.duke.edu
  9. Lines: 21
  10. Nntp-Posting-Host: north1.acpub.duke.edu
  11.  
  12. Hi,
  13.  
  14. Has anyone managed to use IOPL to access hardware ports? I'm having trouble 
  15. with it. I get an access violation (SYS3175) whenever the code tries to call 
  16. a subroutine in the IOPL'd (ring 2) segment.
  17.  
  18. I'm currently using a 16 bit compiler (Microsoft 6.00A) and assembler 
  19. (Microsoft 5.1). There are 6 assembler subroutines that do the actual 
  20. i/o and the rest of the code is written in C. I have a .DEF file to define the
  21. assembler routines segment as IOPL and list the exported subroutines. In fact,
  22. it follows the examples in both Duncan's "Advanced OS/2 Programming" and 
  23. Steven Mastrianni's "Writing OS2 2.0 Device Drivers in C".
  24.  
  25. If anyone has any suggestions, ideas, or information please mail me 
  26. jan@dukehrl.mc.duke.edu. 
  27.  
  28. Thank you very much,
  29. Jan Gittelman
  30.  
  31. PS. If this can be done in 32 bits (C SET/2) I'd like to know that too, since
  32. I'm not having any luck with that either. Thanks.
  33.