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