Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!mcsun!cernvax!chx400!chx400!bernina!neptune!inf.ethz.ch!brandis From: brandis@inf.ethz.ch (Marc Brandis) Newsgroups: comp.os.msdos.programmer Subject: Re: TSR's - Must they be converted to .COM? Message-ID: <25596@neptune.inf.ethz.ch> Date: 19 Feb 91 09:12:11 GMT References: <3188@unccvax.uncc.edu> <91049.093800IO92203@MAINE.BITNET> Sender: news@neptune.inf.ethz.ch Reply-To: brandis@inf.ethz.ch (Marc Brandis) Organization: Departement Informatik, ETH, Zurich Lines: 22 In article <91049.093800IO92203@MAINE.BITNET> IO92203@MAINE.BITNET (Scott Maxell) writes: > > TSRs must be a .COM file if I recall, because of the way DOS loads >COM vs. .EXE. A .COM file is a memory image, and is loaded in the same >place in memory. An .EXE file can be loaded anywhere in memory. I don't have >my tech reference at the moment, or I would give you a more detailed >explanation. > No, TSRs can be .EXE files. The only thing that is different is that int 27h cannot be used to terminate and stay resident. Instead, one of the int 21h functions (sorry, I do not remember the number) has to be used, and the size of the area to keep resident in paragraphs has to be computed. Of course, at the place where the interrupt handler gets control, you have to make sure that your segment registers contain correct values, but this is not very different from what you have to do in .COM type files anyway. Marc-Michael Brandis Computer Systems Laboratory, ETH-Zentrum (Swiss Federal Institute of Technology) CH-8092 Zurich, Switzerland email: brandis@inf.ethz.ch