Mail Archives: djgpp/1998/01/16/19:45:38
HackerOC3 wrote:
>
> I am using a function to blit chars and strings to the screen. Below is the
> version that blits chars. It crashes my computer. I think it may have
> something to do with the base
> address for the ASCII chars, 0xF000FA6EL.
[snip]
> //Compute the starting offset in the ROM character look - up table.
>
> *work_char = (unsigned char)0xF000FA6EL + c * CHAR_HEIGHT);
Of course this won't work. You're trying to access an absolute address
in conventional memory from a protected mode program. You're also using
an illegal addressing method; remember that DJGPP is not Turbo C.
The equivalent protected mode address would be 0xffa6e, and you can
access it by using the _farpeekX() functions just like you use
_farpokeX() to access video memory. For more information, see chapter
18 of the Frequently Asked Questions list (v2/faq210b.zip from SimTel or
online at http://www.delorie.com/djgpp/v2faq/).
hth
--
---------------------------------------------------------------------
| John M. Aldrich | "A committee is a life form with six |
| aka Fighteer I | or more legs and no brain." |
| mailto:fighteer AT cs DOT com | |
| http://www.cs.com/fighteer | - Lazarus Long |
---------------------------------------------------------------------
- Raw text -