Mail Archives: djgpp/1997/11/28/16:33:00
On Wed, 26 Nov 1997 12:13:31 +0100 in comp.os.msdos.djgpp Michael Mauch <michael DOT mauch AT gmx DOT de> wrote:
: ******* wintimer.c: ********
[code snipped]
Why do you use real mode calls for this? I thought there was a speed
penalty in doing so. I don't suppose this is that significant since
our timing resolution is milliseconds, though. AFAICS you can simply
use inline assembler, in protected mode -- it works fine for me. On
performing a raw int 0x2f, you get the protected mode entry point in
%es and %edi; stick these in consecutive memory locations and do an
lcall to call the VxD. I haven't yet had any problems with this
technique on the VTD VxD (nor on the wsock VxD, where Dan Hedlund does
this); it didn't work quite properly for the registry access VxD
though. [The calls worked fine, and valid error codes were returned;
I just couldn't pass parameters to it properly.]
If you want to see code showing what I mean, look in vtd.c in this zip
file: http://users.ox.ac.uk/~mert0407/downloads/vtd.zip. I wrote
this before finding out what the different functions in the VTD were
for, so please excuse the erroneous guesses in some of the comments ;).
--
george DOT foot AT merton DOT oxford DOT ac DOT uk
- Raw text -