| delorie.com/archives/browse.cgi | search |
| From: | "Luiz Fernando" <luisoft AT myway DOT com DOT br> |
| To: | <djgpp AT delorie DOT com> |
| Subject: | Newbie question. Please help |
| Date: | Sat, 10 Apr 1999 13:42:52 -0300 |
| Message-ID: | <01be8371$2d0814c0$LocalHost@aguia> |
| MIME-Version: | 1.0 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Mailer: | Microsoft Outlook Express 4.71.1712.3 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V4.71.1712.3 |
| Reply-To: | djgpp AT delorie DOT com |
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 ?
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);
}
in main event loop :
while(!done)
{
/* obtain starting time */
start_time = Timer_Query();
/* do some stuff here */
/* now determine if a clock tick has passed */
while((Timer_Query) - start_time)<WAIT_TIME);
}
Thanks for the help,
Luiz Fernando
luisoft AT myway DOT com DOT br
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |