Mail Archives: djgpp/1997/07/08/16:40:51
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 -