Mail Archives: djgpp/1997/06/28/18:04:58
Jeff Weeks writes:
>I'm wondering, does DJGPP just back to real mode to do port access?
No: it all happens from pmode. It's just that the ports are protected in
the same way that memory locations are, so the CPU has to check the
permissions to see if you are allowed to access that port, and generate
an exception if you aren't. That's how things like Win95 and DOSEMU
manage to run hardware-intensive programs in multitasking environments:
they deny permissions on all the ports, trap the resulting exceptions,
and then emulate the hardware so the program runs correctly...
>(forgive my limited knowledge of pmode). I tried using the alternate
>cwsdpmi to run in ring 0, but port access didn't seem much faster. I
>guess I use too many port operations (there are a ton of 'em).
They're not _that_ horrific. I don't have anything to hand to check
exact cycle counts, but at a guess I'd say you should be looking at 8 or
10 clocks per access. That's on the CPU side, though: remember that
performance is also dependent on the speed of the card. If you are
accessing a slow peripheral, nothing you can do from the CPU end is
going to speed it up...
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.
- Raw text -