From: firewind Newsgroups: comp.os.msdos.djgpp Subject: Re: movmem in DJGPP 2.* Date: 4 Sep 1997 22:44:51 GMT Organization: Netcom Lines: 18 Message-ID: <5undl3$acu@sjx-ixn4.ix.netcom.com> References: <01bcb958$32a58460$750760c3 AT default> NNTP-Posting-Host: elp-tx2-08.ix.netcom.com Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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? 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-." -]