Article View: comp.os.msdos.programmer
Article #4807Re: TSR's - Must they be converted to .COM?
From: Steve Resnick
Date: Wed, 20 Feb 1991 17:54
Date: Wed, 20 Feb 1991 17:54
38 lines
2301 bytes
2301 bytes
In article <1014@csource.oz.au> david@csource.oz.au (david nugent) writes:
>In <24314@netcom.COM> resnicks@netcom.COM (Steve Resnick) writes:
>
>> Making an EXE TSR is a little more complicated, in that you need to know
>> where the code segment is relative to the PSP, and how many paragraphs the
>> TSR is going to take when you make the DOS call. I don't think the INT 27H
>> TSR interrupt will work for this, but rather DOS function 31H will do the TSR
>> in this "style'
>
>
>INT 27H will still work alright, provided you have CS set to the program's
>PSP. That's often a little hard to arrange in a .EXE format, but it's
>nevertheless possible. With an easier alternative around, it's no wonder
>that that sort of contortion is rarely, if ever, seen.
>
INT 27H will work, ONLY if these conditions are met:
The total code is <64K
The code segment is within the area kept resident by int 27H.
The latter can be tricky if the code segment is different than the
PSP segment, which is usually the case with .EXE programs. Remember
that int27H will keep only 1 segment resident, whereas INT 21H, AH=31H
will keep any number of paragraphs (16 byte chunks) resident, up to
available memory. This makes it much easier to make an EXE TSR..
Cheers!
Steve
--
-------------------------------------------------------------------------------
resnicks@netcom.com, apple!camphq!105!steve.resnick, IFNA: 1:143/105.0,
USNail: 530 Lawrence Expressway, Suite 374
Sunnyvale, Ca 94086
- In real life: Steve Resnick. Flames, grammar and spelling errors >/dev/null
0x2b |~ 0x2b, THAT is the question.
The Asylum OS/2 BBS - (408)263-8017 12/2400,8,1 - Running Maximus CBCS 1.2
-------------------------------------------------------------------------------
Technical Details
Message-ID:
<24856@netcom.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!amdahl!netcom!resnicksReferences:
<3188@unccvax.uncc.edu> <24314@netcom.COM> <1014@csource.oz.au>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!amdahl!netcom!resnicks From: resnicks@netcom.COM (Steve Resnick) Newsgroups: comp.os.msdos.programmer Subject: Re: TSR's - Must they be converted to .COM? Keywords: TSR Message-ID: <24856@netcom.COM> Date: 20 Feb 91 17:54:55 GMT References: <3188@unccvax.uncc.edu> <24314@netcom.COM> <1014@csource.oz.au> Organization: What? Me organized? You gotta be kidding! Lines: 38