From: Meta Newsgroups: comp.os.msdos.djgpp Subject: Re: Text in 0x101? Date: Sun, 24 Aug 1997 21:17:59 -0400 Organization: Concentric Internet Services Lines: 82 Message-ID: <3400DD47.7725@concentric.net> References: <5tke8j$813$1 AT news1 DOT epix DOT net> Reply-To: syzmik AT concentric DOT net DOT NOSPAM NNTP-Posting-Host: ts019d07.sag-mi.concentric.net 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 Avallone wrote: > > Is there a way to display black text on a white background in graphics > 0x101? Here's some code, I can't remember where I found it. I think I never used it because it wouldn't work with mem protection on our something. Email me with a fix or somethin. *************************************************************** #include #include #include #include #include #include "vesag.h" #define CHAR_WIDTH 8 #define CHAR_HEIGHT 8 char *rom_char_set = (char *)0xFFA6E; void blit_char(int x, int y, int color, unsigned char c) { int offset, x2, y2; char *work_char; unsigned char bit_mask = 0x80; _farpokeb(_dos_ds, rom_char_set + c * CHAR_HEIGHT, work_char); offset = y * SCREEN_H + x; for(y2=0; y2> 1); } offset += SCREEN_W; work_char++; } } void blit_string(int x, int y, int color, char *string) { int index; for(index=0; string[index] != 0; index++) { blit_char(x+(index<<3),y,color,string[index]); } } void main(void) { unsigned count; rom_char_set += __djgpp_conventional_base; VG_InitGraph(VG_640x480); VG_InitDB(); for(count = 0; count < 32000; count++) { blit_string(rand() % 296, rand() % 192, rand() % 256, "Hello"); } VG_ShowDB(); delay(1500); VG_CloseGraph(); return; }