From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Char blitting Date: Fri, 16 Jan 1998 19:41:09 -0500 Organization: Two pounds of chaos and a pinch of salt. Lines: 32 Message-ID: <34BFFE25.192C@cs.com> References: <19980116194601 DOT OAA28275 AT ladder02 DOT news DOT aol DOT com> NNTP-Posting-Host: ppp247.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 | ---------------------------------------------------------------------