From: Bjorn Hansen Newsgroups: comp.os.msdos.djgpp Subject: Re: Memory buffer in VGA mode 13h Date: Thu, 13 Aug 1998 11:29:00 -0800 Organization: ISPNews http://ispnews.com Lines: 49 Message-ID: <35D33E7B.A1629AF3@xyz.net> References: NNTP-Posting-Host: hom-3-4.xyz.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Date: 13 Aug 1998 19:31:03 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Well it works ok for me. Here is some code that works so you can see if it is similar to what you are trying to do. #include #include #include #include #define VGA_13h 0x13 #define TEXT 3 #define BACKGROUND 6 char image[320*200]; ///////////////set mode//////////////////// void set_mode(int mode) { __dpmi_regs r; r.x.ax = mode; __dpmi_int(0x10, &r); }; ////////////create the picture////////////// void make_pic(void) { int i; memset(image,BACKGROUND,sizeof(image)); }; ///////put the picture on the screen/////// void paint(void) { dosmemput(image,320*200,0xA0000); }; ///////////////////MAIN///////////////////// void main() { set_mode(VGA_13h); make_pic(); paint(); while(!kbhit()); set_mode(TEXT); } Bjorn Hansen