Mail Archives: djgpp/1999/04/10/17:01:19
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
- Raw text -