Mail Archives: djgpp/1996/09/18/08:32:46
On Tue, 17 Sep 1996 morganp AT indy DOT net wrote:
> void Delay(int clicks)
> {
> unsigned int *clock = (unsigned int *)0x0000046CL;
> unsigned int now;
> now = *clock;
> while(abs(*clock - now) < clicks){}
[snip]
> This code however. isn't working. I know it's easy but I'm lost. I
Of course, it's easy: just read the DJGPP FAQ list. It explains in
section 18.4 how to access absolute addresses from your program. Since
DJGPP is a protected-mode environment, you cannot just put any address
into a pointer and dereference it.
The latest version of the DJGPP FAQ list is available as v2/faq201b.zip
from the same place you get DJGPP.
- Raw text -