delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/21/16:15:02

Newsgroups: comp.os.msdos.djgpp
From: manni DOT heumann AT gmx DOT de (Manni Heumann)
Subject: RE: Accurate timing!
References: <Pine DOT LNX DOT 4 DOT 10 DOT 10002210805370 DOT 1141-100000 AT darkstar DOT grendel DOT net>
X-Newsreader: News Xpress 2.01
Date: Mon, 21 Feb 2000 14:14:14 GMT
NNTP-Posting-Host: dhcp33-226.uni-bielefeld.de
Message-ID: <38b14861_1@news.uni-bielefeld.de>
X-Trace: 21 Feb 2000 15:14:57 +0200, dhcp33-226.uni-bielefeld.de
Lines: 29
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <Pine DOT LNX DOT 4 DOT 10 DOT 10002210805370 DOT 1141-100000 AT darkstar DOT grendel DOT net>, djgpp AT delorie DOT com wrote:

[SNIP]

>
>All you do is program the timer chip to a higher rate but make sure that
>the new (ie your) interrupt handler calls the old handler at exactly the
>same rate that the BIOS would have done. This will avoid all the floppy
>drive related problems also. Any minor system date variations due to the
>fact that the old interrupt handler not being called at _exactly_ the BIOs
>deafault rate can be avoided by using the CMOS to set the system date upon
>termination of the spplication.
>
>Grendel.

Correct. BUT:
It depends on the interrupt that you hook: If you hook 0x1c you're out of 
luck. Because 0x1c gets called by 0x8, which will also advance the timer.

So: If you alter the timer speed, you should hook int 8, and from your own 
handler call the old handler every 55th time.

If you do not speed up the timer, it should be easier to hook int 1c, because 
you won't have to think about your system clock in this case.


--

Manni

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019