home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / msdos / programm / 8841 < prev    next >
Encoding:
Text File  |  1992-08-27  |  1.9 KB  |  38 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!utcsri!torn!news.ccs.queensu.ca!mast.queensu.ca!dmurdoch
  3. From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
  4. Subject: Re: Smallest TSR (was Re: Why can't I hook INT 21h???)
  5. Message-ID: <dmurdoch.74.714930041@mast.queensu.ca>
  6. Lines: 26
  7. Sender: news@knot.ccs.queensu.ca (Netnews control)
  8. Organization: Queen's University
  9. References: <1992Aug21.175406.3881@alw.nih.gov> <BtCwo7.C1o.2@cs.cmu.edu> <19866@plains.NoDak.edu> <BtMG1E.A6D@ireq.hydro.qc.ca>
  10. Date: Thu, 27 Aug 1992 15:40:41 GMT
  11.  
  12. In article <BtMG1E.A6D@ireq.hydro.qc.ca> beaurega@ireq.hydro.qc.ca (Denis Beauregard) writes:
  13. >
  14. >But, from first example of a small TSR we got, the program was heavily
  15. >using inline or assembly code using particularities of C to make it
  16. >easier to program in assembly than direct assembly.  However, this is
  17. >ASM, not HLL (high level language).  In other words, it is curious
  18. >to need to use the lower level language to get the more (or the less
  19. >in space occupied) from a higher level language (or isn't it natural :
  20. >the more you know, the more you can do).
  21.  
  22. Take a look at the entry I just posted.  It's entirely in a high level 
  23. language (Turbo Pascal), using a widely available commercial library (Object 
  24. Professional).  The only place I bent your rules was to make a direct DOS 
  25. call in order to release the environment segment.  It takes 160 bytes, just 
  26. 32 bytes more than the original example of a tiny TSR posted by Ralf Brown, 
  27. and performs the same function.
  28.  
  29. If I'd been allowed to write the ISR part in inline assembler, I don't see 
  30. any reason I couldn't have matched or beaten his record.  The advantage of 
  31. writing in TP (or another HLL) is that the loader part is particularly 
  32. easy to write; all the stuff I did there is commonly available "off the 
  33. shelf".  For example, if I'd wanted to parse complicated command line 
  34. arguments, it would have been easy.  
  35.  
  36. Duncan Murdoch
  37. dmurdoch@mast.queensu.ca
  38.