Mail Archives: djgpp/2001/01/22/17:38:00
"Darryl Gates" <gatesjd AT cadvision DOT com> wrote:
> Hi all,
>
> I'm trying to load the BIOS fonts (which I've been told are at 0xffa6e) into
> an array of my own so that they can be drawn to the screen in graphics mode
> (I'm using mode 105h). Anyway, I have no problem doing this when I use
> __djgpp_nearptr_enable(), but I want to be able to do it with _farpeekb(). I
> try setting my segment base address to 0xffa6e and then copying them over,
> but it doesn't seem to be working. Here is my chunk of code that I'm using.
> I've tried to search this ng and look through the FAQ, and I still haven't
> got it right. Any help or insight into what I'm doing wrong would be greatly
> appreciated...
[snip code with near ptrs]
I can't tell what is wrong with your code but you should know that you
could do this without resorting to near pointers.
The FAQ tells how to allocate a transfer buffer in conventional
memory, which you could then use to save/load the font data. DJGPP
uses this technique in conio.c to achieve a 30 line text mode display,
the source code is free for inspection if you want an example of how
it can be done.
- Raw text -