closing resident programs - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

closing resident programs

AurelianAurelian Posts: 13Member
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!!

Comments

  • BatmanBatman Posts: 53Member
    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!
  • AurelianAurelian Posts: 13Member
    Thanks, man! I will see if i can do it! Thanks!
  • sureshksureshk Posts: 5Member
    : 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.
  • BatmanBatman Posts: 53Member

    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.
Sign In or Register to comment.