From: Yamaha / XYZZ Newsgroups: comp.os.msdos.djgpp Subject: Re: Graphics under DJGPP V2.01 Date: Thu, 12 Dec 1996 11:23:31 -0700 Organization: XYZZ Software Co. Lines: 36 Message-ID: <32B04DA3.41C6@CS.ColoState.edu> References: <01bbe78f$57f16cc0$LocalHost AT default> NNTP-Posting-Host: miro.vis.colostate.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Thomas Harte DJ-Gateway: from newsgroup comp.os.msdos.djgpp Thomas, I'd suggest that you follow some of the DJGPP graphics links on my web page. There are probably links for what you want. Thomas Harte wrote: > which, as I'm sure you can imagine is VERY slow, in that it copies each > pixel individually. Anyway, my question is :- > > Which faster methods can I use to copy the contents of an integer into the > video ram, starting at 0xA0000 ? Well, for an integer you could use farpokensl(); (something like that) Really, though, I'd suggest doing almost all your drawing in an offscreen buffer, and blasting it onscreen once per frame. This gives you more control, easier access, and is often faster. > How would I switch graphic modes (to and from mode 13h) under DJGPP ? (at > the moment I have code from the old compiler which changes modes running > before and after the new programs in a batch file) Try this (it *might* not work well with optimization on): asm(" movl $0x13, %eax int $10 "); Or try this: __dpmi_regs regs; regs.x.ax = 0x13; __dpmi_int(10, ®s); -- Yamaha / XYZZ mailto:scriven AT CS DOT ColoState DOT edu mailto:scriven AT VIS DOT ColoState DOT edu http://www.vis.colostate.edu/~scriven/