🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.misc
Article #3919

Re: Fast Timer Interrupts, anyone?

#3919
From: walt dixon
Date: Sat, 13 Oct 1990 14:45
30 lines
1988 bytes
In <39119@ucbvax.BERKELEY.EDU> Steven Cole writes:

>I'm looking for a code fragment that sets up timer interrupts
>approximately every 125 usec on a vanilla PC.  From what I understand,
>this is possible by resetting the timer chip that causes INT 08, but
>unfortunately I don't know just how to do this.  (I.e., is this
>register memory mapped or does it take some obscure I/O operation?)

It is definitely possible to change the rate of the system clock.  There are
side effects of just increasing the clock frequency such as the tod clock
gains time and some bios operations time out prematurely.  The "proper"
approach is to install a new int 8 ISR which calls the previous ISR
at the appropriate time.  The clock chip on the PC (8253) is pretty easy
to use,  and there are a number of books which describe its operation.
Before I would attempt such a speed up,  I would do some kind of timing
analysis to make sure there were enough CPU cycles available.

Check out Chapter 11 of "The MS-DOS Papers" (Howard Sams, 1988).  In that
chapter I present a device driver which speeds up the clock by a factor
of 16 and go through the timing analysis.  The book contains complete
source code for the driver.  BTW I get no revenues from book sales;  I'm
just citing a good reference.

Walt Dixon		{internet:	dixon@crd.ge.com	}
			{us mail:	ge-crd			}
			{		po box 8		}
			{		schenectady, ny 12301	}
			{phone:		518-387-5798 (W)	}
			{		518-875-6203 (H)	}
Walt Dixon dixon@crd.ge.com
Technical Details
Message-ID: <12702@crdgw1.crd.ge.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!uakari.primate.wisc.edu!crdgw1!sagittarius!dixon
References: <39119@ucbvax.BERKELEY.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!uakari.primate.wisc.edu!crdgw1!sagittarius!dixon
From: dixon@sagittarius.crd.ge.com (walt dixon)
Newsgroups: comp.sys.ibm.pc.misc
Subject: Re: Fast Timer Interrupts, anyone?
Message-ID: <12702@crdgw1.crd.ge.com>
Date: 13 Oct 90 14:45:40 GMT
References: <39119@ucbvax.BERKELEY.EDU>
Sender: news@crdgw1.crd.ge.com
Reply-To: dixon@sagittarius.crd.ge.com (walt dixon)
Organization: General Electric Corp. R&D, Schenectady, NY
Lines: 30