Mail Archives: djgpp/1997/12/10/09:36:29
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;
}
- Raw text -