Mail Archives: djgpp/1997/09/09/17:51:02
Olmeca <chromes AT hotmail DOT com> wrote:
> I have a code-fragment, like this:
> vga_addr=(unsigned char * ) 0xA0000000;
> movmem(unsigned char * vga_addr,unsigned char *spr, 64000);
> It works in all C-compilers, except in DJGPP: memory error. (exception
> fault, or something like that...)
> What shall I do?
It does not work on "all C-compilers." Any *nix compiler will bomb on the
above code as well. The reason is that DJGPP-compiled programs run in
"protected mode," where it is illegal to reference "just any" address; you may
only reference address within your address space. How to accomplish what
you are trying to do is discussed in the FAQ, section 10.2.
--
[- firewind -]
[- email: firewind AT metroid DOT dyn DOT ml DOT org (home), firewind AT aurdev DOT com (work) -]
[- "You're just jealous because the voices talk to -me-." -]
- Raw text -