Mail Archives: djgpp/1998/04/14/22:48:58
MNR. LE SMITH wrote:
>
> hi
>
> could someone please give me a painfully detailed explanation of
> segment overrides...
I'm not qualified to do this, but...
> .. i understand it's an extra intruction one has to make before EACH
> and EVERY memory access.. (doesnt this kill execution speed totally?)
If you are referring to the _farpokeX()/_farpeekX() convention, then you
don't necessarily have to override the segment register each time. In
fact, it only takes one extra cycle, but if you're down to counting
individual cycles, you can replace any loop that uses _far*() with a
call to _farns*(), assuming you call _farsetsel() beforehand. Note that
the only way to guarantee that this will work properly is to make NO
library function calls except for _farns*() inside the loop.
Look up _far* in the libc documentation for more info.
--
---------------------------------------------------------------------
| John M. Aldrich | "A woman is not property, and hus- |
| aka Fighteer I | bands who think otherwise are living |
| mailto:fighteer AT cs DOT com | in a dreamworld." |
| http://www.cs.com/fighteer | - Lazarus Long |
---------------------------------------------------------------------
- Raw text -