Message-ID: From: "Heuvel, A.W.v.d." To: "'djgpp AT delorie DOT com'" Subject: Re: Graphics Date: Mon, 13 Mar 2000 13:49:08 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote in message news:... > > On Sun, 12 Mar 2000 bobbi AT integrityonline DOT com wrote: > > > How do you plot pixels in mode 13h (DJGPP)? > > My (old) Borland code doesn't work. > > Post here the code which desn't work, otherwise no one can tell why it > doesn't, and how to change it so it would. You could use the _farpoke* functions: #include #include #include __dpmi_regs r; void inline plotpixel(unsigned short x,unsigned short y,unsigned char color) { _farpokeb(_dos_ds,0xA0000+y*320+x,color); } int main(void) { // Switch to mode 13h r.x.ax = 0x013; __dpmi_int(0x10,&r); plotpixel(10,10,4); getch(); // Switch to text mode 03h r.x.ax = 0x03; __dpmi_int(0x10,&r); } If you still have problems mail me: mailto://A DOT W DOT v DOT d DOT Heuvel AT Student DOT tue DOT nl