🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #451

IOPL summary

#451
From: Jan Gittelman
Date: Fri, 24 Jul 1992 14:43
43 lines
1670 bytes
Summary on IOPL

1. IOPL'd code has to be 16 bit, can't be 32 bit. So for that matter do device
   drivers. All 2.0 device drivers according to IBM are 16 bits.

2. To run a 16 bit IOPL routine with 32 bit programs, the user needs to make
   the IOPL routines into a DLL. I haven't tried it yet (just using all 16 
   bits), but no doubt I will soon.

3. IBM does have plans to include inp and outp routines in their next release
   of CSET/2.

4. I have managed to get 16 bit versions of inp and outp to run properly using
   the following sample from Barry King, who cribbed it from an issue of OS/2
   Monthly Magazine. - THANKS MUCHO!

   Sample code:

   #include <conio.h>      // for outp()
   int main()
   {
       outp( 0x60, 0xE9 );
       return 0;
   }
 
   The .DEF looks like this:
 
   NAME ....
   DESCRIPTION ....
   PROTMODE
   SEGMENTS  _IOSEG CLASS 'IOSEG_CODE' iopl
 

5. I have NOT managed to get my own assembler routines to run in Ring 2. Any
   further information would be welcome.

5. There is some documentation and users stating that the DosPortAccess 
   routine is necessary to actually perform i/o. I've run my code with and 
   without it and haven't seen a difference.

Thanks to everyone to gave me information. 
Jan
Technical Details
Message-ID: <4063@news.duke.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!mips!decwrl!concert!duke!news.duke.edu!acpub.duke.edu!jan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!mips!decwrl!concert!duke!news.duke.edu!acpub.duke.edu!jan
From: jan@acpub.duke.edu (Jan Gittelman)
Newsgroups: comp.os.os2.programmer
Subject: IOPL summary
Keywords: IOPL Ring 2 I/O ports
Message-ID: <4063@news.duke.edu>
Date: 24 Jul 92 14:43:16 GMT
Sender: news@news.duke.edu
Lines: 43
Nntp-Posting-Host: north1.acpub.duke.edu