Mail Archives: djgpp/1995/06/06/02:52:50
> Am I correct to then assume that I can not fill a screen using an
> assembly routine that directly stores data in it (rather than calling
> some other routine for each pixel/line/etc? That would probably be too
> slow for what I am doing.
No, it won't. These ``slow'' routines are written in inline assembly and
expand into the minimal two machine instructions necessary to access a
far pointer in protected mode. The extra instruction you pay to do it in
a way that preserves memory protection are seldom large enough punishment
to go for tricks which were recently described in the ``Fat DS'' thread.
If you have to update many pixels in a loop, there is a version of the
above farptr functions which load the segment register only once, so you
only have a single instruction (albeit with a segment override) inside the
loop.
Still think this is too slow?
Btw, this isssue is discussed in the DJGPP FAQ list, Chapter 10. The FAQ is
available as faq101.zip from the same place you got DJGPP.
- Raw text -