Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I write a memory resident program?

Status
Not open for further replies.

mehr1122

Programmer
May 23, 2001
1
IR
Hi,

I have written a program which runs quite ok now I want to make it a memory resident one, that stays active in the background, letting the computer run other tasks(in dos mode). my program must perform a task in a specific time.
Any ideas?

thanks,
M.
 
Hi Mehr,

You are talking of TSR programming (Terminate and Stay Resident) Doing this isn't that complicated but reaquires a lot of care. First of all you need to know about interrupts, interrupt service routines and the way they work. Next what you'll have to do is to write a service routine of your own and insert it on top of the existing routine. Refer to interrupt type of functions in C.

Once you have your routine and call sequencing in order you can use the keep() method of C to have it run in the background. Be warned that any mistake in the code can cause your system to hangup or misbehave.

Am sure, it would take a lot to run your first TSR program.

Have fun coding...;-)

Roy.
user.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top