www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/13/12:04:15

From: strider7 AT unm DOT edu
Date: Sat, 13 Jan 1996 09:45:41 -0700
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: good 'ol 13h question

Im new to 32-bit programming, and im used to borland c++ 3.0 and i was 
wondering how i can write directly to the vga.  Here's what i did in borland 
c++:

#include <mem.h>
#include <conio.h>

unsigned char far *screen=(unsigned char far *)MK_FP(0xa000, 0);

void main()
{
 setmode(0x13);  /* vga mode 13h */

 screen[0]=2;    /* put a green pixel at 0,0 */

 getch();        /* wait... */

 setmode(0x03);  /* regular vga mode */
}

I looked at the faq, but i still dont know what to do.  BTW, im using djgpp 
v2, beta 4.

- Raw text -


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