| ??? 03/25/03 21:00 Read: times |
#42233 - RE: OT - DOS 1mSec Timer Interrupts Responding to: ???'s previous message |
Hi Marshall,
You can make use of timer interrupts in DOS, you just have to be careful. A common way of doing it is to reprogram the 18.2 Hz timer to a higher frequency, preferrably a harmonic of 18.2. Then, using the getvect/setvect library functions in your compiler, you can install your own interrupt. Keep track of the number of times this interrupt has been called, and when it reaches 18.2 Hz, jump to the original ISR. This allows the required O/S timing functions to be run. Notice that's jump, not call. The x86 has its version of the reti instruction (iret) that pops program counter and state from the stack, so a call to the original ISR which returns with iret will trash the stack when your new ISR uses its iret. Check out some books on DOS programming. A lot of clock TSRs make use of ISR chaining. Dennis |
| Topic | Author | Date |
| OT - DOS 1mSec Timer Interrupts | 01/01/70 00:00 | |
| RE: OT - DOS 1mSec Timer Interrupts | 01/01/70 00:00 | |
| RE: OT - DOS 1mSec Timer Interrupts | 01/01/70 00:00 | |
| RE: OT - DOS 1mSec Timer Interrupts | 01/01/70 00:00 | |
RE: OT - DOS 1mSec Timer Interrupts | 01/01/70 00:00 |



