🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How can I determine the clock frequency on an 80xxx machine??

#3756
From: Jerzy Tarasiuk
Date: Tue, 13 Oct 1992 14:57
31 lines
2404 bytes
>>>>> On 8 Oct 92 21:04:38 GMT, rap@novell.com (Robert A. Pease) said:
Robert> In article <JT.92Oct7214603@fizyk1.fuw.edu.pl> (Jerzy Tarasiuk) writes:
>>>>>> On Wed, 30 Sep 1992 13:42:48 GMT, (menglund) said:
>m> I am wanting to know how to determine a machines clock frequency dynamically
>m> within a program. (eg: 8MHz, 16MHz ect).
>
>I don't see necessity to determine machine clock frequency. You can
>compare periods on the ADC board timer chip and main board timer chip
>(which has always same frequency on its input). Just the 8253 on the
Robert>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>ADC card makes the simplest way to determine the clock frequency!
Robert> Unfortuneatly, this is not true.  The higher quality clones will have
Robert> the correct clock frequency going to the timer, but there are some
Robert> clones that use a cheaper crystal which is off the standard frequency
Robert> for the PC clones.

If the timer gots bad frequency, what way can measure time ? DOS takes
time from the chip and even small change of the frequency would result
in bad values from DOS 'TIME' command. On AT can use CMOS clock to
verify 8253 timer has good frequency, but on XT there is no way unless
know all possible clock/calendar cards and use time get from such a card.

Another reason for the 8253 should always get correct clock is its clock
is derived from CLK signal on bus which is used by CGA to form signal for
TV set which color decoding can be very sensitive to frequency errors.

Robert> Because of variations in board design, caching, memory archecture,
Robert> non-Intel chip vendors and other things it is not possible to determine
Robert> the CPU clock frequency via instruction timming with any degree of

Note I stated don't need to know CPU clock.
Technical Details
Message-ID: <JT.92Oct13155753@fizyk1.fuw.edu.pl>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jt
References: <menglund.1.717860568@unpcs1.cs.unp.ac.za> <JT.92Oct7214603@fizyk1.fuw.edu.pl> <1992Oct8.210438.19205@novell.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jt
From: jt@fuw.edu.pl (Jerzy Tarasiuk)
Subject: Re: How can I determine the clock frequency on an 80xxx machine??
In-Reply-To: rap@novell.com's message of 8 Oct 92 21:04:38 GMT
Message-ID: <JT.92Oct13155753@fizyk1.fuw.edu.pl>
Sender: news@fuw.edu.pl
Nntp-Posting-Host: fizyk1
Organization: Warsaw University Physics Dept.
References: <menglund.1.717860568@unpcs1.cs.unp.ac.za> <JT.92Oct7214603@fizyk1.fuw.edu.pl>
 <1992Oct8.210438.19205@novell.com>
Date: Tue, 13 Oct 1992 14:57:53 GMT
Lines: 31