Mail Archives: djgpp/1998/08/13/15:46:44
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 <go32.h>
#include <sys/farptr.h>
#include <sys/movedata.h>
#include <dpmi.h>
#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
- Raw text -