Alex Buell <alex.buell@[EMAIL PROTECTED]
> schreef in berichtnieuws
20061128233721.5714d557.alex.buell@[EMAIL PROTECTED]
Alex,
> I'm just wondering what's the equivalent for releasing
> itself from memory. Does anyone knows? (don't tell
> me about the 0x21 int TSR calls as I already know
> about them)
Alas, there is none, You see, the TSR mechanism has never been written to
allow for un-TSR-ing.
The problem that might occur is that another program links to the vectors
you have grabbed, meaning that that other program now points into your TSR
code. And that means you can't remove your code, otherwise that other
program (which is now *above* you in the chain) will eventually point into
never-never land (when your code gets, after being released, overwritten
by
another program), and crash the computer.
So, you first need to check if the vector still points to your code. If
not, you will need to at least leave a stub that links to the
(further-going) chain.
If you are not linked to you can simply un-link, and release the memory
the
code occupied. If you where linked too, you can shrink the memory-block
to
just encompass the stub (its a good idea to put the entry-point of your
vectors as high-up in the code as you can get them).
Hope that helps.
Regards,
Rudy Wieser


|