Mail Archives: djgpp/1997/06/17/04:07:27
On Mon, 16 Jun 1997, Tony wrote:
> Does the value _my_ds() returns change throughout the program? if so
> how often and what makes it change?
AFAIK, it stays put throughout the entire run, unless you have a
signal (like SIGINT or SIGPROF) pending, which can only happen in a
hardware interrupt handler. So if your program doesn't install an
interrupt handler or a real-mode callback, you can call `_my_ds' once
and use the value it returns hence.
However, since a call to `_my_ds' expands to something like 3 machine
instructions, you might consider call it anyway near the place that
uses its value.
- Raw text -