[comp.sys.ibm.pc.misc] I need assembly code examples for TSR's

hunky@matt.ksu.ksu.edu (John Mark Hunkins) (11/20/90)

I've been having problems writing memory resident
programs that use interrupt redirection. After 
several attempts, I have come to realize that there
are not very many examples of such code out there.

A major point of inclusion in such examples should
be interrupt redirection, more specifically, timer
interrupts, keyboard interrupts, and the combination  
of the two.

I'm familiar with how the simple logistics of 
interrupts 25, 35, 1C, and 21 work together, but
I'm consistently doing something wrong. I'm sure
I'm not the only one who would like to see more 
examples. Please post, mail, or give the ftp address
of your source code.

Are there any problems to look for if an interrupt
is already redirected? It seems to me that an interrupt
could be redirected to an indefinite number of routines
that pointed to each other and eventually the interrupt
routine itself.

I would like to hear whatever you have to say about
this subject.

Thanks in advance!

hunky@matt.ksu.ksu.edu
jmh@phobos.cis.ksu.edu
hunky@ksuvm.ksu.edu
  

sonny@charybdis.harris-atd.com (Bob Davis) (11/20/90)

In article <1990Nov20.023730.23941@maverick.ksu.ksu.edu> hunky@matt.ksu.ksu.edu (John Mark Hunkins) writes:
>I've been having problems writing memory resident
>programs that use interrupt redirection. After 
>several attempts, I have come to realize that there
>are not very many examples of such code out there.
>
	[DELETIONS]
>I would like to hear whatever you have to say about
>this subject.
>

	I can recommend _DOS Programmer's Reference_, Second Edition, by
Terry Dettmann (w/ Revisions by Jim Kyle) from QUE publishers. I've gotten
good data on programming TSRs from this source.

	Also, I think Brandenborg's sample ASM program, TSRDEMO2, is
excellent for learning the complex techniques necessary for programming
TSRs that stay out of DOS's (and each other's!) way. This file is available at
the fabled Simtel [26.2.0.74] via anonymous ftp:

Directory PD1:<MSDOS.ASMUTL>
 Filename   Type Length   Date    Description
==============================================
TSRDEMO2.ARC  B   23021  880829  Sample demo on a safe approach to TSRs (w/ASM)

	Further, at the same site, one can fetch information on the
TesSeRact Development Team's efforts to provide a standard for producing
safe, bullet-proof, cohabiting TSRs:

Directory PD1:<MSDOS.SYSUTL>
 Filename   Type Length   Date    Description
==============================================
TESS-5.ARC    B   38272  890628  TesSeRact TSR package for Turbo Pascal 5.0
TESS-A.ARC    B   22528  890628  TesSeRact TSR package for Assembler (MASM)
TESS-C.ARC    B   45312  890628  TesSeRact TSR package for TC 1.5 or MSC 5.x
TESS-D.ARC    B   69760  890628  Documentation for TesSeRact TSR package

	Still further, if you are interested, I can send you my own
package (under development), TBONES01.ARC, which is a set of skeletal
ASM programs intended to make it easy for me to design my own TSRs, in
exchange for bug reports.

	You are embarked upon an interesting and challenging intellectual
journey. It ain't easy to make a good TSR -- I am discovering...

Best,

______________________________________________________________________________
Bob Davis, UofALA'66   \\ INTERNET : sonny@trantor.harris-atd.com  |  _   _  |
Harris Corporation, ESS \\    UUCP : ...!uunet!x102a!trantor!sonny |_| |_| | |
Advanced Technology Dept.\\ AETHER : K4VNO          |==============|_/\/\/\|_|
PO Box 37, MS 3A/1912     \\ VOICE : (407) 727-5886 | I SPEAK ONLY | |_| |_| |
Melbourne, FL 32902        \\  FAX : (407) 729-2537 | FOR MYSELF.  |_________|