chain interrupt 0

The intent of this forum is to discuss my DOS TSR programs (available at http://bretjohnson.us), how they work and don't work, new/missing features, status of updates, and anything else related to them that may need to be discussed.

chain interrupt 0

Postby jmrams » Mon Sep 22, 2014 2:32 am

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
jmrams
 
Posts: 12
Joined: Sun Sep 21, 2014 11:10 pm

Re: chain interrupt 0

Postby Bret » Mon Sep 22, 2014 10:14 am

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.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: chain interrupt 0

Postby jmrams » Tue Sep 23, 2014 3:28 am

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.
jmrams
 
Posts: 12
Joined: Sun Sep 21, 2014 11:10 pm

Re: chain interrupt 0

Postby Bret » Tue Sep 23, 2014 4:40 am

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.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: chain interrupt 0

Postby jmrams » Wed Oct 01, 2014 2:28 am

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
jmrams
 
Posts: 12
Joined: Sun Sep 21, 2014 11:10 pm


Return to Programs

Who is online

Users browsing this forum: No registered users and 3 guests

cron