Path: utzoo!yunexus!maccs!cs4g6ag From: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Newsgroups: comp.lang.pascal Subject: Re: Read this BEORE memory resident! Message-ID: <251868F9.15014@maccs.dcss.mcmaster.ca> Date: 21 Sep 89 04:52:08 GMT Article-I.D.: maccs.251868F9.15014 References: <89262.181748MHS108@PSUVM.BITNET> Reply-To: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Organization: McMaster University, Hamilton, Ontario Lines: 32 In article <89262.181748MHS108@PSUVM.BITNET> MHS108@PSUVM.BITNET (Mark Solsman) writes: $Oops. I apparently forgot to mention what operating system I am running. $I am running a MS/DOS operating system using Turbo Pascal (I think it is $version 4.1) I am sorry that I forgot to post that in my last post. $The catch is that I am NOT running any multi-task, OS, or UNIX. $(I know that this is possible in the basic language, but pascal?) $ $So, does anyone out there know how to make a pascal progam memory resident? I tried replying to your earlier post, but mail bounced. TP4 has a library procedure called KEEP which you call to make your program a TSR. You will, of course, need some way of having your program woken up from time to time; this will in all likelihood be due to some form of interrupt (be it a clock tick, keyboard interrupt, software interrupt invoked by other programs, etc.) You can make a procedure an interrupt handler by inserting the keyword 'interrupt' into the procedure declaration. (Of course, you will also have to set the appropriate interrupt vector(s); I believe the library routine to do this is setintvec, and the call to read the current contents of a vector would then be getintvec.) Consult your TP manual for details on all of these; I've never written any TSRs in TP personally, so I can't warn you about things to watch out for. (If you have any specific questions, though, write to me and I'll try to answer them) -- Stephen M. Dunn cs4g6ag@maccs.dcss.mcmaster.ca ********************************************************************** = "\nI'm only an undergraduate!!!\n"; "VM is like an orgasm: the less you have to fake, the better." - S.C.