From: Michal Mertl Newsgroups: comp.os.msdos.djgpp Subject: Re: Timeconsuming __dpmi_int problem with pageflips! Date: Mon, 21 Jul 1997 12:55:32 +0100 Organization: University of Economics, Prague, Czech republic Lines: 44 Message-ID: <33D34E34.5DDD@vse.cz> References: <33cf809b DOT 147466 AT news DOT algonet DOT se> Reply-To: xmerm05 AT vse DOT cz NNTP-Posting-Host: s206h16.vse.cz Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Christian Granström wrote: > > Hi! > > I use a linearframebuffer with near pointers. Fliping between two > pages in the videomem can be done by function 0x4f07 using > the int 0x10. It worked just fine until I started to do som heavy > graphics routines.I could not belive that I couldn't draw more pixels > on p120 in 320x240x24 so i ran gprof. Gprof shows the horrible > truth that one single __dpmi_int takes near 50% of the cputime. > I think you don't need dpmi_int which switches cpu to realmode before issuing the interrupt because you don't need any segment registers (realmode). You probably can call just int86 and it will be much faster I guess. The other option is to use VESA PM interface. It'd be probably even faster. It's just call to PM function whose address you'd receive after 0x4f0a get_pm_interface VESA function (don't have documentation handy so maybe the number is wrong). You can look into Allegro source how it can be done. I'm sorry my answer isn't 100% accurate because I'm at school and don't have anything of docs handy. --code sniped-- > > Is there some place where I can get a good doc on how to optimize > C/C++ progs?? > Don't know, sorry. > Is there a good doc available for the At&t assembler syntax?? > (It drives me kind of crazy with its mixture of Motorola/Intel syntax) I've got several documents about it. Most of them probably from Brennan's page at http://www.rt66.com/~brennan/djgpp. BTW I found it quite easy to use. > ------------------------------------------------------------------------ > Christian Granström, Bryggerigatan 4A, 733 34 Sala, Sweden > derek AT algonet DOT se, christiang AT pasdata DOT se, www.algonet.se/~derek > +46(0)22477312, +46(0)704961587 > ------------------------------------------------------------------------ -- Michal 'MiMe' Mertl e-mail:XMERM05 AT vse DOT cz