Date: Fri, 14 Mar 2003 22:05:13 -0500 Message-Id: <200303150305.h2F35DG11549@envy.delorie.com> X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT delorie DOT com using -f From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: (ken DOT jen AT adelphia DOT net) Subject: Re: Problems adressing memory variable References: Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > char * disp_str = "Hello!"; > output.x.bp = ((disp_str[0]) >> 4); > output.x.ss = (((disp_str[0]) << 4) >> 4); Addresses in DJGPP are *not* segment:offset. They are 32-bit linear offsets into a protected segment (i.e. all DJGPP programs are TINY mode, not far mode). If you want to pass data to a DOS function like this, you *must* copy the data to DOS memory and calculate the seg:ofs of that buffer. You'll need to use something like dosmemput() or and the transfer buffer defined in .