Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbfsb!cbnewsb.cb.att.com!sladkey From: sladkey@cbnewsb.cb.att.com (john.r.sladkey..jr) Newsgroups: comp.sys.ibm.pc.hardware Subject: Re: Accurate timing on AT-computer Message-ID: <1991May23.204102.17788@cbfsb.att.com> Date: 23 May 91 20:41:02 GMT References: <1991May23.152030.7710@ugle.unit.no> Sender: news@cbfsb.att.com Followup-To: mvjrs@mvpgk.att.com Organization: AT&T Bell Laboratories Lines: 30 In article <1991May23.152030.7710@ugle.unit.no> \ gunnarkn@itk.unit.no (Gunnar Knutson) writes: > I need to time the interval between two interrupts with > accuracy in the milli-seconds range. The maximum resolution on the AT > real time clock is one second, so I can't use that. Does anyone out > there have a better idea ? > Regards, Gunnar Knutson > Division of Engineering Cybernetics : Phone +47 7 594376 > The Norwegian Institute of Technology : Fax +47 7 594399 > N-7034 Trondheim : Email gunnarkn@itk.unit.no > NORWAY There is an excellent book called "The Zen of Assembly Language" (can't remember the author). There are some canned routines that can be typed in or used for learning about the hi resolution timer. If you can believe it, the timer is capable of nearly microsecond timing accuracy! The book is great and the routines worked for me on my 386. SIMTEL20 has two files that contain the listings from the book: PD1: ZENDISK1.ZIP ASMUTL 64821 0390 Listings from 'Zen of Assembly Language', #1 ZENDISK2.ZIP ASMUTL 108672 0390 Listings from 'Zen of Assembly Language', #2 ZENDISK1 contains the code of interest to hi-resolution timer. Hope this helps, Rick Sladkey, mvjrs@mvgpk.att.com