hey guys!
any of you here who knows how to program a TSR?
everytime i try to think it out i get stuck. i just need a tiny bit of sample code (not a hint!) and i'll take it from there. :)
thanx!
Printable View
hey guys!
any of you here who knows how to program a TSR?
everytime i try to think it out i get stuck. i just need a tiny bit of sample code (not a hint!) and i'll take it from there. :)
thanx!
This is a small TSR that u can use to go ahead... It gives u an idea of a tsr. (this is a tiny imitation of the "Dancing Dolls" ). I compiled it using Turbo C 2.0 +(or higher versions) and under DOS. Note: This TSR will NOT work under windows. It will only as long as u r in the DOS mode.
Here it is...
#include<dos.h>
void interrupt our();
void interrupt (*prev)();
char far *scr=(char far *)0xB8000000L;
main()
{
unsigned long int far *p;
p=(char far *)36;
prev=*p;
*p=our;
keep(0,500);
}
void interrupt our()
{
int i;
for(i=0;i<=3999;i+=2)
{
if(*(scr+i)>='A' && *(scr+i)<='Z')
*(scr+i)+=32;
else
if(*(scr+i)>='a' && *(scr+i)<='z')
*(scr+i)-=32;
}
(*prev)();
}
- Hope u do well...
NOTE: This will become resident in memory as soon as u execute it. To remove it from memory, u must reboot ur system (DOS).
-Harsha.
Thanks a lot!
I'm gonna try it out at home :)
I'll ask for your help again sometime.