Date: Wed, 10 Dec 1997 16:35:25 +0200 (IST) From: Eli Zaretskii To: Steven Don cc: djgpp AT delorie DOT com Subject: Re: Setting program name? In-Reply-To: <66korf$mul@news.euro.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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, ®s); return regs.x.ax == 1; } return 0; }