Mail Archives: djgpp/1997/09/09/00:32:42
At 05:32 9/4/1997 GMT, Olmeca 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?
DJGPP is a protected mode compiler. Addressing conventional memory is not
done like that in protected mode. Try this:
unsigned int vga_offset = 0xA0000; /* a 20-bit address */
movedata(_my_ds(),spr,_dos_ds,vga_offset,64000);
Consider getting a protected mode tutorial (anybody know a good one?)
Nate Eldredge
eldredge AT ap DOT net
- Raw text -