19.4 Using DOS in Active TSRs

This section explains how to write active TSRs that can safely call DOS functions. The material explores the problems imposed by DOS's nonreentrance and explains how a TSR can resolve those problems. The solution consists of four parts:

Understanding how DOS uses stacks

Determining when DOS is active

Determining whether a TSR can safely interrupt an active DOS function

Monitoring the Critical Error flag