Date: Wed, 18 Sep 1996 15:06:42 +0200 (IST) From: Eli Zaretskii To: morganp AT indy DOT net Cc: djgpp AT delorie DOT com Subject: Re: Timimg. In-Reply-To: <51o2mk$1rb@news.indy.net> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.