From: "pwillard" Newsgroups: comp.os.msdos.djgpp References: <8cg55n$1kl$1 AT mailint03 DOT im DOT hou DOT compaq DOT com> <38EB9E19 DOT FDEEB2C4 AT corel DOT com> Subject: Re: How to get bios timer tick count? Lines: 44 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Message-ID: Date: Thu, 06 Apr 2000 01:08:26 GMT NNTP-Posting-Host: 24.31.125.207 X-Complaints-To: abuse AT mediaone DOT net X-Trace: typhoon.southeast.rr.com 954983306 24.31.125.207 (Wed, 05 Apr 2000 21:08:26 EDT) NNTP-Posting-Date: Wed, 05 Apr 2000 21:08:26 EDT Organization: MediaOne - Atlanta To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Actually, I'm not too afraid of straight C code, but accessing BIOS information as in the FAQ made me very cautious. I'm not sure how to access the rom bios area to perform what the old pascal code was doing. Here is the snippet of Pascal: TICK := LONGINT(PTR($40, $6C)^); {GET ROM BIOS TIMER TICK COUNT} Should I be more creative when accessing the system as done in the example? I mean, what's the magic? I know that the 8253/8254 uses a 4 byte area located at 0040:006C (segment:offset notation) for incrementing a counter and that's exactly what the code above does. I want to snap shot the counter, and compare it's value to a snap shot later for speed calibration. I just don't understand yet how to tell DJGPP to do this without whacking the system into oblivion. Pete (Who's afraid to touch memory directly after reading the FAQ. ) Jonathan Meunier wrote in message news:38EB9E19 DOT FDEEB2C4 AT corel DOT com... > pwillard wrote: > > > > I'm converting some old pascal code for DJGPP and I have run into a snag. > > I'm not sure how to tell DJGPP to get the bios timer tick count value... > > anybody know? > > I don't actually know how to do this (haven't read much documentation on > timers/cpu clock), but if you post the part of the pascal source that > does this, I'm pretty sure I (or someone else in this ng) could convert > it to C. > > .(Trancelucid). > . Jaune .