delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/06/11/06:21:08

Message-ID: <3D05B0A7.AAB598F8@yahoo.com>
From: CBFalconer <cbfalconer AT yahoo DOT com>
Organization: Ched Research
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Question about djgpp's int-wrapper
References: <5 DOT 0 DOT 2 DOT 1 DOT 2 DOT 20020608134608 DOT 009e4050 AT pop DOT gmx DOT net> <96eb2770 DOT 0206102144 DOT 74a87c25 AT posting DOT google DOT com>
Lines: 28
Date: Tue, 11 Jun 2002 08:20:39 GMT
NNTP-Posting-Host: 12.90.167.118
X-Complaints-To: abuse AT worldnet DOT att DOT net
X-Trace: bgtnsc04-news.ops.worldnet.att.net 1023783639 12.90.167.118 (Tue, 11 Jun 2002 08:20:39 GMT)
NNTP-Posting-Date: Tue, 11 Jun 2002 08:20:39 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Alex Yeryomin wrote:
> 
... snip ...
> 
> -------------------------------------------
> [BITS 32]
> [GLOBAL _Read_TSC]
> [SECTION .text]
> _Read_TSC:
>         mov ecx, [esp+4]
>         rdtsc
>         mov [ecx], eax
>         mov [ecx+4], edx
>         ret
> ;_Read_TSC
> -------------------------------------------
> typedef unsigned long long int TICK;
> extern void Read_TSC (TICK *tick);
> -------------------------------------------

You need to do some guarding.  rdtsc will immediately crash a '486
as an illegal instruction.

-- 
Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net)
   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>  USE worldnet address!

- Raw text -


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