delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/17/04:07:27

Date: Tue, 17 Jun 1997 11:05:08 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Tony <tonys111 AT erols DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: _my_ds () return
In-Reply-To: <33a4c7cf.1802130@news.erols.com>
Message-ID: <Pine.SUN.3.91.970617110450.20818F-100000@is>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019