Thread: one million dollar question

  1. #1
    Registered User billholm's Avatar
    Join Date
    Apr 2002
    Posts
    225

    one million dollar question

    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!

  2. #2
    Im a Capricorn vsriharsha's Avatar
    Join Date
    Feb 2002
    Posts
    192

    Cool

    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.
    Help everyone you can

  3. #3
    Registered User billholm's Avatar
    Join Date
    Apr 2002
    Posts
    225

    gogogo!

    Thanks a lot!

    I'm gonna try it out at home
    I'll ask for your help again sometime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  2. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  3. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM
  4. Question about linked lists.
    By cheeisme123 in forum C++ Programming
    Replies: 6
    Last Post: 02-25-2003, 01:36 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM