From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: Graphics under DJGPP V2.01 Date: Thu, 12 Dec 1996 20:19:53 +0000 Organization: None Lines: 32 Distribution: world Message-ID: <+I7MVFApjGsyEwWj@talula.demon.co.uk> References: <01bbe78f$57f16cc0$LocalHost AT default> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Thomas Harte writes: > for(temp=0;temp<64000;temp++) > { > _farpokeb(_dos_ds, 0xA0000 + temp, doublebuffer[temp]); > doublebuffer[temp]=background[temp]; > } > > Which faster methods can I use to copy the contents of an > integer into the video ram, starting at 0xA0000 ? Try dosmemput(), or dosmemputl(). These are described in the info docs, and should use a 'rep ; movsl' instruction which is about as fast as it possible to do the transfer. > How would I switch graphic modes (to and from mode 13h) under DJGPP ? The same way as in real mode: call BIOS interrupt 0x10. The only difference is that you have to use a DPMI function to call the BIOS, eg: __dpmi_regs r; r.x.ax = 0x13; __dpmi_int(0x10, &r); For some excellent introductory tutorials to graphics coding under djgpp, take a look at Brennan's pages: http://www.rt66.com/~brennan/djgpp/ /* * Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ * Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'. */