home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / msdos / programm / 8696 < prev    next >
Encoding:
Text File  |  1992-08-21  |  2.5 KB  |  52 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!nih-csl!alw.nih.gov!gregh
  3. From: gregh@alw.nih.gov (Gregory Humphreys)
  4. Subject: Re: Why can't I hook INT 21h???
  5. Message-ID: <1992Aug21.175406.3881@alw.nih.gov>
  6. Sender: postman@alw.nih.gov (AMDS Postmaster)
  7. Organization: National Inst. of Health, DCRT, CSL
  8. References: <14340@mindlink.bc.ca> <1992Aug18.034041.195326@zeus.calpoly.edu> <frank.714406708@fam168>
  9. Date: Fri, 21 Aug 1992 17:54:06 GMT
  10. Lines: 40
  11.  
  12. In article <frank.714406708@fam168>, Frank Hoffmann <fh.pad@sni.de> writes:
  13. |> rmathews@zeus.calpoly.edu (Bob Mathews) writes:
  14. |> 
  15. |> >Charlie_Hutchins@mindlink.bc.ca (Charlie Hutchins) writes:
  16. |> >>Okay, maybe someone could help me here.  I am trying to write a TSR
  17. |> >>that hooks interrupt 21h but whenever I try and hook that vector I
  18. |> >>get an invalid command.com error and my system crashes.  I am using
  19. |> >>TC++ 3.0 ....
  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. |> Same does MSC 5/6. You must write in ASM as well or add additional ASM-Code
  30. |> to restore the regs and the stack-ptr.
  31.  
  32. IMUST disagree here.  I have written numerous similar programs in C and hooking 
  33. interrupts is just as reliable in C.  There is NOTHING you can't do in C that you CAN in assembley.
  34.  
  35. |> 
  36. |> frank
  37. |> -------------------------------------------------------------------------------
  38. |>     __________                  Frank Hoffmann
  39. |>      /             /    Siemens-Nixdorf Info. Systems Voice: [+49] 5251 812 209
  40. |>     /__           /      Dept: AP 52 / SW-Production    Fax: [+49] 5251 811 599
  41. |>    /' _  _   __  //            Fuerstenallee 7          USA: fh.pad@sni-usa.com
  42. |> __/__/__(_(_/ /_/^\__    W-4790 Paderborn / Germany    !USA: fh.pad@sni.de
  43. |> -------------------------------------------------------------------------------
  44. |> ( * )  <--- The green dot.  This mail is reusable. Copy to /dev/null instantly.
  45. |> -------------------------------------------------------------------------------
  46.  
  47. -- 
  48. Greg Humphreys    |  "Playing not to win is like sleeping with your 
  49. gregh@alw.nih.gov |  sister - sure, she's a great piece of tail, 
  50.                   |  and she's got a bag full of goodies, but it's 
  51. (301) 402-1817    |  just plain illegal."  -Charlie Sheen, "Hotshots"
  52.