home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / alt / msdos / programm / 2210 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  1.2 KB

  1. Path: sparky!uunet!usc!nic.csu.net!koko.csustan.edu!rat!zeus!rmathews
  2. Newsgroups: alt.msdos.programmer
  3. Subject: Re: Why can't I hook INT 21h???
  4. Message-ID: <1992Aug18.034041.195326@zeus.calpoly.edu>
  5. From: rmathews@zeus.calpoly.edu (Bob Mathews)
  6. Date: Tue, 18 Aug 1992 03:40:41 GMT
  7. References: <14340@mindlink.bc.ca>
  8. Organization: California Polytechnic State University, San Luis Obispo
  9. Lines: 18
  10.  
  11. Charlie_Hutchins@mindlink.bc.ca (Charlie Hutchins) writes:
  12. >Okay, maybe someone could help me here.  I am trying to write a TSR
  13. >that hooks interrupt 21h but whenever I try and hook that vector I
  14. >get an invalid command.com error and my system crashes.  I am using
  15. >TC++ 3.0 and I have tryed both using their set vect routine as
  16. >well as manually changing the interrupt vector table but in both
  17. >cases the same thing happens...crash!  Even if I write an ISR for
  18. >INT 21h that simply returns control to the original ISR the system
  19. >crahes.  For example, even this crashes my system:
  20. [code deleted]
  21.  
  22. The turbo c interrupt function automatically saves all cpu registers.
  23. The return values from DOS are getting clobbered.  Code like this
  24. absolutely needs to be written in assembly.  You need to have complete
  25. control of what's happening to the machine.
  26.  
  27. swehtam bob
  28.  
  29.