Mail Archives: djgpp/1999/01/10/07:56:36
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.
- Raw text -