I'm currently in the prosess of writing a program that steps through the memory control block to find all TSR's in memory (the program will eventually be used in a primative virus scanner).

I can find all programs resident in memory but I can't tell which are TSRs and which are programs that are currently operating. Does anybody know of a way of doing this? I'm hoping there is some entry in the PSP that tells this but I don't know which one.

Thanks in advance for any help,
Val

P.s. I'm writing the program in 8086 assembly and C if it makes any difference