Sender: nate AT cartsys DOT com Message-ID: <370FBB67.EC24F000@cartsys.com> Date: Sat, 10 Apr 1999 13:58:15 -0700 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.5 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Newbie question. Please help References: <01be8371$2d0814c0$LocalHost AT aguia> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Luiz Fernando wrote: > > Hi , > How can i read a memory location in the PC at 0000:046Ch which contains > a 32-bit value of the number of ticks from 1970 using djgpp ? Since *midnight*, not 1970. At 55 ms, that would be pretty worthless (it would have wrapped around a few dozen times by now). > And why the following piece of code does not work ? > > long Timer_Query(void) > { > // this function is used to record the current time > long *clock(long *)0x0000046CL; > return(*clock); > } See FAQ section 18.4 for the whole story. However, you can also use: return _farpeekl(_dos_ds, 0x0046c); or even return rawclock(); -- Nate Eldredge nate AT cartsys DOT com