Mail Archives: djgpp/1997/07/21/09:46:30
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
- Raw text -