www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/10/09:36:29

Date: Wed, 10 Dec 1997 16:35:25 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Steven Don <shd AT earthling DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Setting program name?
In-Reply-To: <66korf$mul@news.euro.net>
Message-ID: <Pine.SUN.3.91.971210163025.11116A-100000@is>
MIME-Version: 1.0

On 10 Dec 1997, Steven Don wrote:

> Hi, I've just started using DJGPP and like it very much. My question doesn't 
> really regard DJGPP, but more a trick that RHIDE performs. When running RHIDE 
> in a Win95 DOS box, it changes the name of the DOS box (and resets it when 
> quitting). Does anybody know how this is performed?

The following is (a slightly changed) code from GNU Emacs 20 (which also 
knows how to set the title of its DOS box):

int
w95_set_virtual_machine_title (const char *title_string)
{
  /* Only Windows 9X (version 4 and higher) support this function.  */
  if ((windows_version & 0xff) >= 4)
    {
      _go32_dpmi_registers regs;
      dosmemput (title_string, strlen (title_string) + 1, __tb);
      regs.x.ax = 0x168e;
      regs.x.dx = 1;
      regs.x.es = __tb >> 4;
      regs.x.di = __tb & 15;
      regs.x.sp = regs.x.ss = regs.x.flags = 0;
      _go32_dpmi_simulate_int (0x2f, &regs);
      return regs.x.ax == 1;
    }
  return 0;
}

- Raw text -


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