From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: movedata() problems... Date: Fri, 29 Nov 1996 18:01:32 -0800 Organization: Three pounds of chaos and a pinch of salt Lines: 23 Message-ID: <329F957C.4D0E@cs.com> References: <57nnjo$fdt AT nr1 DOT calgary DOT istar DOT net> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp103.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: rog AT col DOT ca DJ-Gateway: from newsgroup comp.os.msdos.djgpp Roger Carbol wrote: > > I'm having some problems with protection faults while using > the movedata() function... > > I'm trying to dump a buffer into the video memory in mode13...the code > segment looks like this: > > movedata ((int)_my_ds, (int)image->buffer, 0xA000, 0000 , 32); That should be _my_ds(). It's a function, not a variable, so trying to use its _address_ as the selector won't work for obvious reasons. :) This is actually an error in the DJGPP docs, because they lead you to believe that the above is the correct way to use _my_ds(). The DJGPP v2.01 docs fix this problem, so I recommend you download the newer version. -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | Proud owner of what might one | http://www.cs.com/fighteer | | day be a spectacular MUD... | Plan: To make Bill Gates suffer | ---------------------------------------------------------------------