Article View: comp.os.os2.programmer
Article #1525Re: IOPL in 2.0
From: Todd Crowe
Date: Thu, 20 Sep 1990 18:19
Date: Thu, 20 Sep 1990 18:19
32 lines
2414 bytes
2414 bytes
ericsa@microsoft.UUCP (Eric Sassaman) writes:
>The problem is that port I/O from an OS/2 2.0 32-bit application is
>only allowed in a ring zero code segment. An IOPL segment runs at ring
>2; at this level port I/O is not allowed in a 32-bit application. In
>order for you to do direct port I/O under OS/2 2.0, you will need to
>either write your application as 16-bit or write a device driver that
>runs at ring 0. This device driver can be either 16 bit or 32 bit.
I won't deny that any of this is true, but I *think* it omits an important
point. About 6(?) monthes ago in either Computer Language or DR Dobbs there
was an article on using IOPL segments to read/write the I/O ports. It
mentioned that there was a function that enabled/disabled port access (even
to IOPL segments). In OS/2 1.x this function didn't do anything, since the
286 is not able to offer individual I/O ports (and disallow others). But
according to the article there were supposed to be required in OS/2 2.0.
I think the name of the function was DosEnablePortAccess (or something
similar). If this isn't enough information let me know and I can look
up the article.
+++++++++++++++ "Dont get your hair in an uproar!!!"
+++++ +@+++++++++++++ +-----------------------------------------------------+
+++++ +++Western+++++ | Todd Crowe |
+++++++Washington+++ | n8840371@unicorn.wwu.edu or TODDC@nessie.wwu.edu |
+++++++University+++ | (Finally a real .sig!) |
+++++++++++++++++++ +-----------------------------------------------------+
++++++++++ "There's more than one way to skin a cat..."
--
+++++++++++++++ "Dont get your hair in an uproar!!!"
+++++ +@+++++++++++++ +-----------------------------------------------------+
+++++ +++Western+++++ | Todd Crowe |
+++++++Washington+++ | n8840371@unicorn.wwu.edu or TODDC@nessie.wwu.edu |
Technical Details
Message-ID:
<1990Sep20.181913.3348@unicorn.wwu.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!unicorn!n8840371References:
<57504@microsoft.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!unicorn!n8840371 From: n8840371@unicorn.wwu.edu (Todd Crowe) Newsgroups: comp.os.os2.programmer Subject: Re: IOPL in 2.0 Message-ID: <1990Sep20.181913.3348@unicorn.wwu.edu> Date: 20 Sep 90 18:19:13 GMT References: <57504@microsoft.UUCP> Organization: Western Washington University, Bellingham WA. Lines: 32