This source code is circa late 90s. It was implemented using Turbo C++ on x86 architecture.
MS-DOS is a non-preemptive, single-tasked operating system. This system offers primitives to support multitasking in DOS, memory management and synchronization constructs (semaphores, messages). It works using the concept of Terminate and Stay Resident in DOS.
Read How It Works to understand its inner working.