Mail Archives: djgpp/2004/12/15/16:04:37
> Date: Wed, 15 Dec 2004 01:12:34 -0200
> From: Jonatan Liljedahl <lijon AT kymatica DOT com>
>
> Situation: I'm replacing the timer interrupt handler with my own
> protected mode handler. I'm also reprogramming the PIT chip to 600Hz
> frequency. I keep a counter so that I can call the original realmode
> handler at 18.2Hz interval.
>
> Now, everything works fine if I do NOT have smartdrv installed. But if
> smartdrv is installed, the computer hangs when smartdrv is writing from
> cache to disc.
Does the problem go away if you hook the timer interrupt, but do not
reprogram the timer to a higher frequency?
> Is smartdrv a hopeless piece of bugs?
I doubt that. SmartDRV is a good program, it's just that writing a
robust and efficient disk cache on DOS is not simple, especially if
you wish to call DOS file I/O functions from within the timer
interrupt. So it needs to jump through the hoops to make everything
work. It's possible that some of that juggling gets disrupted by the
DPMI environment, or interferes with it.
> If so, can I work around it somehow? I'd love to not have to write
> "You must disable smartdrv's write-cache or this program will hang
> your computer" in the manual!
If everything else fails, you can include in your program's
initialization routine code to disable SmartDRV automatically. Ralf
Brown's Interrupt List documents the API exported by SmartDRV via
interrupt 2Fh.
- Raw text -