Solved

Why inp/outp is so slow under WIN95 ring3

Posted on 1997-09-07
3
366 Views
Last Modified: 2013-12-03
I wrote a program to access parallel port using inp() and outp() without ant interrupt. It was very slow. Whether Win95 traps the ring3 io access? When I remark the inp() or outp(), the program resume the speed(about 8 times than slow one). How to resolve it?
0
Comment
Question by:JackyChen
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
davmarc earned 100 total points
ID: 1406050
inp() and outp() are definitely slower at Ring3 than they are at Ring0. This is not a Windows 95 fault, it's by design of Intel processors' protected mode.
Rewriting your code in assembler could help a bit (assuming you're calling inp/outp a lot of times), but to achieve the highest speed you should write a VxD, thus making your code run at Ring0.

Davide Marcato.
0
 

Author Comment

by:JackyChen
ID: 1406051
Whether is there another solution to resolve it except writing vxd?
0
 
LVL 4

Expert Comment

by:davmarc
ID: 1406052
As for getting to Ring0, the answer is no, you must write a VxD.
Try to rewrite your critical code in assembler (you could start from inp/outp source code and then optimize for your needs), maybe it speeds up the whole thing enough.

Davide Marcato.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question