🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2268

Re: which timer interrupt to use? (1A vs 1C)

#2268
From: Stephen C. Trier
Date: Tue, 18 Sep 1990 02:13
20 lines
1696 bytes
In article <pst.653596434@ack.stanford.edu> pst@ack.stanford.edu (Paul Traina) writes:
>Originally, I was doing it by speeding up the system timer and counting
>ticks, then calling the original INT 1A routine from my handler every
>n ticks.  Well, this made correction for delay really ugly,  so I've
>now just reprogrammed the system timer to generate interrupts exactly
>20 times a second instead of 18.207 times a second.

Here's an idea -- not particularily new, but a good one.  Rather than
give up on your real-time clock, just bump it over every now and then.
In other words, use the following rule:  If (i is not a multiple of ten)
or (i is equal to 100), then (give the BIOS a timer tick).

This will keep your system clock in sync while maintaining your 20 Hz
signal.  I like passing on a correct clock tick, especially since it
doesn't really take that much extra work or time to do so.

-- 
Stephen Trier                              Case Western Reserve University
Work: trier@cwlim.ins.cwru.edu             Information Network Services
Home: sct@seldon.clv.oh.us
Technical Details
Message-ID: <1990Sep18.021303.29505@usenet.ins.cwru.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!cwlim!trier
References: <pst.653596434@ack.stanford.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!cwlim!trier
From: trier@cwlim.CWRU.EDU (Stephen C. Trier)
Newsgroups: comp.os.msdos.programmer
Subject: Re: which timer interrupt to use? (1A vs 1C)
Summary: Why not pass on a correct timer tick, a la leap year?
Message-ID: <1990Sep18.021303.29505@usenet.ins.cwru.edu>
Date: 18 Sep 90 02:13:03 GMT
References: <pst.653596434@ack.stanford.edu>
Sender: news@usenet.ins.cwru.edu
Reply-To: sct@seldon.clv.oh.us
Organization: Case Western Reserve Univ. Cleveland, Ohio, (USA)
Lines: 21