Page 1 of 1

chain interrupt 0

PostPosted: Mon Sep 22, 2014 2:32 am
by jmrams
I am testing the usb drivers on a DOS 7.1 PC which has running a real time protected mode process with an interrupt chained at 0 interrupt line every 2 ms. The question is that from the program running real time process the system doesn't mount some kind of usb keys disks. Do you know if the usb driver has some interrupt attached at 0 interrupt?

Thanks

Re: chain interrupt 0

PostPosted: Mon Sep 22, 2014 10:14 am
by Bret
By Interrupt 0, I assume you mean IRQ 0 (Hardware Interrupt 0), which is INT 8 (Software Interrupt 8).

Yes, the USB drivers trap Interrupt 8, as do a lot of TSR's. The USB drivers are very dependent on IRQ 0 for timing purposes, so it must not be changed from its default period of 55 milliseconds. If your program changes the timing of IRQ 0, it must periodically (every 55 milliseconds) chain to the old interrupt vector.

Re: chain interrupt 0

PostPosted: Tue Sep 23, 2014 3:28 am
by jmrams
I have chained my prtected mode interrupt (djgpp) to hardware interrupt 0 (INT 0x8). But I have changed timer from 55 to 2 ms. I suppose that your timeouts cames 25 times before.

Re: chain interrupt 0

PostPosted: Tue Sep 23, 2014 4:40 am
by Bret
If you change the period from 55 ms to 2 ms, you can't chain to the old interrupt vector every time (every 2 milliseconds). You only want to chain to the old vector every 27-1/2 times (do 27, then 28, then 27, ...). Technically, the standard timer interrupt is not exactly 55 ms, but 55 is close enough that everything should work OK.

Re: chain interrupt 0

PostPosted: Wed Oct 01, 2014 2:28 am
by jmrams
At the end I have cathed real mode interrupt 0 and call it every 1/33 s from my 1 ms protected mode interrupt and it seems that all works fine. Thanks Bret