Message-Id: <01BB611D.C5F60080@gw2-159.pool.dircon.co.uk> From: David L Clayton To: "'DJGPP mail place'" Subject: graphics Date: Sun, 23 Jun 1996 16:04:05 -0000 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable richard 725 AT denver DOT email DOT com was wondering about mode 13: Take a butchers at the following code, which sets the mode as 320 by 200 = with 256 colours, and then uses the screen buffer to plot a pixel: union REGS r; char *scrptr; char ScreenBuffer[64000]; // 320 * 200 =3D 64000, which is the memory = we must // allocate void set320x200(void) { r.h.ah =3D 0; // Clears previous values for ah r.h.al =3D 13; // Video mode required int86(0x10, &r, &r); // Interrupt 10 is the video card. Simple, eh? } void drawbufferpixel(long x, long y, char colour) { *((char *) Screen Buffer + ((y<<*)+(y<<6))+x)=3Dcolour; // Calculates = the location = = = //of the pixel on a 300 by = = = memcpy(scrptr,ScreenBuffer,64000); //200 screen, = and sets=20 memset(ScreenBuffer,0,64000); //that value = within the = = =20 = //screen buffer to the colour = = //specified } ---------------------- David L Clayton ----------------------