| www.delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| From: | "Cristiano" <cristiano DOT pi AT NSquipo DOT it> |
| Newsgroups: | comp.os.msdos.djgpp |
| References: | <43cbed4a_1 AT x-privat DOT org> <gkbt93-1jp1 DOT ln1 AT news DOT infowest DOT com> |
| 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" <cristiano DOT pi AT NSquipo DOT it> 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?
>>
> <snip>
>
>> Thanks
>> Cristiano
>
> I think this is more of what you want:
>
> #include <stdio.h>
>
> #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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |