X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Cristiano" Newsgroups: comp.os.msdos.djgpp References: <43cbed4a_1 AT x-privat DOT org> Subject: Re: Reading the TSC Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: $$_ewfrlexhg4.x-privat.org Message-ID: <43cc0ae2_3@x-privat.org> Organization: X-Privat NNTP Server - http://www.x-privat.org X-Authenticated-User: $$g656buj-7nk5btgknyi-m X-Complaints-To: abuse AT x-privat DOT org Date: 16 Jan 2006 22:06:42 +0100 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Rod Pemberton wrote: > "Cristiano" wrote in message > news:43cbed4a_1 AT x-privat DOT org... >> I'm trying to write the Pentium time-stamp counter in a file under >> MSDOS. DJGPP says that there is a parsing error. Please, could >> somebody help me? >> > > >> Thanks >> Cristiano > > I think this is more of what you want: > > #include > > #define RDTSC(x) __asm__ __volatile__ ("rdtsc":"=A"(x)); Now it says that rdtsc is not a 386 instruction. Is there any flag to set? > [...]. I didn't need to change the DPMI host to CWSDPR0 > which means the TSD CR4 bit is correct RM dos. If you are under XP, > etc., you may need to fixup CR4. That's all double dutch to me. :-) I installed DJGPP 3 hours ago. :-) Anyway, I should run that small program under pure DOS. > There is a long thread on rdtsc by > AL SANTINO 1/7/06 6:31PM in comp.lang.asm.x86. It recommends the > 'cpuid' instruction be thrown in there too. I seen that thread, thank you. Cristiano