Date: Wed, 29 Oct 1997 08:52:52 -0500 (EST) Message-Id: <199710291352.IAA03164@delorie.com> From: DJ Delorie To: peter DOT acs AT dial DOT pipex DOT com CC: djgpp AT delorie DOT com In-reply-to: <345718dd.193834@news.dial.pipex.com> (peter.acs@dial.pipex.com) Subject: Re: Porting problem from Borland C++ Precedence: bulk > unsigned long *ptr = (unsigned long *) 0x00400000; > uint SPA; > SPA = *(ptr+CmPt-1); /* get the address */ That won't work in DJGPP because it assumes 16-bit mode. 0x00400000 is a 32-bit *near* pointer in DJGPP. Try this instead (you'll need and ): uint SPA = farpeekw(_dos_ds, 0x400+(CmPt-1)*2);