Solved

Why inp/outp is so slow under WIN95 ring3

Posted on 1997-09-07
3
377 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How does MS support of Visual Studio works for ( MS professional developers ) ? 6 82
Is COM supported from Apache 1 77
Best book to learn C++ 4 96
PL SQL Developer 7 87
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

737 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