Date: Sun, 10 Jan 1999 13:52:09 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Alex Lowe cc: djgpp AT delorie DOT com Subject: Re: Pointer to memory In-Reply-To: <36985DB7.C5C7D160@2xtreme.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Sat, 9 Jan 1999, Alex Lowe wrote: > And I want to have the pointers added, for example if the segement is > 0xAA and the offset is 0x03 then I can make a pointer to 0xAD... This is wrong. You need to shift the segment 4 bits to the left before adding the offset. So the pointer is 0xAA3, not 0xAD. > The code I am trying to port looks like this: > > char *offset=regs.x.bp; > char *segment=regs.x.es; > > char *font=*MK_FP(segment, offset); The FAQ describes how to do these things in DJGPP. See sections 18.2 and 18.4 there.