Saturday, September 8, 2007

tsr programming

tsr-terminate and stay resident programming is a very excellent field where u can learn and explore a lot of intrsing stuff.
a best way to explore ur DOS kingdom..
these programs stay resident in ur memory once they are executd..and can be invoked any time wen u need using some hot keys..

This is achieved by capturing interrupts and adding our own ISRs(Interrupt Service Routines) in the IVT(Interrupt Vector Table)..
Each ISR is addressed by an Integer..There are totally 256 interrupts ranging from 0 to 255..
and v make our program resident using the keep() system call..defined under dos.h

TURBO C has the facility of caputring these interrupts and replacing our own ones..
some of the functions used are getvect(),setvect() ,enable(),disable()..,,etc..defined under "dos.h"
some of the interrupts are 8-timer
0x417-keyboard and many more..

TSR programming is really intrsting wen learnt thoroughly or even if v get a small essence of it..

All virus programs are essentially TSRs but its not the vice versa..
We can use these techniques to wirte out own anti virus programs taking care of our MBR(Master Boot Record) and even tackling file viruses..

I hav written a program which monitors ut MBR and notifies u wen any illegal access is done to tat..this is done by monitoring 0x413 or 0x414
I referred Writing TSRs Through C by Yashwant Kanetkar..

Post ur comments to know more about TSR Programming..

1 comment:

sundar said...

Hi ,
Can you please tell me where i can download the "TSRs through C by Yashwant Kanethkar" ebook.It is important for me.
Thanks in advance