home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / alt / msdos / programm / 2253 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  2.5 KB

  1. Xref: sparky alt.msdos.programmer:2253 comp.lang.c:12771 comp.os.msdos.programmer:8792
  2. Path: sparky!uunet!gatech!concert!duke!news.duke.edu!phy.duke.edu!kds
  3. From: kds@phy.duke.edu (Stokes Kevin)
  4. Newsgroups: alt.msdos.programmer,comp.lang.c,comp.os.msdos.programmer
  5. Subject: Re: file positioning with buffered/unbuffered I/O
  6. Message-ID: <4855@news.duke.edu>
  7. Date: 25 Aug 92 18:29:31 GMT
  8. References: <1992Aug8.111834.19417@klaava.Helsinki.FI> <1992Aug10.205740.4357@irscscm.UUCP> <1992Aug25.153322.13793@jhunix.hcf.jhu.edu>
  9. Sender: news@news.duke.edu
  10. Followup-To: alt.msdos.programmer
  11. Organization: Duke University Physics Dept.; Durham, N.C.
  12. Lines: 36
  13. Nntp-Posting-Host: physics.phy.duke.edu
  14.  
  15.  
  16.    (Christopher H Gregg) writes:
  17.  
  18. >The program is memory resident and it traps......
  19. >The problem is that when I try to use either DOS function 13h (delete file)
  20. >or DOS function 41h (which I would prefer), the program crashes.
  21.  
  22.   You can't make DOS calls from within a TSR casually.  DOS is not re-entrant,
  23. meaning that if your TSR interrupts the computer while it happens to be in
  24. a DOS routine, and then turn around and call a DOS routine yourself the system
  25. will quickly crash.
  26.   The reason is that DOS uses static variables to save info when you make
  27. a DOS call.  Thus when you make your DOS call it messes up the variables that
  28. were setup by the DOS call your TSR interrupted.  Then when you try to
  29. return control back, the machine immediately flies into lollyland.
  30.   To find out whether it is OK for your TSR to pop up requires checking the
  31. DOS internal In-service flag.  This is an undocumented location that you
  32. find by making an undocumented system call.
  33.   Yuck.  DOS is a piss-poor excuse for an operation system.  My old Data
  34. General minicomputer (circa 1972) had a really nice true multi-tasking OS 
  35. which fit in less than 16k.  They should have just ported that.  Of course, 
  36. there is a famous Bill Gates quote "Our goal is for user to not even know 
  37. there is an operating system there at all."   (not exact)
  38.   In my opinion he has already achieved this with DOS.  He has convinced the
  39. whole world to use computers with no operation system, just a nice binary
  40. loader!
  41.                                                    -Kevin
  42.  
  43.  
  44.  
  45.  
  46. -- 
  47. ------------------------------------------------------------------------------
  48. |  Kevin Stokes                        |     Please direct all pointless     |
  49. |  Pie in the Sky Software             |   flames to my mailbox, it's much   |
  50. |                                      |          more irritating.           |
  51.