🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #4503

Re: TSR programming with MSC

#4503
From: Yangmin Shen
Date: Sun, 03 Feb 1991 05:54
25 lines
1671 bytes
From article <8646@hub.ucsb.edu>, by spinrad@rigel.ucsb.edu (Sanford Spinrad):
> I'm having a problem with TSR programming with MSC. .....
> .....The c function only contains 1 printf statement. .....

This is your problem.  If you use printf or a number of other MSC funtions
which use malloc, memory for the function will be allocated from what the
TSR thinks is free memory, only the memory being allocated is actually
from whatever is above the stack area of the TSR, which in most cases
is in the application which you have invoked from the DOS prompt following
the loading of the TSR.  You can avoid this by using cprintf if redirection is
not important.  If you are using MSC6.00, use quick help to look up the
malloc function, where you'll find a list of library functions which use malloc
and are therefore not suitable for use in TSRs.  Also, look up the example
program ALARM.C for a good example of a TSR written in C.

Good luck!
_

Yangmin Shen       UUCP: ...!sun!ys2!yang
                  VOICE: +1 408 446 2210 x140 (Day)  +1 408 262 4017 (Eve)
                    FAX: +1 408 942 8732
-- 
Yangmin Shen       UUCP: ...!sun!ys2!yang
                  VOICE: +1 408 446 2210 x140 (Day)  +1 408 262 4017 (Eve)
                    FAX: +1 408 942 8732
Technical Details
Message-ID: <1991Feb3.055420.5504@ys2.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!sun!aeras!ys2!yang
References: <8646@hub.ucsb.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!sun!aeras!ys2!yang
From: yang@ys2.uucp (Yangmin Shen)
Newsgroups: comp.os.msdos.programmer
Subject: Re: TSR programming with MSC
Message-ID: <1991Feb3.055420.5504@ys2.uucp>
Date: 3 Feb 91 05:54:20 GMT
References: <8646@hub.ucsb.edu>
Distribution: comp
Organization: Glenmoor Data
Lines: 25