delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/01/18/09:31:02

From: Tom St Denis <stdenis AT compmore DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Reading MSR (Athlon multiplier)
Date: Thu, 18 Jan 2001 12:44:31 GMT
Organization: Deja.com
Lines: 40
Message-ID: <946ofe$vlp$1@nnrp1.deja.com>
References: <3a66161d DOT 226362160 AT news DOT sci DOT fi> <945a90$ckgq1$1 AT ID-57378 DOT news DOT dfncis DOT de> <945itn$3ai$1 AT nnrp1 DOT deja DOT com> <945mn8$cjroo$1 AT ID-57378 DOT news DOT dfncis DOT de>
NNTP-Posting-Host: 24.156.37.224
X-Article-Creation-Date: Thu Jan 18 12:44:31 2001 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.01 [en]
X-Http-Proxy: 1.1 x66.deja.com:80 (Squid/1.1.22) for client 24.156.37.224
X-MyDeja-Info: XMYDJUIDtomstdenis
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <945mn8$cjroo$1 AT ID-57378 DOT news DOT dfncis DOT de>,
  "Alexei A. Frounze" <dummy_addressee AT hotmail DOT com> wrote:
> "Tom St Denis" <stdenis AT compmore DOT net> wrote in message
> news:945itn$3ai$1 AT nnrp1 DOT deja DOT com...
> > In article <945a90$ckgq1$1 AT ID-57378 DOT news DOT dfncis DOT de>,
> >   "Alexei A. Frounze" <dummy_addressee AT hotmail DOT com> wrote:
> > > right, you can use RDTSC for getting CPU speed. But RDTSC can be
> disabled in
> > > user mode (e.g. Privilege Level 3) by an OS.
> > > for instance, the following code works fine on my Celeron566 imder winME
> and
> > > gives 564-566MHz:
> >
> > Works somewhat cool, I got 807Mhz on my 800Mhz TBird Athlon.
>
> Glad to hear that a program I made in around 15 mins, works for you too. :)

You should calc for the stack overhead.  I.e do something like

mov ebp,128
l1:
rdtsc
push eax
push edx
rdtsc
pop eax
pop edx
add ebx,eax
adc ecx,edx
dec ebp
jnz l1:
shrd ebx,ecx,7

(overhead in ecx::ebx)

Tom


Sent via Deja.com
http://www.deja.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019