Mail Archives: djgpp/1997/04/24/07:54:56
On Tue, 22 Apr 1997, Alistair Phillips wrote:
> I have declared clock as
>
> unsigned int clock = (unsigned int *)0x0000046CL;
>
> then I call it
>
> srand(*clock);
>
> it compiles and links OK but when I run it I get a huge error message
You are using real-mode tricks in a protected-mode program, which is
why your program crashes. You can't access absolute addresses in that
way, because protected mode doesn't allow that.
Please read the DJGPP FAQ list, section 18.4, for an explanation of
how to do that in DJGPP. The FAQ is available as v2/faq210b.zip from
the same place you get DJGPP.
- Raw text -