Found online, not sure if it's useful?
To design a TSR program, generally, it can include three parts from the program structure.
The first part is the initialization part. This part of the program mainly completes putting the entry address of the TSR program into the corresponding interrupt number in the interrupt vector table, so that when the user uses a certain key to execute the TSR program, an interrupt of the corresponding interrupt number will be generated. DOS takes out the entry address of this program from the vector table and executes the TSR program;
The second part is the part that executes the program function. This part is the program that the TSR program needs to complete a specific function, or the interrupt service program part (it is actually the resident part). Generally, it should include a pop-up window, provide prompt instructions, immediately execute after getting the user's response, and finally restore the original state of the screen;
The third part is to load the TSR program into memory according to the specified length (number of bytes occupied by memory) and protect it so that it is not destroyed by other programs, that is, terminate and stay in memory. This can be realized through DOS or BIOS calls.
[ Last edited by brglng on 2006-7-31 at 16:49 ]
Attachments
tsr.txt (12.62 KiB, Credits to download 1 pts, Downloads: 35)