Solved

Why inp/outp is so slow under WIN95 ring3

Posted on 1997-09-07
3
333 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now