MS-DOS

Moderators: blip
Number of threads: 389
Number of posts: 904

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
closing resident programs Posted by Aurelian on 29 Nov 2002 at 8:29 AM
hi there!

I know how to make a resident program in assembly, but i don't know how to close it. It stays in memory until i close it. Does somebody knows how can I, with other program, close my resident program?

thanx!!
Report
Re: closing resident programs Posted by Batman on 29 Nov 2002 at 9:46 AM
Your resident program is probably hooking some interrupts to activate it, and you are hooking these interrupts before program remains resident. Before close, your program must restore the interrupts the way they were before your program went resident. Unfortunately other resident programs may have been installed by user, which may have hooked the same interrupt as you. If this happend, you can't restore interrupts and therefore can't close. Otherwise your second program (which can well be another instance of your resident one) may unhook the interrupts, free the environment variables segment if not already free and then just free the memory of your resident prog.

Your second program may find the resident one be looking at the interrupt vector addres of the hooked intterrupt. Within the resident program, at a specified offset from the interrupt procedure's address,
you should place a signature string (prog. name and version) for this purpose. The second program will look for the signature at the specified offset from the interrupt procedure. If it finds the signature, it may determine the resident program's segment and dealocate it using DOS memory alocation functions.

No, nothing's simple!
Report
Re: closing resident programs Posted by Aurelian on 30 Nov 2002 at 9:31 AM
Thanks, man! I will see if i can do it! Thanks!
Report
Re: closing resident programs Posted by sureshk on 28 Apr 2003 at 11:05 PM
: hi there!
:
: I know how to make a resident program in assembly, but i don't know how to close it. It stays in memory until i close it. Does somebody knows how can I, with other program, close my resident program?
:
: thanx!!
:
Hi,the TSR are very interesting suject to be explored. I had come across such a program in a book "writing TSR trough C" by yeshwant kanetkar published by BPB. If you dont find the book then mail me so that i can send you the program.
Report
Re: closing resident programs Posted by Batman on 30 Apr 2003 at 10:19 AM

Hi sureshk!

TSRs are very interesting programs to explore, but don't forget they are MS-DOS programs. Like it or not, you won't do anything usefull with an MS-DOS TSR program these days.

I'm sorry to tell you this thing. I'm very sorry too MS-DOS is dead now. I have a book or two about TSR's. However TSR programs have some compatibility problems by their very design and idea, as they may not support future versions of their own operating system.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.