How does DOS time work?

Mark Lord mlord at bnr-rsc.UUCP
Tue Jun 5 02:03:12 AEST 1990


In article <980 at soleil.UUCP> gopstein at soleil.UUCP (Rich Gopstein) writes:
>
>I pulled out the schematics for the 6300 last night, and armed with my
>calculator, determined that the 6300's timer tick runs at 18.75 ticks/sec
>instead of 18.2 as in a standard PC.  The easiest solution would be to
>slow the timer down to 18.2 tick/secs, but the timer is already running
>as slow as it can be set...  
>
>The question is:  How can I get generic DOS (4.0 in my case), to keep
>the correct time given the 18.75Hz clock rate?

Well.. looks like a good application for writing a custom TSR.

You need some code to intercept the timer interrupts and cause every 34th
one to be skipped.  The more technically knowlegeable folks out there may
correct me, but my understanding is that the DOS "clock" is maintained in
software.  Some internal "clock" variables get incremented on each timer
interrupt, roughly 18 times per second (as you have found).  Since this 
interrupt is occuring too often, you need to write code to intercept this,
and NOT chain to other handlers on each 34th interrupt  
	18.75 / (18.75 - 18.20) = 34 (approx).

To avoid problems with other software that might chain to this interrupt,
it is probably best that this TSR be loaded LAST from the autoexec.bat file.
On second thought, maybe it would HELP other software.. in which case load 
it first! 

Have fun.
-- 
 ______Mark S. Lord______________________ ______________________________
|    ..uunet!bnrgate!carrsc!mlord        | These are only MY opinions.  |
| or:  bnr-rsc!mlord at bnrgate             | I charge for official views. |
|________________________________________|______________________________|



More information about the Comp.sys.att mailing list