Solved

Why inp/outp is so slow under WIN95 ring3

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
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…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 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

14 Experts available now in Live!

Get 1:1 Help Now