delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2006/03/07/08:32:09

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "mames" <matteomamei AT yahoo DOT it>
Newsgroups: comp.os.msdos.djgpp
Subject: application that retrieve the number of cpu cycle, junk 'cycle' after expression
Date: 7 Mar 2006 05:22:32 -0800
Organization: http://groups.google.com
Lines: 28
Message-ID: <1141737752.454796.204020@v46g2000cwv.googlegroups.com>
NNTP-Posting-Host: 80.195.236.140
Mime-Version: 1.0
X-Trace: posting.google.com 1141737757 19196 127.0.0.1 (7 Mar 2006 13:22:37 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Tue, 7 Mar 2006 13:22:37 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: v46g2000cwv.googlegroups.com; posting-host=80.195.236.140;
posting-account=5tmetQ0AAADcRXtsS5Zf6A1nh0oPW1NY
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

hi to everyone is the first time i write but i looking for an assembler

problem and i don't manage to find a solution. i've found on internet
an application that retrieve the number of cpu cycle. it's wrote in
assembler and i don't manage to use its.

double GetMachineCycleCount()
{
   double cycles;
   __asm("cpuid");
   __asm("rdtsc");
   __asm("mov %ebx,OFFSET cycles");
   __asm("mov ebx,%eax");
   __asm("mov ebx+4,%edx");
   return cycles;



}


when i compile the application (i'm using devc++) it notice me this
error:
error....junk 'cycle' after expression

what is it mean? 
thanks a lot to everyone

- Raw text -


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