From: Charles Sandmann Newsgroups: comp.os.msdos.djgpp Subject: Re: Terminate and Stay resident in CWSDPMI Date: Tue, 15 Oct 2002 00:26:52 CDT Organization: Rice University, Houston TX Lines: 52 Message-ID: <3daba71c.sandmann@clio.rice.edu> References: <3dab979d DOT sandmann AT clio DOT rice DOT edu> NNTP-Posting-Host: clio.rice.edu X-Trace: joe.rice.edu 1034660031 24968 128.42.105.3 (15 Oct 2002 05:33:51 GMT) X-Complaints-To: abuse AT rice DOT edu NNTP-Posting-Date: 15 Oct 2002 05:33:51 GMT X-NewsEditor: ED-1.5.9 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > Did you try v2tk/djgpptsr.zip? Comment the section on space saving and > uncomment the line about resetting exceptions, and it will at least build. Here's a patch to have it work (at least under 2.03): *** djgpptsr.old Sun Aug 18 18:36:46 1996 --- djgpptsr.c Tue Oct 15 00:10:16 2002 *************** short __djgpp_ds_alias; *** 32,35 **** --- 32,37 ---- void __djgpp_exception_setup(void) { return; } int __djgpp_set_ctrl_c(int enable) { return 0; } + void abort(void) { __exit(-1); } + void _exit(int status) { __exit (status); } /* End undocumented way to make exception handling disappear */ *************** void int8(void) *** 41,45 **** } ! void main(void) { __dpmi_regs regs; --- 43,47 ---- } ! int main(void) { __dpmi_regs regs; *************** void main(void) *** 54,56 **** --- 56,59 ---- regs.x.dx = (256) / 16; /* paragraphs */ __dpmi_int(0x21, ®s); + return 0; } Someday maybe I'll get around to refreshing the zip, it's only 6 years old ... > It seems to work fine on Windows 95 & 98; it was tested on DOS some time back. > It even ran under Windows 2000, but I never saw the cursor change (so > interrupts aren't getting there?) Correction - it works on Windows 2000 - sometimes. The problem seems to be in the peek/poke of the video buffer which sometimes needs a kick to work properly. I've seen this before with symify (it can't find the traceback) under Win2K. Sometimes running a DOS app which pokes the video buffer wakes it up. But the TSR portion seems to work just fine (the upper right hand corner changes background color about once a second). I didn't try XP, but DOS, Win 95, Win98 and Win2K is a fairly wide range of platforms to test with.