Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Why inp/outp is so slow under WIN95 ring3

Posted on 1997-09-07
3
Medium Priority
?
394 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 200 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
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…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

610 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