www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/08/16:40:51

From: Glenn <sven AT worldaxes DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: DJGPP and 13h graphics help
Date: Tue, 08 Jul 1997 00:09:09 -0400
Organization: none
Lines: 33
Message-ID: <33C1BD65.7D3D@worldaxes.com>
Reply-To: sven AT worldaxes DOT com
NNTP-Posting-Host: slip6.worldaxes.com
Mime-Version: 1.0
CC: sven AT worldaxes DOT com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello,

	I'm a newbie to DJGPP but not to C and I'm learning C++. Anyhow, here's
my problem... I'm programming a small graphics library in DJGPP that
does mode 13h and a lot of simple stuff. Yes I know Allergo exists, and
I have it, and it's an awesome library, but I want to know how this
stuff works from the ground up. I've been reading Andre LaMothe's books
about 13h graphics and games and I'm trying to access the 8x8 ROM text
characters so I can display them. The base address is 0xF000:FA6E and I
don't know how to access it in DJGPP since it's 32-bit. I've set DJGPP
to real mode programming to create my lib. LaMothe did it like this
(condensed):

#define ROM_CHAR_SET_SEG 0xF000
//Segment of 8x8 ROM character set.
#define ROM_CHAR_SET_OFF 0xFA6E
//Beginning offset of 8x8 ROM char set.
#define CHAR_WIDTH 8
#define CHAR_HEIGHT 8

...

unsigned char far *rom_char_set = (char far*)0xF000FA6EL;

How would I convert that statement into one that DJGPP can understand
and compile correctly?

I've done this much:

unsigned char *rom_char_set = (char *)---------;
I don't know what the correct address is. Do you add the segment and
offset? I've tried that it doesn't work, unless I added them wrong...
I'm stumped. Any help would be appreciated. Thanks.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019